Skip to content

Commit

Permalink
update colorfultag: simplify conditional checking for colorfultag config
Browse files Browse the repository at this point in the history
  • Loading branch information
fitrh committed Jun 4, 2021
1 parent 7b2208f commit 4e8cc1d
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions dwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1276,24 +1276,14 @@ drawbar(Monitor *m)
wdelta = m->alttag
? (TEXTW(tagsalt[i]) - TEXTW(tags[i])) / 2
: 0;
if (m->colorfultag)
drw_setscheme(
drw,
scheme[
m->tagset[m->seltags] & 1 << i
? tagschemes[i]
: SchemeTag
]
);
else
drw_setscheme(
drw,
scheme[
m->tagset[m->seltags] & 1 << i
? SchemeSel
: SchemeTag
]
);
drw_setscheme(
drw,
scheme[
m->tagset[m->seltags] & 1 << i
? (m->colorfultag ? tagschemes[i] : SchemeSel)
: SchemeTag
]
);
drw_text(
drw, x, 0,
w, bh, wdelta + lrpad / 2,
Expand Down

0 comments on commit 4e8cc1d

Please sign in to comment.