dwm-statusallmons-6.5.diff - sites - public wiki contents of suckless.org
(HTM) git clone git://git.suckless.org/sites
(DIR) Log
(DIR) Files
(DIR) Refs
---
dwm-statusallmons-6.5.diff (1027B)
---
1 From 8b5466b921242f0c83376c525d4a20b100a405f8 Mon Sep 17 00:00:00 2001
2 From: Bang Lee <qusicx@gmail.com>
3 Date: Thu, 22 May 2025 14:05:36 -0700
4 Subject: [PATCH] statusbar on all monitors
5
6 ---
7 dwm.c | 6 ++++--
8 1 file changed, 4 insertions(+), 2 deletions(-)
9
10 diff --git a/dwm.c b/dwm.c
11 index 2829160..725e68b 100644
12 --- a/dwm.c
13 +++ b/dwm.c
14 @@ -707,7 +707,7 @@ drawbar(Monitor *m)
15 return;
16
17 /* draw status first so it can be overdrawn by tags later */
18 - if (m == selmon) { /* status is only drawn on selected monitor */
19 + if (m == selmon || 1) { /* status is only drawn on selected monitor */
20 drw_setscheme(drw, scheme[SchemeNorm]);
21 tw = TEXTW(stext) - lrpad + 2; /* 2px right padding */
22 drw_text(drw, m->ww - tw, 0, tw, bh, 0, stext, 0);
23 @@ -2006,9 +2006,11 @@ updatesizehints(Client *c)
24 void
25 updatestatus(void)
26 {
27 + Monitor* m;
28 if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
29 strcpy(stext, "dwm-"VERSION);
30 - drawbar(selmon);
31 + for(m = mons; m; m = m->next)
32 + drawbar(m);
33 }
34
35 void
36 --
37 2.49.0
38