statusallmon

This commit is contained in:
Zynh Ludwig 2024-11-23 09:42:23 -08:00
parent a8c151bccc
commit edb804a68d

4
dwm.c
View file

@ -829,7 +829,7 @@ drawbar(Monitor *m)
stw = getsystraywidth(); stw = getsystraywidth();
/* draw status first so it can be overdrawn by tags later */ /* 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]); drw_setscheme(drw, scheme[SchemeNorm]);
tw = TEXTW(stext) - lrpad / 2 + 2; /* 2px extra right padding */ tw = TEXTW(stext) - lrpad / 2 + 2; /* 2px extra right padding */
drw_text(drw, m->ww - tw - stw, 0, tw, bh, lrpad / 2 - 2, stext, 0); drw_text(drw, m->ww - tw - stw, 0, tw, bh, lrpad / 2 - 2, stext, 0);
@ -2268,8 +2268,10 @@ updatesizehints(Client *c)
void void
updatestatus(void) updatestatus(void)
{ {
Monitor* m;
if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
strcpy(stext, "dwm-"VERSION); strcpy(stext, "dwm-"VERSION);
for(m = mons; m; m=m->nextx)
drawbar(selmon); drawbar(selmon);
updatesystray(); updatesystray();
} }