sites

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

dwm-statusallmons-5.8.2.diff (911B)


      1 --- ../dwm-5.8.2/dwm.c	2011-03-18 09:51:10.000000000 +0100
      2 +++ ./dwm.c	2011-03-18 09:52:15.000000000 +0100
      3 @@ -700,17 +700,13 @@ drawbar(Monitor *m) {
      4  	drawtext(m->ltsymbol, dc.norm, False);
      5  	dc.x += dc.w;
      6  	x = dc.x;
      7 -	if(m == selmon) { /* status is only drawn on selected monitor */
      8 -		dc.w = TEXTW(stext);
      9 -		dc.x = m->ww - dc.w;
     10 -		if(dc.x < x) {
     11 -			dc.x = x;
     12 -			dc.w = m->ww - x;
     13 -		}
     14 -		drawtext(stext, dc.norm, False);
     15 +	dc.w = TEXTW(stext);
     16 +	dc.x = m->ww - dc.w;
     17 +	if(dc.x < x) {
     18 +		dc.x = x;
     19 +		dc.w = m->ww - x;
     20  	}
     21 -	else
     22 -		dc.x = m->ww;
     23 +	drawtext(stext, dc.norm, False);
     24  	if((dc.w = dc.x - x) > bh) {
     25  		dc.x = x;
     26  		if(m->sel) {
     27 @@ -1917,9 +1913,11 @@ updatetitle(Client *c) {
     28  
     29  void
     30  updatestatus(void) {
     31 +	Monitor* m;
     32  	if(!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
     33  		strcpy(stext, "dwm-"VERSION);
     34 -	drawbar(selmon);
     35 +	for(m = mons; m; m = m->next)
     36 +		drawbar(m);
     37  }
     38  
     39  void