aewl

changeset 362:ba6c55e1b9b2

trying a different configuration
author Anselm R. Garbe <arg@10kloc.org>
date Fri, 25 Aug 2006 15:48:44 +0200
parents 728e74820e1d
children c719a27f3d93
files config.arg.h draw.c dwm.h event.c main.c
diffstat 5 files changed, 24 insertions(+), 23 deletions(-) [+]
line diff
     1.1 --- a/config.arg.h	Fri Aug 25 15:37:00 2006 +0200
     1.2 +++ b/config.arg.h	Fri Aug 25 15:48:44 2006 +0200
     1.3 @@ -15,8 +15,8 @@
     1.4  #define NORMFGCOLOR		"#cccccc"
     1.5  #define STATUSBGCOLOR		"#dddddd"
     1.6  #define STATUSFGCOLOR		"#222222"
     1.7 -#define FLOATSYMBOL		"><"
     1.8 -#define TILESYMBOL		"|="
     1.9 +#define FLOATSYMBOL		"><>"
    1.10 +#define TILESYMBOL		"[]="
    1.11  
    1.12  #define MODKEY			Mod1Mask
    1.13  #define MASTERW			60 /* percent */
     2.1 --- a/draw.c	Fri Aug 25 15:37:00 2006 +0200
     2.2 +++ b/draw.c	Fri Aug 25 15:48:44 2006 +0200
     2.3 @@ -99,16 +99,19 @@
     2.4  	dc.x = dc.y = 0;
     2.5  	dc.w = bw;
     2.6  
     2.7 -	drawtext(arrange == dotile ? TILESYMBOL : FLOATSYMBOL, dc.status, False);
     2.8 -	dc.w = modew;
     2.9 +	drawtext(NULL, dc.status, False);
    2.10  	for(i = 0; i < ntags; i++) {
    2.11 -		dc.x += dc.w;
    2.12  		dc.w = textw(tags[i]);
    2.13  		if(seltag[i])
    2.14  			drawtext(tags[i], dc.sel, sel && sel->tags[i]);
    2.15  		else
    2.16  			drawtext(tags[i], dc.norm, sel && sel->tags[i]);
    2.17 +		dc.x += dc.w;
    2.18  	}
    2.19 +
    2.20 +	dc.w = bmw;
    2.21 +	drawtext(arrange == dotile ? TILESYMBOL : FLOATSYMBOL, dc.status, False);
    2.22 +
    2.23  	x = dc.x + dc.w;
    2.24  	dc.w = textw(stext);
    2.25  	dc.x = bx + bw - dc.w;
     3.1 --- a/dwm.h	Fri Aug 25 15:37:00 2006 +0200
     3.2 +++ b/dwm.h	Fri Aug 25 15:48:44 2006 +0200
     3.3 @@ -68,8 +68,8 @@
     3.4  
     3.5  extern const char *tags[];
     3.6  extern char stext[1024];
     3.7 -extern int screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
     3.8 -extern unsigned int ntags, numlockmask, modew;
     3.9 +extern int bx, by, bw, bh, bmw, mw, screen, sx, sy, sw, sh;
    3.10 +extern unsigned int ntags, numlockmask;
    3.11  extern void (*handler[LASTEvent])(XEvent *);
    3.12  extern void (*arrange)(Arg *);
    3.13  extern Atom wmatom[WMLast], netatom[NetLast];
     4.1 --- a/event.c	Fri Aug 25 15:37:00 2006 +0200
     4.2 +++ b/event.c	Fri Aug 25 15:48:44 2006 +0200
     4.3 @@ -105,21 +105,19 @@
     4.4  	XButtonPressedEvent *ev = &e->xbutton;
     4.5  
     4.6  	if(barwin == ev->window) {
     4.7 -		if(ev->x < modew)
     4.8 -			togglemode(NULL);
     4.9 -		else {
    4.10 -			x = modew;
    4.11 -			for(a.i = 0; a.i < ntags; a.i++) {
    4.12 -				x += textw(tags[a.i]);
    4.13 -				if(ev->x < x) {
    4.14 -					if(ev->button == Button1)
    4.15 -						view(&a);
    4.16 -					else if(ev->button == Button3)
    4.17 -						toggleview(&a);
    4.18 -					return;
    4.19 -				}
    4.20 +		x = 0;
    4.21 +		for(a.i = 0; a.i < ntags; a.i++) {
    4.22 +			x += textw(tags[a.i]);
    4.23 +			if(ev->x < x) {
    4.24 +				if(ev->button == Button1)
    4.25 +					view(&a);
    4.26 +				else if(ev->button == Button3)
    4.27 +					toggleview(&a);
    4.28 +				return;
    4.29  			}
    4.30  		}
    4.31 +		if(ev->x < x + bmw)
    4.32 +			togglemode(NULL);
    4.33  	}
    4.34  	else if((c = getclient(ev->window))) {
    4.35  		focus(c);
     5.1 --- a/main.c	Fri Aug 25 15:37:00 2006 +0200
     5.2 +++ b/main.c	Fri Aug 25 15:48:44 2006 +0200
     5.3 @@ -19,8 +19,8 @@
     5.4  
     5.5  char stext[1024];
     5.6  Bool *seltag;
     5.7 -int screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
     5.8 -unsigned int ntags, numlockmask, modew;
     5.9 +int bx, by, bw, bh, bmw, mw, screen, sx, sy, sw, sh;
    5.10 +unsigned int ntags, numlockmask;
    5.11  Atom wmatom[WMLast], netatom[NetLast];
    5.12  Bool running = True;
    5.13  Bool issel = True;
    5.14 @@ -129,7 +129,7 @@
    5.15  	dc.status[ColFG] = getcolor(STATUSFGCOLOR);
    5.16  	setfont(FONT);
    5.17  
    5.18 -	modew = textw(FLOATSYMBOL) > textw(TILESYMBOL) ? textw(FLOATSYMBOL) : textw(TILESYMBOL);
    5.19 +	bmw = textw(FLOATSYMBOL) > textw(TILESYMBOL) ? textw(FLOATSYMBOL) : textw(TILESYMBOL);
    5.20  	sx = sy = 0;
    5.21  	sw = DisplayWidth(dpy, screen);
    5.22  	sh = DisplayHeight(dpy, screen);