Introduction
Introduction Statistics Contact Development Disclaimer Help
tgeom indicator and layout indicator is only displayed if there are several geo…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit a6a216f28cbc49afaace269c2662382a351fda24
parent 2c2063bc751d2b0db815c26734f186e64f0b9c12
Author: Anselm R Garbe <[email protected]>
Date: Mon, 24 Mar 2008 13:33:32 +0000
geom indicator and layout indicator is only displayed if there are several geom…
Diffstat:
M config.def.h | 5 +----
M dwm.c | 22 ++++++++++++++--------
2 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/config.def.h b/config.def.h
t@@ -15,10 +15,7 @@ const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "…
Rule rules[] = {
/* class instance title tags ref i…
- { NULL, NULL, "Firefox", tags[8],…
- { NULL, NULL, "Gimp", NUL…
- { NULL, NULL, "MPlayer", NULL, …
- { NULL, NULL, "Acroread", NULL, …
+ { "Gimp", NULL, NULL, NULL, …
};
/* geometries, s{x,y,w,h} and bh are already initualized here */
diff --git a/dwm.c b/dwm.c
t@@ -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]);
t@@ -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) {
t@@ -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;
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.