diff options
Diffstat (limited to 'diffs')
-rw-r--r-- | diffs/dmenu-morecolor-20190922-4bf895b.diff | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/diffs/dmenu-morecolor-20190922-4bf895b.diff b/diffs/dmenu-morecolor-20190922-4bf895b.diff new file mode 100644 index 0000000..539e9c1 --- /dev/null +++ b/diffs/dmenu-morecolor-20190922-4bf895b.diff @@ -0,0 +1,47 @@ +From 4bf895be219ae00394a5cde901dc43ec6dcb3759 Mon Sep 17 00:00:00 2001 +From: Tanner Babcock <babkock@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 +@@ -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 +@@ -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 + |