JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
bar shows if currently is tiled (Mod1-space) or floating (Mod1-Shift-space) mode
authorAnselm R. Garbe <garbeam@wmii.de>
Fri, 14 Jul 2006 16:55:50 +0000 (18:55 +0200)
committerAnselm R. Garbe <garbeam@wmii.de>
Fri, 14 Jul 2006 16:55:50 +0000 (18:55 +0200)
bar.c
client.c

diff --git a/bar.c b/bar.c
index 611c669..953ac6b 100644 (file)
--- a/bar.c
+++ b/bar.c
@@ -23,11 +23,15 @@ void
 draw_bar()
 {
        int i;
 draw_bar()
 {
        int i;
+       char *mode = arrange == tiling ? "#" : "~";
+
        dc.x = dc.y = 0;
        dc.w = bw;
        drawtext(NULL, False, False);
 
        dc.x = dc.y = 0;
        dc.w = bw;
        drawtext(NULL, False, False);
 
-       dc.w = 0;
+       dc.w = textw(mode) + dc.font.height;
+       drawtext(mode, True, True);
+
        for(i = 0; i < TLast; i++) {
                dc.x += dc.w;
                dc.w = textw(tags[i]) + dc.font.height;
        for(i = 0; i < TLast; i++) {
                dc.x += dc.w;
                dc.w = textw(tags[i]) + dc.font.height;
index 487cb0c..5b666c9 100644 (file)
--- a/client.c
+++ b/client.c
@@ -120,6 +120,7 @@ floating(Arg *arg)
                        focus(sel);
                }
        }
                        focus(sel);
                }
        }
+       draw_bar();
 }
 
 void
 }
 
 void
@@ -176,6 +177,7 @@ tiling(Arg *arg)
                        focus(sel);
                }
        }
                        focus(sel);
                }
        }
+       draw_bar();
 }
 
 void
 }
 
 void