aewl

changeset 688:39fa5308d73f

removed mode label stuff
author Anselm R. Garbe <arg@suckless.org>
date Sun, 14 Jan 2007 22:32:26 +0100
parents a76799907854
children cbec08a54a15
files config.arg.h config.default.h draw.c dwm.h main.c view.c
diffstat 6 files changed, 6 insertions(+), 16 deletions(-) [+]
line diff
     1.1 --- a/config.arg.h	Sun Jan 14 22:27:29 2007 +0100
     1.2 +++ b/config.arg.h	Sun Jan 14 22:32:26 2007 +0100
     1.3 @@ -7,7 +7,7 @@
     1.4  
     1.5  #define DEFMODE			dotile		/* dofloat */
     1.6  #define FLOATSYMBOL		"><>"
     1.7 -#define TILESYMBOL		"[%u]="		/* %u is replaced with nmaster */
     1.8 +#define TILESYMBOL		"[]="
     1.9  
    1.10  #define FONT			"-*-terminus-medium-r-*-*-14-*-*-*-*-*-*-*"
    1.11  #define NORMBGCOLOR		"#222"
     2.1 --- a/config.default.h	Sun Jan 14 22:27:29 2007 +0100
     2.2 +++ b/config.default.h	Sun Jan 14 22:32:26 2007 +0100
     2.3 @@ -7,7 +7,7 @@
     2.4  
     2.5  #define DEFMODE			dotile		/* dofloat */
     2.6  #define FLOATSYMBOL		"><>"
     2.7 -#define TILESYMBOL		"[%u]="		/* %u is replaced with nmaster */
     2.8 +#define TILESYMBOL		"[]="
     2.9  
    2.10  #define FONT			"-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*"
    2.11  #define NORMBGCOLOR		"#333366"
     3.1 --- a/draw.c	Sun Jan 14 22:27:29 2007 +0100
     3.2 +++ b/draw.c	Sun Jan 14 22:32:26 2007 +0100
     3.3 @@ -120,7 +120,7 @@
     3.4  		dc.x += dc.w;
     3.5  	}
     3.6  	dc.w = bmw;
     3.7 -	drawtext(mtext, dc.status, False, False);
     3.8 +	drawtext(arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, dc.status, False, False);
     3.9  	x = dc.x + dc.w;
    3.10  	dc.w = textw(stext);
    3.11  	dc.x = bw - dc.w;
     4.1 --- a/dwm.h	Sun Jan 14 22:27:29 2007 +0100
     4.2 +++ b/dwm.h	Sun Jan 14 22:32:26 2007 +0100
     4.3 @@ -90,8 +90,7 @@
     4.4  };
     4.5  
     4.6  extern const char *tags[];			/* all tags */
     4.7 -extern char stext[1024];			/* status text */
     4.8 -extern char mtext[32];				/* mode text */
     4.9 +extern char stext[256];				/* status text */
    4.10  extern int bx, by, bw, bh, bmw;			/* bar geometry, bar mode label width */
    4.11  extern int screen, sx, sy, sw, sh;		/* screen geometry */
    4.12  extern int wax, way, wah, waw;			/* windowarea geometry */
    4.13 @@ -163,6 +162,5 @@
    4.14  extern void togglefloat(Arg *arg);		/* toggles focusesd client between floating/non-floating state */
    4.15  extern void togglemode(Arg *arg);		/* toggles global arrange function (dotile/dofloat) */
    4.16  extern void toggleview(Arg *arg);		/* toggles the tag with arg's index (in)visible */
    4.17 -extern void updatemodetext(void);		/* updates mtext */
    4.18  extern void view(Arg *arg);			/* views the tag with arg's index */
    4.19  extern void zoom(Arg *arg);			/* zooms the focused client to master area, arg is ignored */
     5.1 --- a/main.c	Sun Jan 14 22:27:29 2007 +0100
     5.2 +++ b/main.c	Sun Jan 14 22:32:26 2007 +0100
     5.3 @@ -17,7 +17,7 @@
     5.4  
     5.5  /* extern */
     5.6  
     5.7 -char stext[1024], mtext[32];
     5.8 +char stext[256];
     5.9  Bool *seltag;
    5.10  int bx, by, bw, bh, bmw, masterd, screen, sx, sy, sw, sh, wax, way, waw, wah;
    5.11  unsigned int master, nmaster, ntags, numlockmask;
    5.12 @@ -134,7 +134,7 @@
    5.13  	sh = DisplayHeight(dpy, screen);
    5.14  	master = MASTER;
    5.15  	nmaster = NMASTER;
    5.16 -	updatemodetext();
    5.17 +	bmw = textw(TILESYMBOL) > textw(FLOATSYMBOL) ? textw(TILESYMBOL) : textw(FLOATSYMBOL);
    5.18  	/* bar */
    5.19  	bx = sx;
    5.20  	by = sy;
     6.1 --- a/view.c	Sun Jan 14 22:27:29 2007 +0100
     6.2 +++ b/view.c	Sun Jan 14 22:32:26 2007 +0100
     6.3 @@ -152,7 +152,6 @@
     6.4  	if((arrange == dofloat) || (nmaster + arg->i < 1) || (wah / (nmaster + arg->i) < bh))
     6.5  		return;
     6.6  	nmaster += arg->i;
     6.7 -	updatemodetext();
     6.8  	if(sel)
     6.9  		arrange();
    6.10  	else
    6.11 @@ -217,7 +216,6 @@
    6.12  void
    6.13  togglemode(Arg *arg) {
    6.14  	arrange = (arrange == dofloat) ? dotile : dofloat;
    6.15 -	updatemodetext();
    6.16  	if(sel)
    6.17  		arrange();
    6.18  	else
    6.19 @@ -236,12 +234,6 @@
    6.20  }
    6.21  
    6.22  void
    6.23 -updatemodetext() {
    6.24 -	snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster);
    6.25 -	bmw = textw(mtext);
    6.26 -}
    6.27 -
    6.28 -void
    6.29  view(Arg *arg) {
    6.30  	unsigned int i;
    6.31