Added a different tag when there is a window

This commit is contained in:
pbentes
2025-05-04 20:40:35 +01:00
parent 812232094f
commit 8d107203ce
2 changed files with 5 additions and 4 deletions

View File

@ -24,6 +24,7 @@ static const char *colors[][3] = {
}; };
/* tagging */ /* tagging */
static const char *tag_with_window = "";
static const char *tags[] = { "", "", "", "", "", "", "", "", "" }; static const char *tags[] = { "", "", "", "", "", "", "", "", "" };
static const Rule rules[] = { static const Rule rules[] = {

8
dwm.c
View File

@ -727,11 +727,11 @@ drawbar(Monitor *m)
for (i = 0; i < LENGTH(tags); i++) { for (i = 0; i < LENGTH(tags); i++) {
w = TEXTW(tags[i]); w = TEXTW(tags[i]);
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); 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) if (occ & 1 << i)
drw_rect(drw, x + boxs, boxs, boxw, boxw, drw_text(drw, x, 0, w, bh, lrpad / 2, tag_with_window, urg & 1 << i);
m == selmon && selmon->sel && selmon->sel->tags & 1 << i, else
urg & 1 << i); drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
x += w; x += w;
} }
w = TEXTW(m->ltsymbol); w = TEXTW(m->ltsymbol);