dmenu-colored-caret-5.2.diff (1212B)
1 config.def.h | 1 + 2 dmenu.c | 4 ++-- 3 3 files changed, 4 insertions(+), 3 deletions(-) 4 5 diff --git a/config.def.h b/config.def.h 6 index 1edb647..b41a8f0 100644 7 --- a/config.def.h 8 +++ b/config.def.h 9 @@ -12,6 +12,7 @@ static const char *colors[SchemeLast][2] = { 10 [SchemeNorm] = { "#bbbbbb", "#222222" }, 11 [SchemeSel] = { "#eeeeee", "#005577" }, 12 [SchemeOut] = { "#000000", "#00ffff" }, 13 + [SchemeCaret] = { "#eeeeee", "#222222" }, 14 }; 15 /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ 16 static unsigned int lines = 0; 17 18 diff --git a/dmenu.c b/dmenu.c 19 index 98507d9..fd916d7 100644 20 --- a/dmenu.c 21 +++ b/dmenu.c 22 @@ -26,7 +26,7 @@ 23 #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) 24 25 /* enums */ 26 -enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */ 27 +enum { SchemeNorm, SchemeSel, SchemeOut, SchemeCaret, SchemeLast }; /* color schemes */ 28 29 struct item { 30 char *text; 31 @@ -147,7 +147,7 @@ drawmenu(void) 32 33 curpos = TEXTW(text) - TEXTW(&text[cursor]); 34 if ((curpos += lrpad / 2 - 1) < w) { 35 - drw_setscheme(drw, scheme[SchemeNorm]); 36 + drw_setscheme(drw, scheme[SchemeCaret]); 37 drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0); 38 }