commit a6a216f28cbc49afaace269c2662382a351fda24 from: Anselm R Garbe date: Mon Mar 24 13:33:32 2008 UTC geom indicator and layout indicator is only displayed if there are several geoms/layouts commit - 2c2063bc751d2b0db815c26734f186e64f0b9c12 commit + a6a216f28cbc49afaace269c2662382a351fda24 blob - 5a99b7f6212a7c9909fbe0cc06e613d9f36104ed blob + b62e9380324fa9ef7130259c17be69b5d6007f09 --- config.def.h +++ config.def.h @@ -15,10 +15,7 @@ const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", " Rule rules[] = { /* class instance title tags ref isfloating */ - { NULL, NULL, "Firefox", tags[8], False }, - { NULL, NULL, "Gimp", NULL, True }, - { NULL, NULL, "MPlayer", NULL, True }, - { NULL, NULL, "Acroread", NULL, True }, + { "Gimp", NULL, NULL, NULL, True }, }; /* geometries, s{x,y,w,h} and bh are already initualized here */ blob - 0e72c47a5d379ff8f2179ff43ecb1914356b7673 blob + 54d021f460bf01319b5f8a8bfbd4ca1c2c8f9bb2 --- dwm.c +++ dwm.c @@ -517,9 +517,11 @@ drawbar(void) { Client *c; dc.x = 0; - dc.w = bgw; - drawtext(geom->symbol, dc.norm, False); - dc.x += bgw; + if(bgw > 0) { + dc.w = bgw; + drawtext(geom->symbol, dc.norm, False); + dc.x += bgw; + } for(c = stack; c && !isvisible(c); c = c->snext); for(i = 0; i < LENGTH(tags); i++) { dc.w = textw(tags[i]); @@ -533,9 +535,13 @@ drawbar(void) { } dc.x += dc.w; } - dc.w = blw; - drawtext(lt->symbol, dc.norm, False); - x = dc.x + dc.w; + if(blw > 0) { + dc.w = blw; + drawtext(lt->symbol, dc.norm, False); + x = dc.x + dc.w; + } + else + x = dc.x; dc.w = textw(stext); dc.x = bw - dc.w; if(dc.x < x) { @@ -1502,12 +1508,12 @@ setup(void) { lt = &layouts[0]; /* init bar */ - for(blw = i = 0; i < LENGTH(layouts); i++) { + for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) { w = textw(layouts[i].symbol); if(w > blw) blw = w; } - for(bgw = i = 0; i < LENGTH(geoms); i++) { + for(bgw = i = 0; LENGTH(geoms) > 1 && i < LENGTH(geoms); i++) { w = textw(geoms[i].symbol); if(w > bgw) bgw = w;