diff options
Diffstat (limited to '')
| -rw-r--r-- | config.def.h | 5 | ||||
| -rw-r--r-- | dwm.c | 22 |
2 files changed, 15 insertions, 12 deletions
diff --git a/config.def.h b/config.def.h index 5a99b7f..b62e938 100644 --- a/config.def.h +++ b/config.def.h | |||
| @@ -15,10 +15,7 @@ const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; | |||
| 15 | 15 | ||
| 16 | Rule rules[] = { | 16 | Rule rules[] = { |
| 17 | /* class instance title tags ref isfloating */ | 17 | /* class instance title tags ref isfloating */ |
| 18 | { NULL, NULL, "Firefox", tags[8], False }, | 18 | { "Gimp", NULL, NULL, NULL, True }, |
| 19 | { NULL, NULL, "Gimp", NULL, True }, | ||
| 20 | { NULL, NULL, "MPlayer", NULL, True }, | ||
| 21 | { NULL, NULL, "Acroread", NULL, True }, | ||
| 22 | }; | 19 | }; |
| 23 | 20 | ||
| 24 | /* geometries, s{x,y,w,h} and bh are already initualized here */ | 21 | /* geometries, s{x,y,w,h} and bh are already initualized here */ |
| @@ -517,9 +517,11 @@ drawbar(void) { | |||
| 517 | Client *c; | 517 | Client *c; |
| 518 | 518 | ||
| 519 | dc.x = 0; | 519 | dc.x = 0; |
| 520 | dc.w = bgw; | 520 | if(bgw > 0) { |
| 521 | drawtext(geom->symbol, dc.norm, False); | 521 | dc.w = bgw; |
| 522 | dc.x += bgw; | 522 | drawtext(geom->symbol, dc.norm, False); |
| 523 | dc.x += bgw; | ||
| 524 | } | ||
| 523 | for(c = stack; c && !isvisible(c); c = c->snext); | 525 | for(c = stack; c && !isvisible(c); c = c->snext); |
| 524 | for(i = 0; i < LENGTH(tags); i++) { | 526 | for(i = 0; i < LENGTH(tags); i++) { |
| 525 | dc.w = textw(tags[i]); | 527 | dc.w = textw(tags[i]); |
| @@ -533,9 +535,13 @@ drawbar(void) { | |||
| 533 | } | 535 | } |
| 534 | dc.x += dc.w; | 536 | dc.x += dc.w; |
| 535 | } | 537 | } |
| 536 | dc.w = blw; | 538 | if(blw > 0) { |
| 537 | drawtext(lt->symbol, dc.norm, False); | 539 | dc.w = blw; |
| 538 | x = dc.x + dc.w; | 540 | drawtext(lt->symbol, dc.norm, False); |
| 541 | x = dc.x + dc.w; | ||
| 542 | } | ||
| 543 | else | ||
| 544 | x = dc.x; | ||
| 539 | dc.w = textw(stext); | 545 | dc.w = textw(stext); |
| 540 | dc.x = bw - dc.w; | 546 | dc.x = bw - dc.w; |
| 541 | if(dc.x < x) { | 547 | if(dc.x < x) { |
| @@ -1502,12 +1508,12 @@ setup(void) { | |||
| 1502 | lt = &layouts[0]; | 1508 | lt = &layouts[0]; |
| 1503 | 1509 | ||
| 1504 | /* init bar */ | 1510 | /* init bar */ |
| 1505 | for(blw = i = 0; i < LENGTH(layouts); i++) { | 1511 | for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) { |
| 1506 | w = textw(layouts[i].symbol); | 1512 | w = textw(layouts[i].symbol); |
| 1507 | if(w > blw) | 1513 | if(w > blw) |
| 1508 | blw = w; | 1514 | blw = w; |
| 1509 | } | 1515 | } |
| 1510 | for(bgw = i = 0; i < LENGTH(geoms); i++) { | 1516 | for(bgw = i = 0; LENGTH(geoms) > 1 && i < LENGTH(geoms); i++) { |
| 1511 | w = textw(geoms[i].symbol); | 1517 | w = textw(geoms[i].symbol); |
| 1512 | if(w > bgw) | 1518 | if(w > bgw) |
| 1513 | bgw = w; | 1519 | bgw = w; |
