optimize code

This commit is contained in:
Linux User 2022-09-27 22:03:38 +00:00
parent 5b0b793a96
commit 1bef7a3ff4
4 changed files with 2 additions and 7 deletions

View File

@ -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[] = {

BIN
dwm

Binary file not shown.

7
dwm.c
View File

@ -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);

BIN
dwm.o

Binary file not shown.