From 20a405db2c404d54ecf81e361ef926ea6944d91d Mon Sep 17 00:00:00 2001 From: yuzu-eva Date: Sat, 20 Aug 2022 23:45:48 +0200 Subject: statusbar shown on all monitors --- dwm | Bin 69688 -> 69688 bytes dwm.c | 6 ++++-- dwm.o | Bin 58128 -> 58104 bytes patch/dwm-statusallmons-20160731-56a31dc.diff | 29 ++++++++++++++++++++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 patch/dwm-statusallmons-20160731-56a31dc.diff diff --git a/dwm b/dwm index 2cbd324..3758555 100755 Binary files a/dwm and b/dwm differ diff --git a/dwm.c b/dwm.c index 3bd6f5a..41e4487 100644 --- a/dwm.c +++ b/dwm.c @@ -710,7 +710,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 all monitors */ 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); @@ -1964,9 +1964,11 @@ 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 diff --git a/dwm.o b/dwm.o index dc57047..1b57bce 100644 Binary files a/dwm.o and b/dwm.o differ diff --git a/patch/dwm-statusallmons-20160731-56a31dc.diff b/patch/dwm-statusallmons-20160731-56a31dc.diff new file mode 100644 index 0000000..126d974 --- /dev/null +++ b/patch/dwm-statusallmons-20160731-56a31dc.diff @@ -0,0 +1,29 @@ +URL: http://dwm.suckless.org/patches/statusallmons +This patch draws and updates the statusbar on all monitors. + +Index: dwm/dwm.c +=================================================================== +--- dwm/dwm.c.orig ++++ dwm/dwm.c +@@ -715,7 +715,7 @@ drawbar(Monitor *m) + Client *c; + + /* 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]); + sw = TEXTW(stext) - lrpad / 2; /* no right padding so status text hugs the corner */ + drw_text(drw, m->ww - sw, 0, sw, bh, lrpad / 2 - 2, stext, 0); +@@ -1991,9 +1991,11 @@ updatetitle(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 -- cgit v1.2.3