aewl

diff main.c @ 674:5d79c351e30a

implemented nmaster appearance in mode label (using %u)
author Anselm R. Garbe <arg@suckless.org>
date Mon, 08 Jan 2007 17:33:24 +0100
parents f3b8c71a69d4
children 1438e35b622e
line diff
     1.1 --- a/main.c	Mon Jan 08 13:01:37 2007 +0100
     1.2 +++ b/main.c	Mon Jan 08 17:33:24 2007 +0100
     1.3 @@ -17,7 +17,7 @@
     1.4  
     1.5  /* extern */
     1.6  
     1.7 -char stext[1024];
     1.8 +char stext[1024], mtext[32];
     1.9  Bool *seltag;
    1.10  int bx, by, bw, bh, bmw, masterd, screen, sx, sy, sw, sh, wax, way, waw, wah;
    1.11  unsigned int master, nmaster, ntags, numlockmask;
    1.12 @@ -128,12 +128,13 @@
    1.13  	dc.status[ColFG] = getcolor(STATUSFGCOLOR);
    1.14  	setfont(FONT);
    1.15  	/* geometry */
    1.16 -	bmw = textw(TILESYMBOL) > textw(FLOATSYMBOL) ?  textw(TILESYMBOL) : textw(FLOATSYMBOL);
    1.17  	sx = sy = 0;
    1.18  	sw = DisplayWidth(dpy, screen);
    1.19  	sh = DisplayHeight(dpy, screen);
    1.20  	master = MASTER;
    1.21  	nmaster = NMASTER;
    1.22 +	snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster);
    1.23 +	bmw = textw(mtext);
    1.24  	/* bar */
    1.25  	bx = sx;
    1.26  	by = sy;