aewl

diff dev.c @ 49:466591c2f967

implemented tagging a client
author Anselm R. Garbe <garbeam@wmii.de>
date Thu, 13 Jul 2006 17:09:35 +0200
parents ceff29af8c7b
children 148f25ed0ad7
line diff
     1.1 --- a/dev.c	Thu Jul 13 14:33:22 2006 +0200
     1.2 +++ b/dev.c	Thu Jul 13 17:09:35 2006 +0200
     1.3 @@ -20,16 +20,21 @@
     1.4  const char *xlock[] = { "xlock", NULL };
     1.5  
     1.6  static Key key[] = {
     1.7 -	{ Mod1Mask, XK_Return, (void (*)(void *))spawn, term },
     1.8 -	{ Mod1Mask, XK_w, (void (*)(void *))spawn, browse },
     1.9 -	{ Mod1Mask, XK_l, (void (*)(void *))spawn, xlock },
    1.10 -	{ Mod1Mask, XK_k, sel, "prev" }, 
    1.11 -	{ Mod1Mask, XK_j, sel, "next" }, 
    1.12 -	{ Mod1Mask, XK_t, tiling, NULL }, 
    1.13 -	{ Mod1Mask, XK_f, floating, NULL }, 
    1.14 -	{ Mod1Mask, XK_m, max, NULL }, 
    1.15 -	{ Mod1Mask | ShiftMask, XK_c, ckill, NULL }, 
    1.16 -	{ Mod1Mask | ShiftMask, XK_q, quit, NULL },
    1.17 +	{ Mod1Mask, XK_Return, spawn, { .argv = term } },
    1.18 +	{ Mod1Mask, XK_w, spawn, { .argv = browse } },
    1.19 +	{ Mod1Mask, XK_l, spawn, { .argv = xlock } },
    1.20 +	{ Mod1Mask, XK_k, prevc, { 0 } },
    1.21 +	{ Mod1Mask, XK_j, nextc, { 0 } }, 
    1.22 +	{ Mod1Mask, XK_t, tiling, { 0 } }, 
    1.23 +	{ Mod1Mask, XK_f, floating, { 0 } }, 
    1.24 +	{ Mod1Mask, XK_m, max, { 0 } }, 
    1.25 +	{ Mod1Mask, XK_0, tag, { .i = Tscratch } }, 
    1.26 +	{ Mod1Mask, XK_1, tag, { .i = Tdev } }, 
    1.27 +	{ Mod1Mask, XK_2, tag, { .i = Tirc } }, 
    1.28 +	{ Mod1Mask, XK_3, tag, { .i = Twww } }, 
    1.29 +	{ Mod1Mask, XK_4, tag, { .i = Twork } }, 
    1.30 +	{ Mod1Mask | ShiftMask, XK_c, ckill, { 0 } }, 
    1.31 +	{ Mod1Mask | ShiftMask, XK_q, quit, { 0 } },
    1.32  };
    1.33  
    1.34  /********** CUSTOMIZE **********/
    1.35 @@ -60,7 +65,7 @@
    1.36  	for(i = 0; i < len; i++)
    1.37  		if((keysym == key[i].keysym) && (key[i].mod == ev->state)) {
    1.38  			if(key[i].func)
    1.39 -				key[i].func(key[i].aux);
    1.40 +				key[i].func(&key[i].arg);
    1.41  			return;
    1.42  		}
    1.43  }