tbar shows if currently is tiled (Mod1-space) or floating (Mod1-Shift-space) mode - dwm - [fork] customized build of dwm, the dynamic window manager (HTM) git clone git://src.adamsgaard.dk/dwm (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 54775e0b3e48273240d8efa619af0ce85e3685da (DIR) parent 59b4a5e4cac68dfe6d245b8b708c3cb805f49f6d (HTM) Author: Anselm R. Garbe <garbeam@wmii.de> Date: Fri, 14 Jul 2006 18:55:50 +0200 bar shows if currently is tiled (Mod1-space) or floating (Mod1-Shift-space) mode Diffstat: M bar.c | 6 +++++- M client.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) --- (DIR) diff --git a/bar.c b/bar.c t@@ -23,11 +23,15 @@ void draw_bar() { int i; + char *mode = arrange == tiling ? "#" : "~"; + 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; (DIR) diff --git a/client.c b/client.c t@@ -120,6 +120,7 @@ floating(Arg *arg) focus(sel); } } + draw_bar(); } void t@@ -176,6 +177,7 @@ tiling(Arg *arg) focus(sel); } } + draw_bar(); } void