[wiki] [sites] [dmenu][patch][tsv] update for latest git revision || prenev

From: <git_AT_suckless.org>
Date: Tue, 05 Apr 2022 14:37:32 +0200

commit d3691c1e78c524693b808a14a1317bbc7461fddb
Author: prenev <an2qzavok_AT_gmail.com>
Date: Tue Apr 5 15:37:10 2022 +0300

    [dmenu][patch][tsv] update for latest git revision

diff --git a/tools.suckless.org/dmenu/patches/tsv/dmenu-tsv-20220305-e73651f.diff b/tools.suckless.org/dmenu/patches/tsv/dmenu-tsv-20220305-e73651f.diff
new file mode 100644
index 00000000..6ed39bbe
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/tsv/dmenu-tsv-20220305-e73651f.diff
_AT_@ -0,0 +1,53 @@
+From 7f578b2ba3d6f3eb687181aed23fafd0f92d3f28 Mon Sep 17 00:00:00 2001
+From: prenev <an2qzavok_AT_gmail.com>
+Date: Tue, 5 Apr 2022 15:26:36 +0300
+Subject: [PATCH] tab-separate input lines and only display first parts
+
+---
+ dmenu.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/dmenu.c b/dmenu.c
+index 839f6cc..3eb196e 100644
+--- a/dmenu.c
++++ b/dmenu.c
+_AT_@ -30,6 +30,7 @@ enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */
+
+ struct item {
+ char *text;
++ char *stext;
+ struct item *left, *right;
+ int out;
+ };
+_AT_@ -140,7 +141,7 @@ drawitem(struct item *item, int x, int y, int w)
+ else
+ drw_setscheme(drw, scheme[SchemeNorm]);
+
+- return drw_text(drw, x, y, w, bh, lrpad / 2, item->text, 0);
++ return drw_text(drw, x, y, w, bh, lrpad / 2, item->stext, 0);
+ }
+
+ static void
+_AT_@ -182,7 +183,7 @@ drawmenu(void)
+ }
+ x += w;
+ for (item = curr; item != next; item = item->right)
+- x = drawitem(item, x, 0, textw_clamp(item->text, mw - x - TEXTW(">")));
++ x = drawitem(item, x, 0, textw_clamp(item->stext, mw - x - TEXTW(">")));
+ if (next) {
+ w = TEXTW(">");
+ drw_setscheme(drw, scheme[SchemeNorm]);
+_AT_@ -561,6 +562,10 @@ readstdin(void)
+ *p = '+ if (!(items[i].text = strdup(buf)))
+ die("cannot strdup %zu bytes:", strlen(buf) + 1);
++ if ((p = strchr(buf, ' ')))
++ *p = '++ if (!(items[i].stext = strdup(buf)))
++ die("cannot strdup %zu bytes:", strlen(buf) + 1);
+ items[i].out = 0;
+ }
+ if (items)
+--
+2.35.1
+
diff --git a/tools.suckless.org/dmenu/patches/tsv/index.md b/tools.suckless.org/dmenu/patches/tsv/index.md
index cde748fe..06c478be 100644
--- a/tools.suckless.org/dmenu/patches/tsv/index.md
+++ b/tools.suckless.org/dmenu/patches/tsv/index.md
_AT_@ -10,6 +10,7 @@ user, but still supply full filename to underlying script.
 
 Download
 --------
+* [dmenu-tsv-20220305-e73651f.diff](dmenu-tsv-20220305-e73651f.diff)
 * [dmenu-tsv-20201101-1a13d04.diff](dmenu-tsv-20201101-1a13d04.diff)
 
 Author
Received on Tue Apr 05 2022 - 14:37:32 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 05 2022 - 14:48:47 CEST