aewl

diff config.default.h @ 178:e848966a1ac6

removed TLast tag enum, now tags is simple defined as char *[] array, the rest is calculated correctly, rules take an int array for the tags
author arg@10ksloc.org
date Thu, 03 Aug 2006 12:12:26 +0200
parents 1db04019684e
children 621222b67c3b
line diff
     1.1 --- a/config.default.h	Thu Aug 03 11:38:26 2006 +0200
     1.2 +++ b/config.default.h	Thu Aug 03 12:12:26 2006 +0200
     1.3 @@ -3,18 +3,11 @@
     1.4   * See LICENSE file for license details.
     1.5   */
     1.6  
     1.7 -enum { Tfnord, Tdev, Tnet, Twork, Tmisc, TLast };
     1.8  #define TAGS \
     1.9 -const char *tags[TLast] = { \
    1.10 -	[Tfnord] = "fnord", \
    1.11 -	[Tdev] = "dev", \
    1.12 -	[Tnet] = "net", \
    1.13 -	[Twork] = "work", \
    1.14 -	[Tmisc] = "misc", \
    1.15 -};
    1.16 +const char *tags[] = { "0", "1", "2", "3", "4", NULL };
    1.17  
    1.18  #define DEFMODE			dotile /* dofloat */
    1.19 -#define DEFTAG			Tdev
    1.20 +#define DEFTAG			1 /* index */
    1.21  #define FONT			"fixed"
    1.22  #define BGCOLOR			"#666699"
    1.23  #define FGCOLOR			"#eeeeee"
    1.24 @@ -27,11 +20,11 @@
    1.25  	const char *term[] = { "xterm", NULL }; \
    1.26  static Key key[] = { \
    1.27  	/* modifier		key		function	arguments */ \
    1.28 -	{ MODKEY,		XK_0,		view,		{ .i = Tfnord } }, \
    1.29 -	{ MODKEY,		XK_1,		view,		{ .i = Tdev } }, \
    1.30 -	{ MODKEY,		XK_2,		view,		{ .i = Tnet } }, \
    1.31 -	{ MODKEY,		XK_3,		view,		{ .i = Twork } }, \
    1.32 -	{ MODKEY,		XK_4,		view,		{ .i = Tmisc} }, \
    1.33 +	{ MODKEY,		XK_0,		view,		{ .i = 0 } }, \
    1.34 +	{ MODKEY,		XK_1,		view,		{ .i = 1 } }, \
    1.35 +	{ MODKEY,		XK_2,		view,		{ .i = 2 } }, \
    1.36 +	{ MODKEY,		XK_3,		view,		{ .i = 3 } }, \
    1.37 +	{ MODKEY,		XK_4,		view,		{ .i = 4 } }, \
    1.38  	{ MODKEY,		XK_h,		viewprev,	{ 0 } }, \
    1.39  	{ MODKEY,		XK_j,		focusnext,	{ 0 } }, \
    1.40  	{ MODKEY,		XK_k,		focusprev,	{ 0 } }, \
    1.41 @@ -39,24 +32,25 @@
    1.42  	{ MODKEY,		XK_m,		togglemax,	{ 0 } }, \
    1.43  	{ MODKEY,		XK_space,	togglemode,	{ 0 } }, \
    1.44  	{ MODKEY,		XK_Return,	zoom,		{ 0 } }, \
    1.45 -	{ MODKEY|ControlMask,	XK_0,		appendtag,	{ .i = Tfnord } }, \
    1.46 -	{ MODKEY|ControlMask,	XK_1,		appendtag,	{ .i = Tdev } }, \
    1.47 -	{ MODKEY|ControlMask,	XK_2,		appendtag,	{ .i = Tnet } }, \
    1.48 -	{ MODKEY|ControlMask,	XK_3,		appendtag,	{ .i = Twork } }, \
    1.49 -	{ MODKEY|ControlMask,	XK_4,		appendtag,	{ .i = Tmisc } }, \
    1.50 -	{ MODKEY|ShiftMask,	XK_0,		replacetag,	{ .i = Tfnord } }, \
    1.51 -	{ MODKEY|ShiftMask,	XK_1,		replacetag,	{ .i = Tdev } }, \
    1.52 -	{ MODKEY|ShiftMask,	XK_2,		replacetag,	{ .i = Tnet } }, \
    1.53 -	{ MODKEY|ShiftMask,	XK_3,		replacetag,	{ .i = Twork } }, \
    1.54 -	{ MODKEY|ShiftMask,	XK_4,		replacetag,	{ .i = Tmisc } }, \
    1.55 +	{ MODKEY|ControlMask,	XK_0,		appendtag,	{ .i = 0 } }, \
    1.56 +	{ MODKEY|ControlMask,	XK_1,		appendtag,	{ .i = 1 } }, \
    1.57 +	{ MODKEY|ControlMask,	XK_2,		appendtag,	{ .i = 2 } }, \
    1.58 +	{ MODKEY|ControlMask,	XK_3,		appendtag,	{ .i = 3 } }, \
    1.59 +	{ MODKEY|ControlMask,	XK_4,		appendtag,	{ .i = 4 } }, \
    1.60 +	{ MODKEY|ShiftMask,	XK_0,		replacetag,	{ .i = 0 } }, \
    1.61 +	{ MODKEY|ShiftMask,	XK_1,		replacetag,	{ .i = 1 } }, \
    1.62 +	{ MODKEY|ShiftMask,	XK_2,		replacetag,	{ .i = 2 } }, \
    1.63 +	{ MODKEY|ShiftMask,	XK_3,		replacetag,	{ .i = 3 } }, \
    1.64 +	{ MODKEY|ShiftMask,	XK_4,		replacetag,	{ .i = 4 } }, \
    1.65  	{ MODKEY|ShiftMask,	XK_c,		killclient,	{ 0 } }, \
    1.66  	{ MODKEY|ShiftMask,	XK_q,		quit,		{ 0 } }, \
    1.67  	{ MODKEY|ShiftMask,	XK_Return,	spawn,		{ .argv = term } }, \
    1.68  };
    1.69  
    1.70  #define RULES \
    1.71 +	const unsigned int firefox[] = { 2 }; \
    1.72  static Rule rule[] = { \
    1.73 -	/* class:instance	tags				isfloat */ \
    1.74 -	{ "Firefox.*",		{ [Tnet] = True },		False }, \
    1.75 -	{ "Gimp.*",		{ 0 },				True}, \
    1.76 +	/* class:instance	tags		isfloat */ \
    1.77 +	{ "Firefox.*",		firefox,	False }, \
    1.78 +	{ "Gimp.*",		NULL,		True}, \
    1.79  };