aewl

changeset 357:27082985e51e

removed a bunch of lines, made mode symbols configurable
author Anselm R. Garbe <arg@10kloc.org>
date Fri, 25 Aug 2006 15:12:32 +0200
parents c2a65784cb71
children 64c19db8af25
files config.arg.h config.default.h draw.c main.c
diffstat 4 files changed, 7 insertions(+), 8 deletions(-) [+]
line diff
     1.1 --- a/config.arg.h	Fri Aug 25 15:06:38 2006 +0200
     1.2 +++ b/config.arg.h	Fri Aug 25 15:12:32 2006 +0200
     1.3 @@ -15,6 +15,8 @@
     1.4  #define NORMFGCOLOR		"#cccccc"
     1.5  #define STATUSBGCOLOR		"#dddddd"
     1.6  #define STATUSFGCOLOR		"#222222"
     1.7 +#define FLOATSYMBOL		"><"
     1.8 +#define TILEDSYMBOL		"|="
     1.9  
    1.10  #define MODKEY			Mod1Mask
    1.11  #define MASTERW			60 /* percent */
     2.1 --- a/config.default.h	Fri Aug 25 15:06:38 2006 +0200
     2.2 +++ b/config.default.h	Fri Aug 25 15:12:32 2006 +0200
     2.3 @@ -15,6 +15,8 @@
     2.4  #define NORMFGCOLOR		"#cccccc"
     2.5  #define STATUSBGCOLOR		"#dddddd"
     2.6  #define STATUSFGCOLOR		"#222222"
     2.7 +#define FLOATSYMBOL		"~"
     2.8 +#define TILEDSYMBOL		"#"
     2.9  
    2.10  #define MODKEY			Mod1Mask
    2.11  #define MASTERW			60 /* percent */
     3.1 --- a/draw.c	Fri Aug 25 15:06:38 2006 +0200
     3.2 +++ b/draw.c	Fri Aug 25 15:12:32 2006 +0200
     3.3 @@ -94,18 +94,13 @@
     3.4  void
     3.5  drawstatus()
     3.6  {
     3.7 -	static const char *mode[] = { "><", "|=" };
     3.8  	int i, x;
     3.9  
    3.10  	dc.x = dc.y = 0;
    3.11  	dc.w = bw;
    3.12  
    3.13 -	if(!modew)
    3.14 -		modew = textw(mode[0]) > textw(mode[1]) ? textw(mode[0]) : textw(mode[1]);
    3.15 -	drawtext(mode[arrange == dotile ? 1 : 0], dc.status, False);
    3.16 -
    3.17 -	dc.w = 0;
    3.18 -	dc.x = modew;
    3.19 +	drawtext(arrange == dotile ? TILEDSYMBOL : FLOATSYMBOL, dc.status, False);
    3.20 +	dc.w = modew;
    3.21  	for(i = 0; i < ntags; i++) {
    3.22  		dc.x += dc.w;
    3.23  		dc.w = textw(tags[i]);
     4.1 --- a/main.c	Fri Aug 25 15:06:38 2006 +0200
     4.2 +++ b/main.c	Fri Aug 25 15:12:32 2006 +0200
     4.3 @@ -129,7 +129,7 @@
     4.4  	dc.status[ColFG] = getcolor(STATUSFGCOLOR);
     4.5  	setfont(FONT);
     4.6  
     4.7 -	modew = 0;
     4.8 +	modew = textw(FLOATSYMBOL) > textw(TILEDSYMBOL) ? textw(FLOATSYMBOL) : textw(TILEDSYMBOL);
     4.9  	sx = sy = 0;
    4.10  	sw = DisplayWidth(dpy, screen);
    4.11  	sh = DisplayHeight(dpy, screen);