1
0
mirror of https://github.com/tiyn/dwm.git synced 2026-01-02 07:29:47 +01:00

alttagsdecoration removed

This commit is contained in:
2023-10-23 03:25:57 +02:00
parent 920f45062d
commit bf8cdd278a
2 changed files with 10 additions and 79 deletions

22
dwm.c
View File

@@ -483,7 +483,7 @@ attachstack(Client *c)
void
buttonpress(XEvent *e)
{
unsigned int i, x, click, occ;
unsigned int i, x, click;
Arg arg = {0};
Client *c;
Monitor *m;
@@ -497,13 +497,9 @@ buttonpress(XEvent *e)
focus(NULL);
}
if (ev->window == selmon->barwin) {
i = x = occ = 0;
/* Bitmask of occupied tags */
for (c = m->clients; c; c = c->next)
occ |= c->tags;
i = x = 0;
do
x += TEXTW(occ & 1 << i ? alttags[i] : tags[i]);
x += TEXTW(tags[i]);
while (ev->x >= x && ++i < LENGTH(tags));
if (i < LENGTH(tags)) {
click = ClkTagBar;
@@ -1011,7 +1007,6 @@ drawbar(Monitor *m)
int boxs = drw->fonts->h / 9;
int boxw = drw->fonts->h / 6 + 2;
unsigned int i, occ = 0, urg = 0;
const char *tagtext;
Client *c;
if(showsystray && m == systraytomon(m))
@@ -1030,10 +1025,13 @@ drawbar(Monitor *m)
}
x = 0;
for (i = 0; i < LENGTH(tags); i++) {
tagtext = occ & 1 << i ? alttags[i] : tags[i];
w = TEXTW(tagtext);
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
drw_text(drw, x, 0, w, bh, lrpad / 2, tagtext, urg & 1 << i);
w = TEXTW(tags[i]);
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 + boxs, boxs, boxw, boxw,
m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
urg & 1 << i);
x += w;
}
w = blw = TEXTW(m->ltsymbol);