commit dcdff3d5c6db7c99794e63ac0e9171efc37b20d7
Author: Alex Cole <[email protected]>
Date:   Sun Oct 4 20:21:40 2020 +1300

    [dmenu][patch][listfullwidth] patch added

diff --git 
a/tools.suckless.org/dmenu/patches/listfullwidth/dmenu-listfullwidth-5.0.diff 
b/tools.suckless.org/dmenu/patches/listfullwidth/dmenu-listfullwidth-5.0.diff
new file mode 100644
index 00000000..b8d0cfb3
--- /dev/null
+++ 
b/tools.suckless.org/dmenu/patches/listfullwidth/dmenu-listfullwidth-5.0.diff
@@ -0,0 +1,48 @@
+From 7a045242afac6db70a4aee6e3ac0146cdb264277 Mon Sep 17 00:00:00 2001
+From: Alex Cole <[email protected]>
+Date: Sun, 4 Oct 2020 19:58:32 +1300
+Subject: [PATCH] listfullwidth patch changes
+
+---
+ config.def.h | 1 +
+ dmenu.c      | 5 +++--
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/config.def.h b/config.def.h
+index 1edb647..221db00 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -2,6 +2,7 @@
+ /* Default settings; can be overriden by command line. */
+ 
+ static int topbar = 1;                      /* -b  option; if 0, dmenu 
appears at bottom     */
++static int color-prompt = 1;                /* -p  option; if 1, prompt uses 
SchemeSel, otherwise SchemeNorm */
+ /* -fn option overrides fonts[0]; default X11 font or font set */
+ static const char *fonts[] = {
+       "monospace:size=10"
+diff --git a/dmenu.c b/dmenu.c
+index 65f25ce..f73f299 100644
+--- a/dmenu.c
++++ b/dmenu.c
+@@ -137,7 +137,8 @@ drawmenu(void)
+       drw_rect(drw, 0, 0, mw, mh, 1, 1);
+ 
+       if (prompt && *prompt) {
+-              drw_setscheme(drw, scheme[SchemeSel]);
++              if (colorprompt)
++                      drw_setscheme(drw, scheme[SchemeSel]);
+               x = drw_text(drw, x, 0, promptw, bh, lrpad / 2, prompt, 0);
+       }
+       /* draw input field */
+@@ -154,7 +155,7 @@ drawmenu(void)
+       if (lines > 0) {
+               /* draw vertical list */
+               for (item = curr; item != next; item = item->right)
+-                      drawitem(item, x, y += bh, mw - x);
++                      drawitem(item, 0, y += bh, mw - x);
+       } else if (matches) {
+               /* draw horizontal list */
+               x += inputw;
+-- 
+2.28.0
+
diff --git a/tools.suckless.org/dmenu/patches/listfullwidth/index.md 
b/tools.suckless.org/dmenu/patches/listfullwidth/index.md
new file mode 100644
index 00000000..ccc24b51
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/listfullwidth/index.md
@@ -0,0 +1,21 @@
+listfullwidth
+=============
+Fork of [vertfull](../vertfull), updated for 5.0, a `colorprompt` option 
added, and a name change (see rationale below).
+
+When adding a prompt to dmenu (with the `-p` option or in config.h) and using 
a list arrangement, the items are indented at the prompt width. This patch 
fixes that.
+
+The patch also adds a `colorprompt` option to `config.def.h`. When enabled, 
the prompt will use the same colorscheme as the highlighted option 
(`SchemeSel`). If disabled, the prompt text will use the normal colorscheme 
(`SchemeNorm`). Enabled by default.
+
+Renaming Rational
+-----------------
+`vertfull` never made any sense to me. I assume "vert" is short for vertical, 
as I can't think of any other possibilities, but the patch changes the 
horizontal dimention, not the vertical. At first, I was just going to name the 
patch `horfull`, but that doesn't quite seem right.
+
+I wasn't sure if simply updating the patch was enough to warrant a rename, 
despite my gripes with the old name, but then I thought of adding the 
`colorprompt` option which I consider to be sufficient justification.
+
+Download
+--------
+* [dmenu-listfullwidth-5.0.diff](dmenu-listfullwidth-5.0.diff)
+
+Author
+------
+* Alex Cole - <[email protected]>


Reply via email to