changeset 11:da0e0496f75b

add "inverse" color set, for indicating in the status bar when in command mode
author paulo
date Tue, 18 Sep 2012 00:17:32 -0700
parents ed4f1bf80e57
children d65207f4021a
files config.h draw.c dwm.h main.c
diffstat 4 files changed, 8 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/config.h	Tue Jul 05 01:11:23 2011 -0700
     1.2 +++ b/config.h	Tue Sep 18 00:17:32 2012 -0700
     1.3 @@ -11,6 +11,9 @@
     1.4  #define SELBORDERCOLOR		"#ff0000"
     1.5  #define SELBGCOLOR		"#222222"
     1.6  #define SELFGCOLOR		"#00ff00"
     1.7 +#define INVBORDERCOLOR		"#aaaaaa"
     1.8 +#define INVBGCOLOR		"#007777"
     1.9 +#define INVFGCOLOR		"#dddd00"
    1.10  #define TOPBAR			True		/* False */
    1.11  #define TASKBAR			True		/* False */
    1.12  #define CLICK_TO_FOCUS			True		/* False */
     2.1 --- a/draw.c	Tue Jul 05 01:11:23 2011 -0700
     2.2 +++ b/draw.c	Tue Sep 18 00:17:32 2012 -0700
     2.3 @@ -90,7 +90,7 @@
     2.4  
     2.5  	if((dc.w = dc.x - x) > bh) {
     2.6  		dc.x = x;
     2.7 -		drawtext(sel ? sel->name : NULL, sel ? dc.sel : dc.norm);
     2.8 +		drawtext(sel ? sel->name : NULL, (getkeymode() == COMMANDMODE) ? dc.inv : (sel ? dc.sel : dc.norm));
     2.9  	}
    2.10  	XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, sw, bh, 0, 0);
    2.11  
     3.1 --- a/dwm.h	Tue Jul 05 01:11:23 2011 -0700
     3.2 +++ b/dwm.h	Tue Sep 18 00:17:32 2012 -0700
     3.3 @@ -60,6 +60,7 @@
     3.4  	int x, y, w, h;
     3.5  	unsigned long norm[ColLast];
     3.6  	unsigned long sel[ColLast];
     3.7 +	unsigned long inv[ColLast];
     3.8  	Drawable drawable;
     3.9  	Fnt font;
    3.10  	GC gc;
     4.1 --- a/main.c	Tue Jul 05 01:11:23 2011 -0700
     4.2 +++ b/main.c	Tue Sep 18 00:17:32 2012 -0700
     4.3 @@ -181,6 +181,9 @@
     4.4  	dc.sel[ColBorder] = initcolor(SELBORDERCOLOR);
     4.5  	dc.sel[ColBG] = initcolor(SELBGCOLOR);
     4.6  	dc.sel[ColFG] = initcolor(SELFGCOLOR);
     4.7 +	dc.inv[ColBorder] = initcolor(INVBORDERCOLOR);
     4.8 +	dc.inv[ColBG] = initcolor(INVBGCOLOR);
     4.9 +	dc.inv[ColFG] = initcolor(INVFGCOLOR);
    4.10  	initfont(FONT);
    4.11  	/* geometry */
    4.12  	sx = sy = 0;