changeset 71:7681ef838201

bar shows if currently is tiled (Mod1-space) or floating (Mod1-Shift-space) mode
author Anselm R. Garbe <garbeam@wmii.de>
date Fri, 14 Jul 2006 18:55:50 +0200
parents e5fff8249705
children d0eb0bb63c40
files bar.c client.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bar.c	Fri Jul 14 18:46:12 2006 +0200
+++ b/bar.c	Fri Jul 14 18:55:50 2006 +0200
@@ -23,11 +23,15 @@
 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;
--- a/client.c	Fri Jul 14 18:46:12 2006 +0200
+++ b/client.c	Fri Jul 14 18:55:50 2006 +0200
@@ -120,6 +120,7 @@
 			focus(sel);
 		}
 	}
+	draw_bar();
 }
 
 void
@@ -176,6 +177,7 @@
 			focus(sel);
 		}
 	}
+	draw_bar();
 }
 
 void