diff options
author | Aki <please@ignore.pl> | 2023-05-25 23:06:07 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2023-05-25 23:06:07 +0200 |
commit | 54b209016645a304b0a320ae62fe055c8e8ee72a (patch) | |
tree | 6dc795bb191b055a62dce35262e8b9284718807e /sent/slide_numbers.patch | |
parent | 6a67689062270f69233c0731916149aed1e34e13 (diff) | |
download | arch-ignore-54b209016645a304b0a320ae62fe055c8e8ee72a.zip arch-ignore-54b209016645a304b0a320ae62fe055c8e8ee72a.tar.gz arch-ignore-54b209016645a304b0a320ae62fe055c8e8ee72a.tar.bz2 |
Added sent slideshow utility
Diffstat (limited to 'sent/slide_numbers.patch')
-rw-r--r-- | sent/slide_numbers.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/sent/slide_numbers.patch b/sent/slide_numbers.patch new file mode 100644 index 0000000..51fa876 --- /dev/null +++ b/sent/slide_numbers.patch @@ -0,0 +1,50 @@ +diff '--color=auto' --unified --recursive --text src.orig/config.def.h src.new/config.def.h +--- src.orig/config.def.h 2023-05-25 23:01:23.204266978 +0200 ++++ src.new/config.def.h 2023-05-25 23:00:47.904265895 +0200 +@@ -7,6 +7,7 @@ + }; + #define NUMFONTSCALES 42 + #define FONTSZ(x) ((int)(10.0 * powf(1.1288, (x)))) /* x in [0, NUMFONTSCALES-1] */ ++#define SLIDENUMBERSCALE 5 + + static const char *colors[] = { + "#eee8d5", /* foreground color */ +Only in src.new: drw.o +Only in src.new: sent +Only in src.orig: sent-1.tar.gz +diff '--color=auto' --unified --recursive --text src.orig/sent.c src.new/sent.c +--- src.orig/sent.c 2017-09-03 23:57:26.000000000 +0200 ++++ src.new/sent.c 2023-05-25 22:57:14.934259453 +0200 +@@ -513,8 +513,9 @@ + void + xdraw() + { +- unsigned int height, width, i; ++ unsigned int height, width, i, numw; + Image *im = slides[idx].img; ++ char num[12] = {0}; + + getfontsize(&slides[idx], &width, &height); + XClearWindow(xw.dpy, xw.win); +@@ -530,6 +531,19 @@ + 0, + slides[idx].lines[i], + 0); ++ if (idx >= 0) { ++ snprintf(num, 12, "%d", idx + 1); ++ drw_setfontset(d, fonts[SLIDENUMBERSCALE]); ++ numw = drw_fontset_getwidth(d, num); ++ drw_text(d, ++ d->fonts->h / 2, ++ xw.h - d->fonts->h - d->fonts->h / 2, ++ numw, ++ d->fonts->h, ++ 0, ++ num, ++ 0); ++ } + drw_map(d, xw.win, 0, 0, xw.w, xw.h); + } else { + if (!(im->state & SCALED)) +Only in src.new: sent.o +Only in src.new: util.o |