Return to repo list

suckless-gf-dmenu

Gentoo-friendly patches for Suckless's dmenu.
Return to HMagellan.com

morecolor.patch (698B)


      1 diff --git a/dmenu.c b/dmenu.c
      2 index 65f25ce..0a5c08d 100644
      3 --- a/dmenu.c
      4 +++ b/dmenu.c
      5 @@ -26,7 +26,7 @@
      6  #define TEXTW(X)              (drw_fontset_getwidth(drw, (X)) + lrpad)
      7  
      8  /* enums */
      9 -enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */
     10 +enum { SchemeNorm, SchemeSel, SchemeOut, SchemeMid, SchemeLast }; /* color schemes */
     11  
     12  struct item {
     13  	char *text;
     14 @@ -118,6 +118,8 @@ drawitem(struct item *item, int x, int y, int w)
     15  {
     16  	if (item == sel)
     17  		drw_setscheme(drw, scheme[SchemeSel]);
     18 +	else if (item->left == sel || item->right == sel)
     19 +		drw_setscheme(drw, scheme[SchemeMid]);
     20  	else if (item->out)
     21  		drw_setscheme(drw, scheme[SchemeOut]);
     22  	else
     23 -- 
     24 2.23.0
     25