comparison bar.c @ 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 50450aa24a46
children d0eb0bb63c40
comparison
equal deleted inserted replaced
70:e5fff8249705 71:7681ef838201
21 21
22 void 22 void
23 draw_bar() 23 draw_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;
34 drawtext(tags[i], i == tsel, True); 38 drawtext(tags[i], i == tsel, True);
35 } 39 }