summaryrefslogtreecommitdiffstats
path: root/config.def.h
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-10-28 12:52:16 +0100
committerAnselm R. Garbe <garbeam@gmail.com>2007-10-28 12:52:16 +0100
commit34e7872c89613356293d554970d9d56adc4b0a4e (patch)
tree20cce96da67b7d16a0de6099b522bba0ad358653 /config.def.h
parentreplaced ISTILE with domwfact/dozoom bools, removed nrules, nlayouts and ltid... (diff)
downloaddwm-34e7872c89613356293d554970d9d56adc4b0a4e.tar.gz
dwm-34e7872c89613356293d554970d9d56adc4b0a4e.zip
replaced Nmacros with LENGTH(x) macro
Diffstat (limited to '')
-rw-r--r--config.def.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/config.def.h b/config.def.h
index 2813b3f..1dcd7f9 100644
--- a/config.def.h
+++ b/config.def.h
@@ -11,11 +11,13 @@
11#define SELBGCOLOR "#0066ff" 11#define SELBGCOLOR "#0066ff"
12#define SELFGCOLOR "#ffffff" 12#define SELFGCOLOR "#ffffff"
13 13
14/* convenience */
15#define LENGTH(x) (sizeof x / sizeof x[0])
16
14/* tagging */ 17/* tagging */
15const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "www" }; 18const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "www" };
16#define NTAGS (sizeof tags / sizeof tags[0]) 19Bool seltags[LENGTH(tags)] = {[0] = True};
17Bool seltags[NTAGS] = {[0] = True}; 20Bool prevtags[LENGTH(tags)] = {[0] = True};
18Bool prevtags[NTAGS] = {[0] = True};
19Rule rules[] = { 21Rule rules[] = {
20 /* class:instance:title regex tags regex isfloating */ 22 /* class:instance:title regex tags regex isfloating */
21 { "Firefox", "www", False }, 23 { "Firefox", "www", False },
@@ -23,7 +25,6 @@ Rule rules[] = {
23 { "MPlayer", NULL, True }, 25 { "MPlayer", NULL, True },
24 { "Acroread", NULL, True }, 26 { "Acroread", NULL, True },
25}; 27};
26#define NRULES (sizeof rules / sizeof rules[0])
27 28
28/* layout(s) */ 29/* layout(s) */
29#define MWFACT 0.6 /* master width factor [0.1 .. 0.9] */ 30#define MWFACT 0.6 /* master width factor [0.1 .. 0.9] */
@@ -33,7 +34,6 @@ Layout layouts[] = {
33 { "[]=", tile }, /* first entry is default */ 34 { "[]=", tile }, /* first entry is default */
34 { "><>", floating }, 35 { "><>", floating },
35}; 36};
36#define NLAYOUTS (sizeof layouts / sizeof layouts[0])
37 37
38/* key definitions */ 38/* key definitions */
39#define MODKEY Mod1Mask 39#define MODKEY Mod1Mask
@@ -95,4 +95,3 @@ Key keys[] = { \
95 { MODKEY|ControlMask|ShiftMask, XK_9, toggletag, tags[8] }, \ 95 { MODKEY|ControlMask|ShiftMask, XK_9, toggletag, tags[8] }, \
96 { MODKEY|ShiftMask, XK_q, quit, NULL }, \ 96 { MODKEY|ShiftMask, XK_q, quit, NULL }, \
97}; 97};
98#define NKEYS (sizeof keys / sizeof keys[0])