From f79299bd086ca7cbafaf31d0d369b84a71983f47 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Wed, 9 Nov 2022 10:33:47 +0100 Subject: [PATCH] Apply statusallmons-6.2.diff --- dwm.c | 6 ++++-- patches/dwm-statusallmons-6.2.diff | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 patches/dwm-statusallmons-6.2.diff diff --git a/dwm.c b/dwm.c index e29d9e1..d2e3b8a 100644 --- a/dwm.c +++ b/dwm.c @@ -835,7 +835,7 @@ drawbar(Monitor *m) stw = getsystraywidth(); /* 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 + 2; /* 2px extra right padding */ drw_text(drw, m->ww - tw - stw, 0, tw, bh, lrpad / 2 - 2, stext, 0); @@ -2285,9 +2285,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); updatesystray(); } diff --git a/patches/dwm-statusallmons-6.2.diff b/patches/dwm-statusallmons-6.2.diff new file mode 100644 index 0000000..9d9633d --- /dev/null +++ b/patches/dwm-statusallmons-6.2.diff @@ -0,0 +1,25 @@ +diff -up a/dwm.c b/dwm.c +--- a/dwm.c 2020-07-09 16:49:10.023585649 +0200 ++++ b/dwm.c 2020-07-09 16:49:43.497542191 +0200 +@@ -702,7 +702,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; /* 2px right padding */ + drw_text(drw, m->ww - sw, 0, sw, bh, 0, stext, 0); +@@ -1987,9 +1987,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