[dev] [dwm][patch] invert seltag colors

From: Suraj N. Kurapati <sunaku_AT_gmail.com>
Date: Tue, 20 Dec 2011 10:00:59 -0800

Hello,

This patch inverts colors when drawing currently selected tag.
( See a screenshot here: http://ompldr.org/vYnUyNg ). Cheers.

diff --git a/dwm.c b/dwm.c
index 1d78655..7b29955 100644
--- a/dwm.c
+++ b/dwm.c
_AT_@ -731,9 +731,10 @@ drawbar(Monitor *m) {
         for(i = 0; i < LENGTH(tags); i++) {
                 dc.w = TEXTW(tags[i]);
                 col = m->tagset[m->seltags] & 1 << i ? dc.sel :
dc.norm;
- drawtext(tags[i], col, urg & 1 << i);
+ Bool invert = col == dc.sel || urg & 1 << i;
+ drawtext(tags[i], col, invert);
                 drawsquare(m == selmon && selmon->sel &&
selmon->sel->tags & 1 << i,
- occ & 1 << i, urg & 1 << i, col);
+ occ & 1 << i, invert, col);
                 dc.x += dc.w;
         }
         dc.w = blw = TEXTW(m->ltsymbol);
-- 
A thing is not necessarily true because a man dies for it.
		-- Oscar Wilde, "The Portrait of Mr. W.H."
Received on Tue Dec 20 2011 - 19:00:59 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 20 2011 - 19:12:04 CET