From e995c1b5325f88d197675950c15762d001dd80ef Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Fri, 25 Aug 2006 15:48:44 +0200 Subject: trying a different configuration --- config.arg.h | 4 ++-- draw.c | 9 ++++++--- dwm.h | 4 ++-- event.c | 24 +++++++++++------------- 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 */ diff --git a/draw.c b/draw.c index 102e89e..64b11af 100644 --- a/draw.c +++ b/draw.c @@ -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; diff --git a/dwm.h b/dwm.h index c23c86c..4d23cab 100644 --- a/dwm.h +++ b/dwm.h @@ -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]; diff --git a/event.c b/event.c index 35cd4f9..3c83aa8 100644 --- a/event.c +++ b/event.c @@ -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); diff --git a/main.c b/main.c index d2da0c1..5dab0db 100644 --- a/main.c +++ b/main.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); -- cgit 1.4.1-2-gfad0 n25'>25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182