aewl

changeset 676:7672a1041218

added comment to %u in config.default.h, added Button{4.5} support on mode label
author Anselm R. Garbe <arg@suckless.org>
date Wed, 10 Jan 2007 12:54:23 +0100
parents 1438e35b622e
children a1cabd6c6f9f
files config.default.h event.c
diffstat 2 files changed, 16 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- a/config.default.h	Mon Jan 08 17:36:56 2007 +0100
     1.2 +++ b/config.default.h	Wed Jan 10 12:54:23 2007 +0100
     1.3 @@ -5,9 +5,9 @@
     1.4  #define TAGS \
     1.5  const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL };
     1.6  
     1.7 -#define DEFMODE			dotile /* dofloat */
     1.8 +#define DEFMODE			dotile		/* dofloat */
     1.9  #define FLOATSYMBOL		"><>"
    1.10 -#define TILESYMBOL		"[%u]="
    1.11 +#define TILESYMBOL		"[%u]="		/* %u is replaced with nmaster */
    1.12  
    1.13  #define FONT			"-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*"
    1.14  #define NORMBGCOLOR		"#333366"
     2.1 --- a/event.c	Mon Jan 08 17:36:56 2007 +0100
     2.2 +++ b/event.c	Wed Jan 10 12:54:23 2007 +0100
     2.3 @@ -131,8 +131,20 @@
     2.4  				return;
     2.5  			}
     2.6  		}
     2.7 -		if((ev->x < x + bmw) && (ev->button == Button1))
     2.8 -			togglemode(NULL);
     2.9 +		if(ev->x < x + bmw)
    2.10 +			switch(ev->button) {
    2.11 +			case Button1:
    2.12 +				togglemode(NULL);
    2.13 +				break;
    2.14 +			case Button4:
    2.15 +				a.i = 1;
    2.16 +				incnmaster(&a);
    2.17 +				break;
    2.18 +			case Button5:
    2.19 +				a.i = -1;
    2.20 +				incnmaster(&a);
    2.21 +				break;
    2.22 +			}
    2.23  	}
    2.24  	else if((c = getclient(ev->window))) {
    2.25  		focus(c);