dwm

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

commit 771904c96a9e67150f8cbb2a7199c256bc1eb45e
parent 22c5db66660ea75607f635043af176bf0ccafea7
Author: hhvn <dev@hhvn.uk>
Date:   Mon,  7 Feb 2022 15:04:31 +0000

config.h dwm.c: rejig tags

Diffstat:
Mconfig.h | 2+-
Mdwm.c | 5++++-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/config.h b/config.h @@ -26,7 +26,7 @@ static const char *colors[][3] = { }; /* tagging */ -static const char *tags[] = { "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX" }; +static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; static const Rule rules[] = { { "Gimp", NULL, NULL, 1 << 7, 0, 0 }, diff --git a/dwm.c b/dwm.c @@ -813,6 +813,7 @@ drawstatusbar(Monitor *m, int bh, char* stext) { void drawbar(Monitor *m) { + XWindowAttributes attr; int x, w, sw = 0, n = 0, scm; int boxs = drw->fonts->h / 9; int boxw = drw->fonts->h / 6 + 2; @@ -820,6 +821,8 @@ drawbar(Monitor *m) char layout[16]; Client *c; + XGetWindowAttributes(dpy, m->barwin, &attr); + /* draw status first so it can be overdrawn by tags later */ drw_setscheme(drw, scheme[SchemeSel]); sw = m->ww - drawstatusbar(m, bh, stext); @@ -840,7 +843,7 @@ drawbar(Monitor *m) 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); if (occ & 1 << i) - drw_rect(drw, x + 2*boxs, 9*boxs, boxw, boxw, + drw_rect(drw, x + boxs, attr.height - boxw - boxs, boxw, boxw, m == selmon && selmon->sel && selmon->sel->tags & 1 << i, urg & 1 << i); x += w;