[wiki] [sites] [dmenu][patch] morecolor: Additional color scheme for adjacent entries || Tanner Babcock

From: <git_AT_suckless.org>
Date: Sun, 22 Sep 2019 10:47:01 +0200

commit a0bfacb708480c5923c14687cb07ac46b234b2bc
Author: Tanner Babcock <babkock_AT_gmail.com>
Date: Sun Sep 22 03:22:35 2019 -0500

    [dmenu][patch] morecolor: Additional color scheme for adjacent entries

diff --git a/tools.suckless.org/dmenu/patches/morecolor/dmenu-morecolor-20190922-4bf895b.diff b/tools.suckless.org/dmenu/patches/morecolor/dmenu-morecolor-20190922-4bf895b.diff
new file mode 100644
index 00000000..539e9c14
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/morecolor/dmenu-morecolor-20190922-4bf895b.diff
_AT_@ -0,0 +1,47 @@
+From 4bf895be219ae00394a5cde901dc43ec6dcb3759 Mon Sep 17 00:00:00 2001
+From: Tanner Babcock <babkock_AT_gmail.com>
+Date: Sun, 22 Sep 2019 03:07:26 -0500
+Subject: [PATCH] Additional color scheme, for adjacent entries
+
+---
+ config.def.h | 1 +
+ dmenu.c | 4 +++-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/config.def.h b/config.def.h
+index 1edb647..767c88f 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -12,6 +12,7 @@ static const char *colors[SchemeLast][2] = {
+ [SchemeNorm] = { "#bbbbbb", "#222222" },
+ [SchemeSel] = { "#eeeeee", "#005577" },
+ [SchemeOut] = { "#000000", "#00ffff" },
++ [SchemeMid] = { "#eeeeee", "#770000" },
+ };
+ /* -l option; if nonzero, dmenu uses vertical list with given number of lines */
+ static unsigned int lines = 0;
+diff --git a/dmenu.c b/dmenu.c
+index 65f25ce..0a5c08d 100644
+--- a/dmenu.c
++++ b/dmenu.c
+_AT_@ -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;
+_AT_@ -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
+
diff --git a/tools.suckless.org/dmenu/patches/morecolor/index.md b/tools.suckless.org/dmenu/patches/morecolor/index.md
new file mode 100644
index 00000000..2b6ce50a
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/morecolor/index.md
_AT_@ -0,0 +1,16 @@
+morecolor
+=========
+
+Description
+-----------
+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.
+
+Download
+--------
+* [dmenu-morecolor-20190922-4bf895b.diff](dmenu-morecolor-20190922-4bf895b.diff)
+
+Author
+------
+* Tanner Babcock <babkock at gmail dot com>
+
+
Received on Sun Sep 22 2019 - 10:47:01 CEST

This archive was generated by hypermail 2.3.0 : Sun Sep 22 2019 - 10:48:28 CEST