author | Anselm R Garbe <garbeam@gmail.com> |
Thu, 13 Mar 2008 16:30:29 +0000 | |
changeset 1145 | 607015ddb091 |
parent 1141 | fa19c918d250 |
child 1147 | def76530f636 |
permissions | -rw-r--r-- |
1130 | 1 |
/* See LICENSE file for copyright and license details. */ |
2 |
||
3 |
/* appearance */ |
|
4 |
#define BORDERPX 1 |
|
5 |
#define FONT "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*" |
|
6 |
#define NORMBORDERCOLOR "#cccccc" |
|
7 |
#define NORMBGCOLOR "#cccccc" |
|
8 |
#define NORMFGCOLOR "#000000" |
|
9 |
#define SELBORDERCOLOR "#0066ff" |
|
10 |
#define SELBGCOLOR "#0066ff" |
|
11 |
#define SELFGCOLOR "#ffffff" |
|
12 |
||
13 |
/* tagging */ |
|
14 |
const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; |
|
15 |
||
16 |
Rule rules[] = { |
|
17 |
/* class:instance:title substr tags ref isfloating */ |
|
18 |
{ "Firefox", tags[8], False }, |
|
19 |
{ "Gimp", NULL, True }, |
|
20 |
{ "MPlayer", NULL, True }, |
|
21 |
{ "Acroread", NULL, True }, |
|
22 |
}; |
|
23 |
||
24 |
/* layout(s) */ |
|
25 |
#define RESIZEHINTS True /* False - respect size hints in tiled resizals */ |
|
26 |
#define SNAP 32 /* snap pixel */ |
|
27 |
||
28 |
Layout layouts[] = { |
|
29 |
/* symbol function isfloating */ |
|
1137
765a81b08cb0
well I use a different default tile
Anselm R Garbe <garbeam@gmail.com>
parents:
1136
diff
changeset
|
30 |
{ "[]|", tileh, False }, /* first entry is default */ |
765a81b08cb0
well I use a different default tile
Anselm R Garbe <garbeam@gmail.com>
parents:
1136
diff
changeset
|
31 |
{ "[]=", tilev, False }, |
1130 | 32 |
{ "><>", floating, True }, |
33 |
{ "[M]", monocle, True }, |
|
34 |
}; |
|
35 |
||
1135
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
36 |
void |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
37 |
setanselmgeoms(void) { |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
38 |
|
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
39 |
/* screen dimensions */ |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
40 |
sx = 0; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
41 |
sy = 0; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
42 |
sw = DisplayWidth(dpy, screen); |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
43 |
sh = DisplayHeight(dpy, screen); |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
44 |
|
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
45 |
/* bar position */ |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
46 |
bx = sx; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
47 |
by = sy; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
48 |
bw = 1280; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
49 |
bh = dc.font.height + 2; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
50 |
|
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
51 |
/* window area */ |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
52 |
wx = sx; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
53 |
wy = sy + bh; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
54 |
ww = sw; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
55 |
wh = sh - bh; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
56 |
|
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
57 |
/* master area */ |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
58 |
mx = wx; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
59 |
my = wy; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
60 |
mw = 1280; |
1140
a3a1d5c8a9ec
updated my geoms function
Anselm R Garbe <garbeam@gmail.com>
parents:
1139
diff
changeset
|
61 |
mh = 800 - bh; |
1135
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
62 |
|
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
63 |
/* tile area */ |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
64 |
tx = 1280; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
65 |
ty = 0; |
1140
a3a1d5c8a9ec
updated my geoms function
Anselm R Garbe <garbeam@gmail.com>
parents:
1139
diff
changeset
|
66 |
tw = sw - 1280; |
a3a1d5c8a9ec
updated my geoms function
Anselm R Garbe <garbeam@gmail.com>
parents:
1139
diff
changeset
|
67 |
th = sh; |
1135
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
68 |
|
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
69 |
/* monocle area */ |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
70 |
mox = mx; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
71 |
moy = my; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
72 |
mow = mw; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
73 |
moh = mh; |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
74 |
} |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
75 |
|
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
76 |
void |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
77 |
anselmgeoms(const char *arg) { |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
78 |
setgeoms = setanselmgeoms; |
1139 | 79 |
setgeoms(); |
1141 | 80 |
updatebarpos(); |
1138
b18a2c807f67
set layout already here
Anselm R Garbe <garbeam@gmail.com>
parents:
1137
diff
changeset
|
81 |
setlayout("[]|"); |
1135
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
82 |
} |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
83 |
|
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
84 |
void |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
85 |
defgeoms(const char *arg) { |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
86 |
setgeoms = setdefaultgeoms; |
1139 | 87 |
setgeoms(); |
1141 | 88 |
updatebarpos(); |
1138
b18a2c807f67
set layout already here
Anselm R Garbe <garbeam@gmail.com>
parents:
1137
diff
changeset
|
89 |
setlayout("[]="); |
1135
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
90 |
} |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
91 |
|
1130 | 92 |
/* key definitions */ |
93 |
#define MODKEY Mod1Mask |
|
94 |
Key keys[] = { |
|
95 |
/* modifier key function argument */ |
|
96 |
{ MODKEY, XK_p, spawn, |
|
97 |
"exec dmenu_run -fn '"FONT"' -nb '"NORMBGCOLOR"' -nf '"NORMFGCOLOR"' -sb '"SELBGCOLOR"' -sf '"SELFGCOLOR"' -x 0 -y 0 -w 1280" }, |
|
98 |
{ MODKEY|ShiftMask, XK_Return, spawn, "exec uxterm" }, |
|
1135
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
99 |
{ MODKEY, XK_a, anselmgeoms, NULL }, |
a3be6b8a792d
removed all defines of geoms, implemented setgeoms() instead, added config.anselm.h to show how I'd like to see that people edit their geoms
Anselm R Garbe <garbeam@gmail.com>
parents:
1130
diff
changeset
|
100 |
{ MODKEY, XK_d, defgeoms, NULL }, |
1130 | 101 |
{ MODKEY, XK_j, focusnext, NULL }, |
102 |
{ MODKEY, XK_k, focusprev, NULL }, |
|
103 |
{ MODKEY, XK_r, reapply, NULL }, |
|
104 |
{ MODKEY, XK_Return, zoom, NULL }, |
|
105 |
{ MODKEY, XK_Tab, viewprevtag, NULL }, |
|
106 |
{ MODKEY, XK_m, setlayout, "[M]" }, |
|
107 |
{ MODKEY, XK_f, setlayout, "><>" }, |
|
108 |
{ MODKEY, XK_v, setlayout, "[]=" }, |
|
109 |
{ MODKEY, XK_h, setlayout, "[]|" }, |
|
110 |
{ MODKEY|ShiftMask, XK_space, togglefloating, NULL }, |
|
111 |
{ MODKEY|ShiftMask, XK_c, killclient, NULL }, |
|
112 |
{ MODKEY, XK_0, view, NULL }, |
|
113 |
{ MODKEY, XK_1, view, tags[0] }, |
|
114 |
{ MODKEY, XK_2, view, tags[1] }, |
|
115 |
{ MODKEY, XK_3, view, tags[2] }, |
|
116 |
{ MODKEY, XK_4, view, tags[3] }, |
|
117 |
{ MODKEY, XK_5, view, tags[4] }, |
|
118 |
{ MODKEY, XK_6, view, tags[5] }, |
|
119 |
{ MODKEY, XK_7, view, tags[6] }, |
|
120 |
{ MODKEY, XK_8, view, tags[7] }, |
|
121 |
{ MODKEY, XK_9, view, tags[8] }, |
|
122 |
{ MODKEY|ControlMask, XK_1, toggleview, tags[0] }, |
|
123 |
{ MODKEY|ControlMask, XK_2, toggleview, tags[1] }, |
|
124 |
{ MODKEY|ControlMask, XK_3, toggleview, tags[2] }, |
|
125 |
{ MODKEY|ControlMask, XK_4, toggleview, tags[3] }, |
|
126 |
{ MODKEY|ControlMask, XK_5, toggleview, tags[4] }, |
|
127 |
{ MODKEY|ControlMask, XK_6, toggleview, tags[5] }, |
|
128 |
{ MODKEY|ControlMask, XK_7, toggleview, tags[6] }, |
|
129 |
{ MODKEY|ControlMask, XK_8, toggleview, tags[7] }, |
|
130 |
{ MODKEY|ControlMask, XK_9, toggleview, tags[8] }, |
|
131 |
{ MODKEY|ShiftMask, XK_0, tag, NULL }, |
|
132 |
{ MODKEY|ShiftMask, XK_1, tag, tags[0] }, |
|
133 |
{ MODKEY|ShiftMask, XK_2, tag, tags[1] }, |
|
134 |
{ MODKEY|ShiftMask, XK_3, tag, tags[2] }, |
|
135 |
{ MODKEY|ShiftMask, XK_4, tag, tags[3] }, |
|
136 |
{ MODKEY|ShiftMask, XK_5, tag, tags[4] }, |
|
137 |
{ MODKEY|ShiftMask, XK_6, tag, tags[5] }, |
|
138 |
{ MODKEY|ShiftMask, XK_7, tag, tags[6] }, |
|
139 |
{ MODKEY|ShiftMask, XK_8, tag, tags[7] }, |
|
140 |
{ MODKEY|ShiftMask, XK_9, tag, tags[8] }, |
|
141 |
{ MODKEY|ControlMask|ShiftMask, XK_1, toggletag, tags[0] }, |
|
142 |
{ MODKEY|ControlMask|ShiftMask, XK_2, toggletag, tags[1] }, |
|
143 |
{ MODKEY|ControlMask|ShiftMask, XK_3, toggletag, tags[2] }, |
|
144 |
{ MODKEY|ControlMask|ShiftMask, XK_4, toggletag, tags[3] }, |
|
145 |
{ MODKEY|ControlMask|ShiftMask, XK_5, toggletag, tags[4] }, |
|
146 |
{ MODKEY|ControlMask|ShiftMask, XK_6, toggletag, tags[5] }, |
|
147 |
{ MODKEY|ControlMask|ShiftMask, XK_7, toggletag, tags[6] }, |
|
148 |
{ MODKEY|ControlMask|ShiftMask, XK_8, toggletag, tags[7] }, |
|
149 |
{ MODKEY|ControlMask|ShiftMask, XK_9, toggletag, tags[8] }, |
|
150 |
{ MODKEY|ShiftMask, XK_q, quit, NULL }, |
|
151 |
}; |