diff options
author | justsaumit <justsaumit@draconyan.xyz> | 2022-03-02 09:21:44 +0530 |
---|---|---|
committer | justsaumit <justsaumit@draconyan.xyz> | 2022-03-02 09:21:44 +0530 |
commit | 0c664be40b6a81727bbefaceff053598766cfa2b (patch) | |
tree | 3e6b04b0260c57fc90e1bb48943a496795b055fe /patches | |
parent | bf2a0b28ef4716052e9811d917190d88a7aea6d2 (diff) |
removed numbers patch
Diffstat (limited to 'patches')
-rw-r--r-- | patches/4.dmenu-instant-4.7.diff (renamed from patches/5.dmenu-instant-4.7.diff) | 0 | ||||
-rw-r--r-- | patches/4.dmenu-numbers-4.9.diff | 81 | ||||
-rw-r--r-- | patches/5.dmenu-mousesupport-5.1.diff (renamed from patches/6.dmenu-mousesupport-5.1.diff) | 0 | ||||
-rw-r--r-- | patches/6.dmenu-textscroll-20180607-a314412.diff (renamed from patches/7.dmenu-textscroll-20180607-a314412.diff) | 0 | ||||
-rw-r--r-- | patches/7.dmenu-navhistory-5.0.diff (renamed from patches/8.dmenu-navhistory-5.0.diff) | 0 |
5 files changed, 0 insertions, 81 deletions
diff --git a/patches/5.dmenu-instant-4.7.diff b/patches/4.dmenu-instant-4.7.diff index a78276f..a78276f 100644 --- a/patches/5.dmenu-instant-4.7.diff +++ b/patches/4.dmenu-instant-4.7.diff diff --git a/patches/4.dmenu-numbers-4.9.diff b/patches/4.dmenu-numbers-4.9.diff deleted file mode 100644 index 113be80..0000000 --- a/patches/4.dmenu-numbers-4.9.diff +++ /dev/null @@ -1,81 +0,0 @@ -From 61abc60dbfaa8ec63fcd176307308aee88a19e32 Mon Sep 17 00:00:00 2001 -From: Miles Alan <m@milesalan.com> -Date: Sat, 10 Aug 2019 17:20:08 -0500 -Subject: [PATCH] Display number of matched and total items in top right corner - ---- - dmenu.c | 25 +++++++++++++++++++++++-- - 1 file changed, 23 insertions(+), 2 deletions(-) - -diff --git a/dmenu.c b/dmenu.c -index 6b8f51b..98c5810 100644 ---- a/dmenu.c -+++ b/dmenu.c -@@ -24,6 +24,8 @@ - * MAX(0, MIN((y)+(h),(r).y_org+(r).height) - MAX((y),(r).y_org))) - #define LENGTH(X) (sizeof X / sizeof X[0]) - #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) -+#define NUMBERSMAXDIGITS 100 -+#define NUMBERSBUFSIZE (NUMBERSMAXDIGITS * 2) + 1 - - /* enums */ - enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */ -@@ -34,6 +36,7 @@ struct item { - int out; - }; - -+static char numbers[NUMBERSBUFSIZE] = ""; - static char text[BUFSIZ] = ""; - static char *embed; - static int bh, mw, mh; -@@ -126,6 +129,21 @@ drawitem(struct item *item, int x, int y, int w) - return drw_text(drw, x, y, w, bh, lrpad / 2, item->text, 0); - } - -+static void -+recalculatenumbers() -+{ -+ unsigned int numer = 0, denom = 0; -+ struct item *item; -+ if (matchend) { -+ numer++; -+ for (item = matchend; item && item->left; item = item->left) -+ numer++; -+ } -+ for (item = items; item && item->text; item++) -+ denom++; -+ snprintf(numbers, NUMBERSBUFSIZE, "%d/%d", numer, denom); -+} -+ - static void - drawmenu(void) - { -@@ -151,6 +169,7 @@ drawmenu(void) - drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0); - } - -+ recalculatenumbers(); - if (lines > 0) { - /* draw vertical list */ - for (item = curr; item != next; item = item->right) -@@ -165,13 +184,15 @@ drawmenu(void) - } - x += w; - for (item = curr; item != next; item = item->right) -- x = drawitem(item, x, 0, MIN(TEXTW(item->text), mw - x - TEXTW(">"))); -+ x = drawitem(item, x, 0, MIN(TEXTW(item->text), mw - x - TEXTW(">") - TEXTW(numbers))); - if (next) { - w = TEXTW(">"); - drw_setscheme(drw, scheme[SchemeNorm]); -- drw_text(drw, mw - w, 0, w, bh, lrpad / 2, ">", 0); -+ drw_text(drw, mw - w - TEXTW(numbers), 0, w, bh, lrpad / 2, ">", 0); - } - } -+ drw_setscheme(drw, scheme[SchemeNorm]); -+ drw_text(drw, mw - TEXTW(numbers), 0, TEXTW(numbers), bh, lrpad / 2, numbers, 0); - drw_map(drw, win, 0, 0, mw, mh); - } - --- -2.19.2 - diff --git a/patches/6.dmenu-mousesupport-5.1.diff b/patches/5.dmenu-mousesupport-5.1.diff index 49824ba..49824ba 100644 --- a/patches/6.dmenu-mousesupport-5.1.diff +++ b/patches/5.dmenu-mousesupport-5.1.diff diff --git a/patches/7.dmenu-textscroll-20180607-a314412.diff b/patches/6.dmenu-textscroll-20180607-a314412.diff index 7a7386a..7a7386a 100644 --- a/patches/7.dmenu-textscroll-20180607-a314412.diff +++ b/patches/6.dmenu-textscroll-20180607-a314412.diff diff --git a/patches/8.dmenu-navhistory-5.0.diff b/patches/7.dmenu-navhistory-5.0.diff index 1f7cf6c..1f7cf6c 100644 --- a/patches/8.dmenu-navhistory-5.0.diff +++ b/patches/7.dmenu-navhistory-5.0.diff |