--- a/config.arg.h Sun Jan 14 22:27:29 2007 +0100
+++ b/config.arg.h Sun Jan 14 22:32:26 2007 +0100
@@ -7,7 +7,7 @@
#define DEFMODE dotile /* dofloat */
#define FLOATSYMBOL "><>"
-#define TILESYMBOL "[%u]=" /* %u is replaced with nmaster */
+#define TILESYMBOL "[]="
#define FONT "-*-terminus-medium-r-*-*-14-*-*-*-*-*-*-*"
#define NORMBGCOLOR "#222"
--- a/config.default.h Sun Jan 14 22:27:29 2007 +0100
+++ b/config.default.h Sun Jan 14 22:32:26 2007 +0100
@@ -7,7 +7,7 @@
#define DEFMODE dotile /* dofloat */
#define FLOATSYMBOL "><>"
-#define TILESYMBOL "[%u]=" /* %u is replaced with nmaster */
+#define TILESYMBOL "[]="
#define FONT "-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*"
#define NORMBGCOLOR "#333366"
--- a/draw.c Sun Jan 14 22:27:29 2007 +0100
+++ b/draw.c Sun Jan 14 22:32:26 2007 +0100
@@ -120,7 +120,7 @@
dc.x += dc.w;
}
dc.w = bmw;
- drawtext(mtext, dc.status, False, False);
+ drawtext(arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, dc.status, False, False);
x = dc.x + dc.w;
dc.w = textw(stext);
dc.x = bw - dc.w;
--- a/dwm.h Sun Jan 14 22:27:29 2007 +0100
+++ b/dwm.h Sun Jan 14 22:32:26 2007 +0100
@@ -90,8 +90,7 @@
};
extern const char *tags[]; /* all tags */
-extern char stext[1024]; /* status text */
-extern char mtext[32]; /* mode text */
+extern char stext[256]; /* status text */
extern int bx, by, bw, bh, bmw; /* bar geometry, bar mode label width */
extern int screen, sx, sy, sw, sh; /* screen geometry */
extern int wax, way, wah, waw; /* windowarea geometry */
@@ -163,6 +162,5 @@
extern void togglefloat(Arg *arg); /* toggles focusesd client between floating/non-floating state */
extern void togglemode(Arg *arg); /* toggles global arrange function (dotile/dofloat) */
extern void toggleview(Arg *arg); /* toggles the tag with arg's index (in)visible */
-extern void updatemodetext(void); /* updates mtext */
extern void view(Arg *arg); /* views the tag with arg's index */
extern void zoom(Arg *arg); /* zooms the focused client to master area, arg is ignored */
--- a/main.c Sun Jan 14 22:27:29 2007 +0100
+++ b/main.c Sun Jan 14 22:32:26 2007 +0100
@@ -17,7 +17,7 @@
/* extern */
-char stext[1024], mtext[32];
+char stext[256];
Bool *seltag;
int bx, by, bw, bh, bmw, masterd, screen, sx, sy, sw, sh, wax, way, waw, wah;
unsigned int master, nmaster, ntags, numlockmask;
@@ -134,7 +134,7 @@
sh = DisplayHeight(dpy, screen);
master = MASTER;
nmaster = NMASTER;
- updatemodetext();
+ bmw = textw(TILESYMBOL) > textw(FLOATSYMBOL) ? textw(TILESYMBOL) : textw(FLOATSYMBOL);
/* bar */
bx = sx;
by = sy;
--- a/view.c Sun Jan 14 22:27:29 2007 +0100
+++ b/view.c Sun Jan 14 22:32:26 2007 +0100
@@ -152,7 +152,6 @@
if((arrange == dofloat) || (nmaster + arg->i < 1) || (wah / (nmaster + arg->i) < bh))
return;
nmaster += arg->i;
- updatemodetext();
if(sel)
arrange();
else
@@ -217,7 +216,6 @@
void
togglemode(Arg *arg) {
arrange = (arrange == dofloat) ? dotile : dofloat;
- updatemodetext();
if(sel)
arrange();
else
@@ -236,12 +234,6 @@
}
void
-updatemodetext() {
- snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster);
- bmw = textw(mtext);
-}
-
-void
view(Arg *arg) {
unsigned int i;