commit 9bc22717ca656a99ca3966128c01b1c4ed32a8c9
parent 414b5f8144232968037396801e05759cb5255d6e
Author: hhvn <hayden@haydenvh.com>
Date: Sun, 22 Nov 2020 13:16:46 +0000
dwm.c: fix title section
Diffstat:
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dwm.c b/dwm.c
@@ -819,8 +819,15 @@ drawbar(Monitor *m)
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
if ((w = m->ww - sw - x) > bh) {
- drw_setscheme(drw, scheme[SchemeNorm]);
- drw_rect(drw, x, 0, w - 2*sidepad, bh, 1, 1);
+ if (m->sel) {
+ drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
+ drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
+ if (m->sel->isfloating)
+ drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
+ } else {
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_rect(drw, x, 0, w, bh, 1, 1);
+ }
}
drw_map(drw, m->barwin, 0, 0, m->ww, bh);
}