JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
added symbols for different modes
[dwm.git] / main.c
diff --git a/main.c b/main.c
index 7cd3a32..6de4f8a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -19,7 +19,7 @@
 
 char stext[1024];
 Bool *seltag;
-int bx, by, bw, bh, bmw, mw, screen, sx, sy, sw, sh;
+int bx, by, bw, bh, bmw, master, screen, sx, sy, sw, sh;
 unsigned int ntags, numlockmask;
 Atom wmatom[WMLast], netatom[NetLast];
 Bool running = True;
@@ -128,12 +128,15 @@ setup(void) {
        dc.status[ColBG] = getcolor(STATUSBGCOLOR);
        dc.status[ColFG] = getcolor(STATUSFGCOLOR);
        setfont(FONT);
-
-       bmw = textw(FLOATSYMBOL) > textw(TILESYMBOL) ? textw(FLOATSYMBOL) : textw(TILESYMBOL);
+       bmw = textw(VSTACKSYMBOL) > textw(BSTACKSYMBOL) ?
+               textw(VSTACKSYMBOL) : textw(BSTACKSYMBOL);
+       bmw = bmw > textw(FLOATSYMBOL) ?
+               bmw : textw(FLOATSYMBOL);
        sx = sy = 0;
        sw = DisplayWidth(dpy, screen);
        sh = DisplayHeight(dpy, screen);
-       mw = (sw * MASTERW) / 100;
+       master = ((stackpos == StackBottom ? sh - bh : sw) * MASTER) / 100;
 
        bx = by = 0;
        bw = sw;