commit 7b8f6cba18380f3bba0df578644fa4003b16855a
parent c429e2666c8088a60237f86efa68f31030fc7f8d
Author: Erik Letson <hmagellan@hmagellan.com>
Date: Fri, 21 Aug 2020 14:21:08 -0500
Added morecolor
Diffstat:
3 files changed, 53 insertions(+), 1 deletion(-)
diff --git a/README b/README
@@ -42,7 +42,7 @@ patches!
(1). https://tools.suckless.org/dmenu/patches/
- CURRENT PROGRESS: 11/32 patches supported
+ CURRENT PROGRESS: 13/32 patches supported
3/32 patches unsupported
USUPPORTED PATCHES:
diff --git a/patches/morecolor/USAGE b/patches/morecolor/USAGE
@@ -0,0 +1,27 @@
+morecolor - Add another color scheme to dmenu for adjacent entries
+Source: https://tools.suckless.org/dmenu/patches/morecolor/dmenu-morecolor-20190922-4bf895b.diff
+Original Author: Tanner Babcock <babkock at gmail dot com>
+
+Description from source:
+ """
+ This patch creates an additional color scheme, for use with the entries adjacent to the selection. This
+ is nice if you want to add some more color to your dmenu.
+ """
+
+== YOU MUST ==
+(1). Place the patch file in /etc/portage/patches/x11-misc/dmenu/
+(2). Add the following line to the 'colors' array in your savedconfig file:
+
+ [SchemeMid] = { "#eeeeee", "#770000" },
+
+ Set the scheme colors to whatever you want.
+(3). Run 'emerge dmenu'
+
+== YOU PROBABLY SHOULD ==
+No further action is required.
+
+== PATCH MODIFICATIONS ==
+(1). Removed lines relating to 'config.def.h'
+
+== INCOMPATIBILITIES ==
+No known specific incompatibilities.
diff --git a/patches/morecolor/morecolor.patch b/patches/morecolor/morecolor.patch
@@ -0,0 +1,25 @@
+diff --git a/dmenu.c b/dmenu.c
+index 65f25ce..0a5c08d 100644
+--- a/dmenu.c
++++ b/dmenu.c
+@@ -26,7 +26,7 @@
+ #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
+
+ /* enums */
+-enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */
++enum { SchemeNorm, SchemeSel, SchemeOut, SchemeMid, SchemeLast }; /* color schemes */
+
+ struct item {
+ char *text;
+@@ -118,6 +118,8 @@ drawitem(struct item *item, int x, int y, int w)
+ {
+ if (item == sel)
+ drw_setscheme(drw, scheme[SchemeSel]);
++ else if (item->left == sel || item->right == sel)
++ drw_setscheme(drw, scheme[SchemeMid]);
+ else if (item->out)
+ drw_setscheme(drw, scheme[SchemeOut]);
+ else
+--
+2.23.0
+