dwm

[fork] dynamic window manager
Log | Files | Refs | README | LICENSE

commit f081e123764bfcb2cd88e102c530357917160807
parent 08694ed9fd04ea671c01aa8b290bd82a386044cd
Author: hhvn <dev@hhvn.uk>
Date:   Wed, 23 Mar 2022 13:54:23 +0000

Highlight urgent windows in titlebar

Diffstat:
Mdwm.c | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/dwm.c b/dwm.c @@ -836,15 +836,16 @@ drawbar(Monitor *m) x = 0; for (i = 0; i < LENGTH(tags); i++) { w = TEXTW(tags[i]); + scm = m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm; if (urg & 1 << i) drw_setscheme(drw, scheme[SchemeUrgent]); else - 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[scm]); + drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], 0); + drw_setscheme(drw, scheme[scm]); if (occ & 1 << i) drw_rect(drw, x + boxs, attr.height - boxw - 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; } @@ -862,6 +863,8 @@ drawbar(Monitor *m) continue; if (m->sel == c && m == selmon) scm = SchemeSel; + else if (c->isurgent) + scm = SchemeUrgent; else scm = SchemeInact; drw_setscheme(drw, scheme[scm]);