anybar: misc improvements ref. #118

This commit is contained in:
bakkeby
2021-04-28 10:52:59 +02:00
parent eb66da79ca
commit 4bfda0327c
3 changed files with 19 additions and 13 deletions

7
dwm.c
View File

@ -4284,6 +4284,10 @@ updatebarpos(Monitor *m)
for (bar = m->bar; bar; bar = bar->next) {
bar->bx = m->wx + x_pad;
#if BAR_ANYBAR_PATCH && !BAR_ANYBAR_MANAGE_WIDTH_PATCH
if (bar->external)
continue;
#endif // BAR_ANYBAR_PATCH | BAR_ANYBAR_MANAGE_WIDTH_PATCH
bar->bw = m->ww - 2 * x_pad;
}
@ -4316,9 +4320,8 @@ updatebarpos(Monitor *m)
if (bar->topbar)
m->wy = m->wy + bar->bh + y_pad;
m->wh -= y_pad + bar->bh;
}
for (bar = m->bar; bar; bar = bar->next)
bar->by = (bar->topbar ? m->wy - bar->bh : m->wy + m->wh);
}
}
void