author | Anselm R Garbe <garbeam@gmail.com> |
Thu, 13 Mar 2008 10:11:02 +0000 | |
changeset 1135 | a3be6b8a792d |
parent 1130 | b661ad410646 |
child 1136 | 19de7b521826 |
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 */ |
|
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
|
30 |
{ "[]=", tilev, False }, /* first entry is default */ |
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
|
31 |
{ "[]|", tileh, 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; |
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
|
61 |
mh = 800; |
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; |
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
|
66 |
tw = ww - 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
|
67 |
th = wh; |
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 |
if(dc.drawable != 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
|
76 |
XFreePixmap(dpy, dc.drawable); |
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 |
dc.drawable = XCreatePixmap(dpy, root, bw, bh, DefaultDepth(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
|
78 |
XMoveResizeWindow(dpy, barwin, bx, by, bw, 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
|
79 |
} |
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
|
80 |
|
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
|
81 |
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
|
82 |
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
|
83 |
setgeoms = setanselmgeoms; |
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 |
arrange(); |
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 |
} |
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 |
|
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
|
87 |
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
|
88 |
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
|
89 |
setgeoms = setdefaultgeoms; |
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 |
arrange(); |
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 |
} |
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
|
92 |
|
1130 | 93 |
/* key definitions */ |
94 |
#define MODKEY Mod1Mask |
|
95 |
Key keys[] = { |
|
96 |
/* modifier key function argument */ |
|
97 |
{ MODKEY, XK_p, spawn, |
|
98 |
"exec dmenu_run -fn '"FONT"' -nb '"NORMBGCOLOR"' -nf '"NORMFGCOLOR"' -sb '"SELBGCOLOR"' -sf '"SELFGCOLOR"' -x 0 -y 0 -w 1280" }, |
|
99 |
{ 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
|
100 |
{ 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
|
101 |
{ MODKEY, XK_d, defgeoms, NULL }, |
1130 | 102 |
{ MODKEY, XK_j, focusnext, NULL }, |
103 |
{ MODKEY, XK_k, focusprev, NULL }, |
|
104 |
{ MODKEY, XK_r, reapply, NULL }, |
|
105 |
{ MODKEY, XK_Return, zoom, NULL }, |
|
106 |
{ MODKEY, XK_Tab, viewprevtag, NULL }, |
|
107 |
{ MODKEY, XK_m, setlayout, "[M]" }, |
|
108 |
{ MODKEY, XK_f, setlayout, "><>" }, |
|
109 |
{ MODKEY, XK_v, setlayout, "[]=" }, |
|
110 |
{ MODKEY, XK_h, setlayout, "[]|" }, |
|
111 |
{ MODKEY|ShiftMask, XK_space, togglefloating, NULL }, |
|
112 |
{ MODKEY|ShiftMask, XK_c, killclient, NULL }, |
|
113 |
{ MODKEY, XK_0, view, NULL }, |
|
114 |
{ MODKEY, XK_1, view, tags[0] }, |
|
115 |
{ MODKEY, XK_2, view, tags[1] }, |
|
116 |
{ MODKEY, XK_3, view, tags[2] }, |
|
117 |
{ MODKEY, XK_4, view, tags[3] }, |
|
118 |
{ MODKEY, XK_5, view, tags[4] }, |
|
119 |
{ MODKEY, XK_6, view, tags[5] }, |
|
120 |
{ MODKEY, XK_7, view, tags[6] }, |
|
121 |
{ MODKEY, XK_8, view, tags[7] }, |
|
122 |
{ MODKEY, XK_9, view, tags[8] }, |
|
123 |
{ MODKEY|ControlMask, XK_1, toggleview, tags[0] }, |
|
124 |
{ MODKEY|ControlMask, XK_2, toggleview, tags[1] }, |
|
125 |
{ MODKEY|ControlMask, XK_3, toggleview, tags[2] }, |
|
126 |
{ MODKEY|ControlMask, XK_4, toggleview, tags[3] }, |
|
127 |
{ MODKEY|ControlMask, XK_5, toggleview, tags[4] }, |
|
128 |
{ MODKEY|ControlMask, XK_6, toggleview, tags[5] }, |
|
129 |
{ MODKEY|ControlMask, XK_7, toggleview, tags[6] }, |
|
130 |
{ MODKEY|ControlMask, XK_8, toggleview, tags[7] }, |
|
131 |
{ MODKEY|ControlMask, XK_9, toggleview, tags[8] }, |
|
132 |
{ MODKEY|ShiftMask, XK_0, tag, NULL }, |
|
133 |
{ MODKEY|ShiftMask, XK_1, tag, tags[0] }, |
|
134 |
{ MODKEY|ShiftMask, XK_2, tag, tags[1] }, |
|
135 |
{ MODKEY|ShiftMask, XK_3, tag, tags[2] }, |
|
136 |
{ MODKEY|ShiftMask, XK_4, tag, tags[3] }, |
|
137 |
{ MODKEY|ShiftMask, XK_5, tag, tags[4] }, |
|
138 |
{ MODKEY|ShiftMask, XK_6, tag, tags[5] }, |
|
139 |
{ MODKEY|ShiftMask, XK_7, tag, tags[6] }, |
|
140 |
{ MODKEY|ShiftMask, XK_8, tag, tags[7] }, |
|
141 |
{ MODKEY|ShiftMask, XK_9, tag, tags[8] }, |
|
142 |
{ MODKEY|ControlMask|ShiftMask, XK_1, toggletag, tags[0] }, |
|
143 |
{ MODKEY|ControlMask|ShiftMask, XK_2, toggletag, tags[1] }, |
|
144 |
{ MODKEY|ControlMask|ShiftMask, XK_3, toggletag, tags[2] }, |
|
145 |
{ MODKEY|ControlMask|ShiftMask, XK_4, toggletag, tags[3] }, |
|
146 |
{ MODKEY|ControlMask|ShiftMask, XK_5, toggletag, tags[4] }, |
|
147 |
{ MODKEY|ControlMask|ShiftMask, XK_6, toggletag, tags[5] }, |
|
148 |
{ MODKEY|ControlMask|ShiftMask, XK_7, toggletag, tags[6] }, |
|
149 |
{ MODKEY|ControlMask|ShiftMask, XK_8, toggletag, tags[7] }, |
|
150 |
{ MODKEY|ControlMask|ShiftMask, XK_9, toggletag, tags[8] }, |
|
151 |
{ MODKEY|ShiftMask, XK_q, quit, NULL }, |
|
152 |
}; |