sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

dwm-statusallmons-20160731-56a31dc.diff (945B)


      1 URL: http://dwm.suckless.org/patches/statusallmons
      2 This patch draws and updates the statusbar on all monitors.
      3 
      4 Index: dwm/dwm.c
      5 ===================================================================
      6 --- dwm/dwm.c.orig
      7 +++ dwm/dwm.c
      8 @@ -715,7 +715,7 @@ drawbar(Monitor *m)
      9  	Client *c;
     10  
     11  	/* draw status first so it can be overdrawn by tags later */
     12 -	if (m == selmon) { /* status is only drawn on selected monitor */
     13 +	if (m == selmon || 1) { /* status is only drawn on selected monitor */
     14  		drw_setscheme(drw, scheme[SchemeNorm]);
     15  		sw = TEXTW(stext) - lrpad / 2; /* no right padding so status text hugs the corner */
     16  		drw_text(drw, m->ww - sw, 0, sw, bh, lrpad / 2 - 2, stext, 0);
     17 @@ -1991,9 +1991,11 @@ updatetitle(Client *c)
     18  void
     19  updatestatus(void)
     20  {
     21 +	Monitor* m;
     22  	if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
     23  		strcpy(stext, "dwm-"VERSION);
     24 -	drawbar(selmon);
     25 +	for(m = mons; m; m = m->next)
     26 +		drawbar(m);
     27  }
     28  
     29  void