diff options
Diffstat (limited to '')
| -rw-r--r-- | config.def.h | 3 | ||||
| -rw-r--r-- | dwm.c | 15 |
2 files changed, 3 insertions, 15 deletions
diff --git a/config.def.h b/config.def.h index 4dfc11b..f0e44a7 100644 --- a/config.def.h +++ b/config.def.h | |||
| @@ -13,9 +13,6 @@ static const unsigned int snap = 32; /* snap pixel */ | |||
| 13 | static const Bool showbar = True; /* False means no bar */ | 13 | static const Bool showbar = True; /* False means no bar */ |
| 14 | static const Bool topbar = True; /* False means bottom bar */ | 14 | static const Bool topbar = True; /* False means bottom bar */ |
| 15 | 15 | ||
| 16 | /* monitor(s) symbols */ | ||
| 17 | static const char *monsyms[] = { "<1>", "<2>", "<3>", "<4>" }; | ||
| 18 | |||
| 19 | /* tagging */ | 16 | /* tagging */ |
| 20 | static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; | 17 | static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; |
| 21 | 18 | ||
| @@ -123,7 +123,7 @@ typedef struct { | |||
| 123 | struct Monitor { | 123 | struct Monitor { |
| 124 | int screen_number; | 124 | int screen_number; |
| 125 | float mfact; | 125 | float mfact; |
| 126 | int by, btx; /* bar geometry */ | 126 | int by; /* bar geometry */ |
| 127 | int mx, my, mw, mh; /* screen size */ | 127 | int mx, my, mw, mh; /* screen size */ |
| 128 | int wx, wy, ww, wh; /* window area */ | 128 | int wx, wy, ww, wh; /* window area */ |
| 129 | unsigned int seltags; | 129 | unsigned int seltags; |
| @@ -409,9 +409,8 @@ buttonpress(XEvent *e) { | |||
| 409 | selmon = m; | 409 | selmon = m; |
| 410 | focus(NULL); | 410 | focus(NULL); |
| 411 | } | 411 | } |
| 412 | if(ev->window == selmon->barwin && ev->x >= selmon->btx) { | 412 | if(ev->window == selmon->barwin) { |
| 413 | i = 0; | 413 | i = x = 0; |
| 414 | x = selmon->btx; | ||
| 415 | do | 414 | do |
| 416 | x += TEXTW(tags[i]); | 415 | x += TEXTW(tags[i]); |
| 417 | while(ev->x >= x && ++i < LENGTH(tags)); | 416 | while(ev->x >= x && ++i < LENGTH(tags)); |
| @@ -652,12 +651,6 @@ drawbar(Monitor *m) { | |||
| 652 | urg |= c->tags; | 651 | urg |= c->tags; |
| 653 | } | 652 | } |
| 654 | dc.x = 0; | 653 | dc.x = 0; |
| 655 | if(mons->next) { /* more than a single monitor */ | ||
| 656 | dc.w = TEXTW(monsyms[m->screen_number]); | ||
| 657 | drawtext(monsyms[m->screen_number], selmon == m ? dc.sel : dc.norm, False); | ||
| 658 | dc.x += dc.w; | ||
| 659 | } | ||
| 660 | m->btx = dc.x; | ||
| 661 | for(i = 0; i < LENGTH(tags); i++) { | 654 | for(i = 0; i < LENGTH(tags); i++) { |
| 662 | dc.w = TEXTW(tags[i]); | 655 | dc.w = TEXTW(tags[i]); |
| 663 | col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm; | 656 | col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm; |
| @@ -1690,8 +1683,6 @@ updategeom(void) { | |||
| 1690 | if(XineramaIsActive(dpy)) | 1683 | if(XineramaIsActive(dpy)) |
| 1691 | info = XineramaQueryScreens(dpy, &n); | 1684 | info = XineramaQueryScreens(dpy, &n); |
| 1692 | #endif /* XINERAMA */ | 1685 | #endif /* XINERAMA */ |
| 1693 | if(n > LENGTH(monsyms)) | ||
| 1694 | n = LENGTH(monsyms); | ||
| 1695 | /* allocate monitor(s) for the new geometry setup */ | 1686 | /* allocate monitor(s) for the new geometry setup */ |
| 1696 | for(i = 0; i < n; i++) { | 1687 | for(i = 0; i < n; i++) { |
| 1697 | if(!(m = (Monitor *)malloc(sizeof(Monitor)))) | 1688 | if(!(m = (Monitor *)malloc(sizeof(Monitor)))) |
