summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-14 18:55:50 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-14 18:55:50 +0200
commit54775e0b3e48273240d8efa619af0ce85e3685da (patch)
treec2646e14f7c57e53e2cb3791db014d73227a7a46
parentdraw bar on exposure ;) (diff)
downloaddwm-54775e0b3e48273240d8efa619af0ce85e3685da.tar.gz
dwm-54775e0b3e48273240d8efa619af0ce85e3685da.zip
bar shows if currently is tiled (Mod1-space) or floating (Mod1-Shift-space) mode
-rw-r--r--bar.c6
-rw-r--r--client.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/bar.c b/bar.c
index 611c669..953ac6b 100644
--- a/bar.c
+++ b/bar.c
@@ -23,11 +23,15 @@ void
23draw_bar() 23draw_bar()
24{ 24{
25 int i; 25 int i;
26 char *mode = arrange == tiling ? "#" : "~";
27
26 dc.x = dc.y = 0; 28 dc.x = dc.y = 0;
27 dc.w = bw; 29 dc.w = bw;
28 drawtext(NULL, False, False); 30 drawtext(NULL, False, False);
29 31
30 dc.w = 0; 32 dc.w = textw(mode) + dc.font.height;
33 drawtext(mode, True, True);
34
31 for(i = 0; i < TLast; i++) { 35 for(i = 0; i < TLast; i++) {
32 dc.x += dc.w; 36 dc.x += dc.w;
33 dc.w = textw(tags[i]) + dc.font.height; 37 dc.w = textw(tags[i]) + dc.font.height;
diff --git a/client.c b/client.c
index 487cb0c..5b666c9 100644
--- a/client.c
+++ b/client.c
@@ -120,6 +120,7 @@ floating(Arg *arg)
120 focus(sel); 120 focus(sel);
121 } 121 }
122 } 122 }
123 draw_bar();
123} 124}
124 125
125void 126void
@@ -176,6 +177,7 @@ tiling(Arg *arg)
176 focus(sel); 177 focus(sel);
177 } 178 }
178 } 179 }
180 draw_bar();
179} 181}
180 182
181void 183void