diff options
author | Anselm R. Garbe <arg@10kloc.org> | 2006-08-25 15:48:44 +0200 |
---|---|---|
committer | Anselm R. Garbe <arg@10kloc.org> | 2006-08-25 15:48:44 +0200 |
commit | e995c1b5325f88d197675950c15762d001dd80ef (patch) | |
tree | 972031f4a7c0736cd56a88366d143204a2660d0b | |
parent | e36929292e08d03c496c8134f2d29c069a45dc2c (diff) | |
download | dwm-e995c1b5325f88d197675950c15762d001dd80ef.tar.gz dwm-e995c1b5325f88d197675950c15762d001dd80ef.tar.bz2 dwm-e995c1b5325f88d197675950c15762d001dd80ef.zip |
trying a different configuration
-rw-r--r-- | config.arg.h | 4 | ||||
-rw-r--r-- | draw.c | 9 | ||||
-rw-r--r-- | dwm.h | 4 | ||||
-rw-r--r-- | event.c | 24 | ||||
-rw-r--r-- | main.c | 6 |
5 files changed, 24 insertions, 23 deletions
diff --git a/config.arg.h b/config.arg.h index 2b989a7..eb9ebf5 100644 --- a/config.arg.h +++ b/config.arg.h @@ -15,8 +15,8 @@ const char *tags[] = { "work", "net", "fnord", NULL }; #define NORMFGCOLOR "#cccccc" #define STATUSBGCOLOR "#dddddd" #define STATUSFGCOLOR "#222222" -#define FLOATSYMBOL "><" -#define TILESYMBOL "|=" +#define FLOATSYMBOL "><>" +#define TILESYMBOL "[]=" #define MODKEY Mod1Mask #define MASTERW 60 /* percent */ @@ -99,16 +99,19 @@ drawstatus() dc.x = dc.y = 0; dc.w = bw; - drawtext(arrange == dotile ? TILESYMBOL : FLOATSYMBOL, dc.status, False); - dc.w = modew; + drawtext(NULL, dc.status, False); for(i = 0; i < ntags; i++) { - dc.x += dc.w; dc.w = textw(tags[i]); if(seltag[i]) drawtext(tags[i], dc.sel, sel && sel->tags[i]); else drawtext(tags[i], dc.norm, sel && sel->tags[i]); + dc.x += dc.w; } + + dc.w = bmw; + drawtext(arrange == dotile ? TILESYMBOL : FLOATSYMBOL, dc.status, False); + x = dc.x + dc.w; dc.w = textw(stext); dc.x = bx + bw - dc.w; @@ -68,8 +68,8 @@ struct Client { extern const char *tags[]; extern char stext[1024]; -extern int screen, sx, sy, sw, sh, bx, by, bw, bh, mw; -extern unsigned int ntags, numlockmask, modew; +extern int bx, by, bw, bh, bmw, mw, screen, sx, sy, sw, sh; +extern unsigned int ntags, numlockmask; extern void (*handler[LASTEvent])(XEvent *); extern void (*arrange)(Arg *); extern Atom wmatom[WMLast], netatom[NetLast]; @@ -105,21 +105,19 @@ buttonpress(XEvent *e) XButtonPressedEvent *ev = &e->xbutton; if(barwin == ev->window) { - if(ev->x < modew) - togglemode(NULL); - else { - x = modew; - for(a.i = 0; a.i < ntags; a.i++) { - x += textw(tags[a.i]); - if(ev->x < x) { - if(ev->button == Button1) - view(&a); - else if(ev->button == Button3) - toggleview(&a); - return; - } + x = 0; + for(a.i = 0; a.i < ntags; a.i++) { + x += textw(tags[a.i]); + if(ev->x < x) { + if(ev->button == Button1) + view(&a); + else if(ev->button == Button3) + toggleview(&a); + return; } } + if(ev->x < x + bmw) + togglemode(NULL); } else if((c = getclient(ev->window))) { focus(c); @@ -19,8 +19,8 @@ char stext[1024]; Bool *seltag; -int screen, sx, sy, sw, sh, bx, by, bw, bh, mw; -unsigned int ntags, numlockmask, modew; +int bx, by, bw, bh, bmw, mw, screen, sx, sy, sw, sh; +unsigned int ntags, numlockmask; Atom wmatom[WMLast], netatom[NetLast]; Bool running = True; Bool issel = True; @@ -129,7 +129,7 @@ setup() dc.status[ColFG] = getcolor(STATUSFGCOLOR); setfont(FONT); - modew = textw(FLOATSYMBOL) > textw(TILESYMBOL) ? textw(FLOATSYMBOL) : textw(TILESYMBOL); + bmw = textw(FLOATSYMBOL) > textw(TILESYMBOL) ? textw(FLOATSYMBOL) : textw(TILESYMBOL); sx = sy = 0; sw = DisplayWidth(dpy, screen); sh = DisplayHeight(dpy, screen); |