aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-08-25 15:12:32 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-08-25 15:12:32 +0200
commitaa471f2d65688f8cf4944c073ff05224bfac8a9c (patch)
tree9f8a15537aae4b5899d58b5c626487bcdf980cd6
parentd37dfa1bedbfadb5d39aa1937e77d4fd44319018 (diff)
downloaddwm-aa471f2d65688f8cf4944c073ff05224bfac8a9c.tar.gz
dwm-aa471f2d65688f8cf4944c073ff05224bfac8a9c.tar.bz2
dwm-aa471f2d65688f8cf4944c073ff05224bfac8a9c.zip
removed a bunch of lines, made mode symbols configurable
-rw-r--r--config.arg.h2
-rw-r--r--config.default.h2
-rw-r--r--draw.c9
-rw-r--r--main.c2
4 files changed, 7 insertions, 8 deletions
diff --git a/config.arg.h b/config.arg.h
index 9423833..76f5fcc 100644
--- a/config.arg.h
+++ b/config.arg.h
@@ -15,6 +15,8 @@ const char *tags[] = { "work", "net", "fnord", NULL };
#define NORMFGCOLOR "#cccccc"
#define STATUSBGCOLOR "#dddddd"
#define STATUSFGCOLOR "#222222"
+#define FLOATSYMBOL "><"
+#define TILEDSYMBOL "|="
#define MODKEY Mod1Mask
#define MASTERW 60 /* percent */
diff --git a/config.default.h b/config.default.h
index 7716916..ed09158 100644
--- a/config.default.h
+++ b/config.default.h
@@ -15,6 +15,8 @@ const char *tags[] = { "1", "2", "3", "4", "5", NULL };
#define NORMFGCOLOR "#cccccc"
#define STATUSBGCOLOR "#dddddd"
#define STATUSFGCOLOR "#222222"
+#define FLOATSYMBOL "~"
+#define TILEDSYMBOL "#"
#define MODKEY Mod1Mask
#define MASTERW 60 /* percent */
diff --git a/draw.c b/draw.c
index fb4ba2e..d32e888 100644
--- a/draw.c
+++ b/draw.c
@@ -94,18 +94,13 @@ drawall()
void
drawstatus()
{
- static const char *mode[] = { "><", "|=" };
int i, x;
dc.x = dc.y = 0;
dc.w = bw;
- if(!modew)
- modew = textw(mode[0]) > textw(mode[1]) ? textw(mode[0]) : textw(mode[1]);
- drawtext(mode[arrange == dotile ? 1 : 0], dc.status, False);
-
- dc.w = 0;
- dc.x = modew;
+ drawtext(arrange == dotile ? TILEDSYMBOL : FLOATSYMBOL, dc.status, False);
+ dc.w = modew;
for(i = 0; i < ntags; i++) {
dc.x += dc.w;
dc.w = textw(tags[i]);
diff --git a/main.c b/main.c
index 0727c2a..7ada114 100644
--- a/main.c
+++ b/main.c
@@ -129,7 +129,7 @@ setup()
dc.status[ColFG] = getcolor(STATUSFGCOLOR);
setfont(FONT);
- modew = 0;
+ modew = textw(FLOATSYMBOL) > textw(TILEDSYMBOL) ? textw(FLOATSYMBOL) : textw(TILEDSYMBOL);
sx = sy = 0;
sw = DisplayWidth(dpy, screen);
sh = DisplayHeight(dpy, screen);