optimize code
This commit is contained in:
parent
5b0b793a96
commit
1bef7a3ff4
2
config.h
2
config.h
|
@ -37,7 +37,7 @@ static const char* bhev[] = { "firefox", "bhev.ru", NULL };
|
|||
|
||||
static const Launcher launchers[] = {
|
||||
/* command name to display */
|
||||
{ bhev, "SHRT" },
|
||||
{ bhev, "" },
|
||||
};
|
||||
|
||||
static const Rule rules[] = {
|
||||
|
|
7
dwm.c
7
dwm.c
|
@ -838,8 +838,6 @@ void
|
|||
drawbar(Monitor *m)
|
||||
{
|
||||
int x, w, tw = 0;
|
||||
int boxs = drw->fonts->h / 9;
|
||||
int boxw = drw->fonts->h / 6 + 2;
|
||||
unsigned int i, occ = 0, urg = 0;
|
||||
Client *c;
|
||||
|
||||
|
@ -862,9 +860,6 @@ 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 + boxs, boxs, boxw, boxw,
|
||||
// m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
|
||||
// urg & 1 << i);
|
||||
drw_rect(drw, x + w / 3, 0, w / 3, 2, 0, 0);
|
||||
drw_rect(drw, x + w / 3, bh - 2, w / 3, 2, 0, 0);
|
||||
if (m == selmon && selmon->sel && selmon->sel->tags & 1 << i) {
|
||||
|
@ -878,7 +873,7 @@ drawbar(Monitor *m)
|
|||
w = blw = TEXTW(m->ltsymbol);
|
||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
|
||||
|
||||
|
||||
for (i = 0; i < LENGTH(launchers); i++)
|
||||
{
|
||||
w = TEXTW(launchers[i].name);
|
||||
|
|
Loading…
Reference in New Issue