From 1d4a24dae02cfb3a3241c3d293e96dba910317bd Mon Sep 17 00:00:00 2001 From: Anselm R. Garbe Date: Mon, 8 Jan 2007 17:33:24 +0100 Subject: implemented nmaster appearance in mode label (using %u) --- main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index da209a9..c080ada 100644 --- a/main.c +++ b/main.c @@ -17,7 +17,7 @@ /* extern */ -char stext[1024]; +char stext[1024], mtext[32]; Bool *seltag; int bx, by, bw, bh, bmw, masterd, screen, sx, sy, sw, sh, wax, way, waw, wah; unsigned int master, nmaster, ntags, numlockmask; @@ -128,12 +128,13 @@ setup(void) { dc.status[ColFG] = getcolor(STATUSFGCOLOR); setfont(FONT); /* geometry */ - bmw = textw(TILESYMBOL) > textw(FLOATSYMBOL) ? textw(TILESYMBOL) : textw(FLOATSYMBOL); sx = sy = 0; sw = DisplayWidth(dpy, screen); sh = DisplayHeight(dpy, screen); master = MASTER; nmaster = NMASTER; + snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster); + bmw = textw(mtext); /* bar */ bx = sx; by = sy; -- cgit v1.2.3