summaryrefslogtreecommitdiff
path: root/sent/slide_numbers.patch
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-05-25 23:12:54 +0200
committerAki <please@ignore.pl>2023-05-25 23:12:54 +0200
commita46ff0e8c10be5a588d5218e82286e9d523e384c (patch)
tree7ff2a69424f9aa1f04e0ab19c1ebbfe0b3175584 /sent/slide_numbers.patch
parent54b209016645a304b0a320ae62fe055c8e8ee72a (diff)
downloadarch-ignore-a46ff0e8c10be5a588d5218e82286e9d523e384c.zip
arch-ignore-a46ff0e8c10be5a588d5218e82286e9d523e384c.tar.gz
arch-ignore-a46ff0e8c10be5a588d5218e82286e9d523e384c.tar.bz2
Sent will now display total slides too
Diffstat (limited to 'sent/slide_numbers.patch')
-rw-r--r--sent/slide_numbers.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/sent/slide_numbers.patch b/sent/slide_numbers.patch
index 51fa876..7e94fd5 100644
--- a/sent/slide_numbers.patch
+++ b/sent/slide_numbers.patch
@@ -22,7 +22,7 @@ diff '--color=auto' --unified --recursive --text src.orig/sent.c src.new/sent.c
- unsigned int height, width, i;
+ unsigned int height, width, i, numw;
Image *im = slides[idx].img;
-+ char num[12] = {0};
++ char num[27] = {0};
getfontsize(&slides[idx], &width, &height);
XClearWindow(xw.dpy, xw.win);
@@ -31,7 +31,7 @@ diff '--color=auto' --unified --recursive --text src.orig/sent.c src.new/sent.c
slides[idx].lines[i],
0);
+ if (idx >= 0) {
-+ snprintf(num, 12, "%d", idx + 1);
++ snprintf(num, 27, "%d / %d", idx + 1, slidecount);
+ drw_setfontset(d, fonts[SLIDENUMBERSCALE]);
+ numw = drw_fontset_getwidth(d, num);
+ drw_text(d,