patch: render statusbar on all monitors

This commit is contained in:
krolxon 2025-02-05 19:00:55 +05:30
parent 2b48de6da8
commit d656b80de1
3 changed files with 7 additions and 4 deletions

View File

@ -17,8 +17,8 @@ static char normbgcolor[] = "#222222";
static char normbordercolor[] = "#444444";
static char normfgcolor[] = "#bbbbbb";
static char selfgcolor[] = "#eeeeee";
static char selbordercolor[] = "#224488";
static char selbgcolor[] = "#224488";
static char selbordercolor[] = "#9D4343";
static char selbgcolor[] = "#9D4343";
static char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor },

BIN
dwm

Binary file not shown.

7
dwm.c
View File

@ -761,7 +761,7 @@ drawbar(Monitor *m)
return;
/* draw status first so it can be overdrawn by tags later */
if (m == selmon) { /* status is only drawn on selected monitor */
if (m == selmon || 1) { /* status is only drawn on selected monitor */
drw_setscheme(drw, scheme[SchemeNorm]);
tw = TEXTW(stext) - lrpad + 2; /* 2px right padding */
drw_text(drw, m->ww - tw, 0, tw, bh, 0, stext, 0);
@ -2169,9 +2169,12 @@ updatesizehints(Client *c)
void
updatestatus(void)
{
Monitor *m;
if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
strcpy(stext, "dwm-"VERSION);
drawbar(selmon);
for(m = mons; m; m = m->next) {
drawbar(m);
}
}
void