From a46ff0e8c10be5a588d5218e82286e9d523e384c Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 25 May 2023 23:12:54 +0200 Subject: Sent will now display total slides too --- sent/slide_numbers.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sent/slide_numbers.patch') 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, -- cgit v1.1