summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2022-03-30 23:32:01 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2022-03-30 23:32:01 -0400
commit9cd7e774ec9f2289d5310e9a6a95171126636a14 (patch)
tree5d2ef3c74a602122ae17ac4cf8e59c468572ee39 /dwm.c
parentbece862a0fc4fc18ef9065b18cd28e2032d0d975 (diff)
Mainmon - Main monitor for the statusbarmainmon
This small patch add a mainmon value to the config.def.h. It let's the user choose a monitor on which to have the statusbar show-up. The status will no longer follow which monitor is currently selected. It is especially usefull in two scenarios: - A monitor is setup vertically and has little room for the status. - Dwm is used in a public environment and it's user does not want the contents of the status bar to be shown (i.e. on a projector).
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index 5f16260..9cf08fb 100644
--- a/dwm.c
+++ b/dwm.c
@@ -707,7 +707,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 == &mons[mainmon]) { /* status is only drawn on main 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);