Compare commits
1 Commits
f90eea39df
...
3afd11471c
Author | SHA1 | Date | |
---|---|---|---|
|
3afd11471c |
35
dwm.c
35
dwm.c
@ -866,6 +866,7 @@ drawbar(Monitor *m)
|
|||||||
int boxs = drw->fonts->h / 9;
|
int boxs = drw->fonts->h / 9;
|
||||||
int boxw = drw->fonts->h / 6 + 2;
|
int boxw = drw->fonts->h / 6 + 2;
|
||||||
unsigned int i, occ = 0, urg = 0;
|
unsigned int i, occ = 0, urg = 0;
|
||||||
|
int mid;
|
||||||
Client *c;
|
Client *c;
|
||||||
|
|
||||||
if (!m->showbar)
|
if (!m->showbar)
|
||||||
@ -888,12 +889,15 @@ drawbar(Monitor *m)
|
|||||||
w = TEXTW(tags[i]);
|
w = TEXTW(tags[i]);
|
||||||
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeNorm : SchemeNorm]);
|
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeNorm : SchemeNorm]);
|
||||||
drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
|
drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
|
||||||
if (ulineall || m->tagset[m->seltags] & 1 << i) /* if there are conflicts, just move these lines directly underneath both 'drw_setscheme' and 'drw_text' :) */
|
|
||||||
drw_rect(drw, x + ulinepad, bh - ulinestroke - ulinevoffset, w - (ulinepad * 2), ulinestroke, 1, 0);
|
if (ulineall || m->tagset[m->seltags] & 1 << i) { /* if there are conflicts, just move these lines directly underneath both 'drw_setscheme' and 'drw_text' :) */
|
||||||
if (occ & 1 << i)
|
if (m == selmon)
|
||||||
drw_rect(drw, x + boxs, boxs, boxw, boxw,
|
drw_setscheme(drw, scheme[SchemeHid]);
|
||||||
m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
|
drw_rect(drw, x + w * 0.0675, bh - ulinestroke - ulinevoffset, w * 0.875, ulinestroke, 1, 0);
|
||||||
urg & 1 << i);
|
} else if (occ & 1 << i) {
|
||||||
|
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||||
|
drw_rect(drw, x + w * 0.375, bh - ulinestroke - ulinevoffset, w * 0.25, ulinestroke, 1, 0);
|
||||||
|
}
|
||||||
x += w;
|
x += w;
|
||||||
}
|
}
|
||||||
w = TEXTW(m->ltsymbol);
|
w = TEXTW(m->ltsymbol);
|
||||||
@ -910,9 +914,7 @@ drawbar(Monitor *m)
|
|||||||
for (c = m->clients; c; c = c->next) {
|
for (c = m->clients; c; c = c->next) {
|
||||||
if (!ISVISIBLE(c))
|
if (!ISVISIBLE(c))
|
||||||
continue;
|
continue;
|
||||||
if (m->sel == c && m == selmon)
|
if (HIDDEN(c))
|
||||||
scm = SchemeSel;
|
|
||||||
else if (HIDDEN(c))
|
|
||||||
scm = SchemeHid;
|
scm = SchemeHid;
|
||||||
else
|
else
|
||||||
scm = SchemeNorm;
|
scm = SchemeNorm;
|
||||||
@ -924,7 +926,20 @@ drawbar(Monitor *m)
|
|||||||
}
|
}
|
||||||
remainder--;
|
remainder--;
|
||||||
}
|
}
|
||||||
drw_text(drw, x, 0, tabw, bh, lrpad / 2, c->name, 0);
|
mid = (tabw - (int)TEXTW(c->name)) / 2;
|
||||||
|
mid = mid >= lrpad / 2 ? mid : lrpad / 2;
|
||||||
|
drw_text(drw, x, 0, tabw, bh, mid, c->name, 0);
|
||||||
|
|
||||||
|
if (!HIDDEN(c)) {
|
||||||
|
if (m->sel == c) {
|
||||||
|
if (m == selmon)
|
||||||
|
drw_setscheme(drw, scheme[SchemeHid]);
|
||||||
|
drw_rect(drw, x + tabw * 0.0675, bh - ulinestroke - ulinevoffset, tabw * 0.875 - ulinepad * 2, ulinestroke, 1, 0);
|
||||||
|
} else {
|
||||||
|
drw_rect(drw, x + tabw * 0.375, bh - ulinestroke - ulinevoffset, tabw * 0.25 - ulinepad * 2, ulinestroke, 1, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
x += tabw;
|
x += tabw;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user