dwm

dynamic window manager - with my changes
git clone https://pi.duncano.de/git/dwm.git
Log | Files | Refs | README | LICENSE

commit 0820d8557d38596edba49a6f24d3dc228483d6e2
parent 46cf9924b8cd93c74a287f616cfc9d6e353f4daa
Author: Duncaen <mail@duncano.de>
Date:   Fri, 10 Feb 2017 18:49:25 +0100

add urgent color scheme

Diffstat:
dwm.c | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/dwm.c b/dwm.c @@ -60,7 +60,7 @@ /* enums */ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ -enum { SchemeNorm, SchemeSel }; /* color schemes */ +enum { SchemeNorm, SchemeSel, SchemeUrg }; /* color schemes */ enum { NetSupported, NetWMName, NetWMState, NetSupportingWMCheck, NetWMCheck, NetWMFullscreen, NetActiveWindow, NetWMWindowType, NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ @@ -726,12 +726,11 @@ drawbar(Monitor *m) x = 0; for (i = 0; i < LENGTH(tags); i++) { w = TEXTW(tags[i]); - drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); - drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i); + drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : urg & 1 << i ? SchemeUrg : SchemeNorm]); + drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], 0); if (occ & 1 << i) drw_rect(drw, x + boxs, boxs, boxw, boxw, - m == selmon && selmon->sel && selmon->sel->tags & 1 << i, - urg & 1 << i); + m == selmon && selmon->sel && selmon->sel->tags & 1 << i, 0); x += w; } w = blw = TEXTW(m->ltsymbol); @@ -2066,8 +2065,11 @@ updatewmhints(Client *c) if (c == selmon->sel && wmh->flags & XUrgencyHint) { wmh->flags &= ~XUrgencyHint; XSetWMHints(dpy, c->win, wmh); - } else + } else { c->isurgent = (wmh->flags & XUrgencyHint) ? 1 : 0; + if (c->isurgent) + XSetWindowBorder(dpy, c->win, scheme[SchemeUrg][ColBorder].pixel); + } if (wmh->flags & InputHint) c->neverfocus = !wmh->input; else