author | Anselm R Garbe <garbeam@gmail.com> |
Fri, 29 Aug 2008 11:29:42 +0100 | |
branch | merge |
changeset 1349 | 56c2529afeab |
parent 1346 | 2765f1a08494 |
child 1361 | 41678fc29f2a |
permissions | -rw-r--r-- |
910
c13cb8c6b7a5
referred to LICENSE file
Anselm R. Garbe <arg@suckless.org>
parents:
909
diff
changeset
|
1 |
/* See LICENSE file for copyright and license details. */ |
146
f328ce9c558c
centralized/externalized configuration to config.h
arg@10ksloc.org
parents:
diff
changeset
|
2 |
|
798
2c42d9e7f79c
cleaned up and commented the config.*.h
Anselm R. Garbe <arg@suckless.org>
parents:
788
diff
changeset
|
3 |
/* appearance */ |
1275
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
4 |
static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*"; |
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
5 |
static const char normbordercolor[] = "#cccccc"; |
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
6 |
static const char normbgcolor[] = "#cccccc"; |
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
7 |
static const char normfgcolor[] = "#000000"; |
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
8 |
static const char selbordercolor[] = "#0066ff"; |
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
9 |
static const char selbgcolor[] = "#0066ff"; |
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
10 |
static const char selfgcolor[] = "#ffffff"; |
1313
f51eb530cabb
make hg tip compilable with default config
Premysl Hruby <dfenze@gmail.com>
parents:
1311
diff
changeset
|
11 |
static unsigned int borderpx = 1; /* border pixel of windows */ |
f51eb530cabb
make hg tip compilable with default config
Premysl Hruby <dfenze@gmail.com>
parents:
1311
diff
changeset
|
12 |
static unsigned int snap = 32; /* snap pixel */ |
1275
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
13 |
static Bool showbar = True; /* False means no bar */ |
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
14 |
static Bool topbar = True; /* False means bottom bar */ |
1317
40cd44593977
made readin a config.h variable
Anselm R Garbe <garbeam@gmail.com>
parents:
1313
diff
changeset
|
15 |
static Bool readin = True; /* False means do not read stdin */ |
1269
ce94428739ab
made Xinerama screen index customizable
Anselm R Garbe <garbeam@gmail.com>
parents:
1265
diff
changeset
|
16 |
|
1117
fac7660be3de
renamed monocle into maxmise, documented the keybindings in dwm(1)
anselm@anselm1
parents:
1116
diff
changeset
|
17 |
/* tagging */ |
1260
2d3d08d2dd19
applied anydot's patchset.diff
Anselm R Garbe <garbeam@gmail.com>
parents:
1250
diff
changeset
|
18 |
static const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; |
1346
2765f1a08494
introduced NOBORDER macro to hide the nasty - 2 * c->bw in various calculations, moved tagset to config.def.h
Anselm R Garbe <garbeam@gmail.com>
parents:
1324
diff
changeset
|
19 |
static unsigned int tagset[] = {1, 1}; /* after start, first tag is selected */ |
1106
084b17f96d9b
proceeded, though we still miss a real Tag struct
anselm@anselm1
parents:
1105
diff
changeset
|
20 |
|
1260
2d3d08d2dd19
applied anydot's patchset.diff
Anselm R Garbe <garbeam@gmail.com>
parents:
1250
diff
changeset
|
21 |
static Rule rules[] = { |
1283 | 22 |
/* class instance title tags mask isfloating */ |
1224
47496de04028
applied Gottox bitmask + void *arg patch
Anselm R Garbe <garbeam@gmail.com>
parents:
1220
diff
changeset
|
23 |
{ "Gimp", NULL, NULL, 0, True }, |
47496de04028
applied Gottox bitmask + void *arg patch
Anselm R Garbe <garbeam@gmail.com>
parents:
1220
diff
changeset
|
24 |
{ "Firefox", NULL, NULL, 1 << 8, True }, |
798
2c42d9e7f79c
cleaned up and commented the config.*.h
Anselm R. Garbe <arg@suckless.org>
parents:
788
diff
changeset
|
25 |
}; |
787
9728e9e85f93
changed some odering in config*.h
Anselm R. Garbe <arg@suckless.org>
parents:
785
diff
changeset
|
26 |
|
1190
c8eaba1445a4
removed Geom stuff, introduced updategeom() again, still view is somewhat broken?
Anselm R Garbe <garbeam@gmail.com>
parents:
1189
diff
changeset
|
27 |
/* layout(s) */ |
1324
c7d3198c9e9b
added a comment about FAQ regarding mfact meaning
Anselm R Garbe <garbeam@gmail.com>
parents:
1317
diff
changeset
|
28 |
static float mfact = 0.55; /* factor of master area size [0.05..0.95] */ |
1285
226e616bc123
tiled layout resizehints should be respected by default
Anselm R Garbe <garbeam@gmail.com>
parents:
1279
diff
changeset
|
29 |
static Bool resizehints = True; /* False means respect size hints in tiled resizals */ |
1209
c2dc0bd92158
recent changes, introduced togglebar, changed some defines into variable declarations where possible
Anselm R Garbe <garbeam@gmail.com>
parents:
1207
diff
changeset
|
30 |
|
1260
2d3d08d2dd19
applied anydot's patchset.diff
Anselm R Garbe <garbeam@gmail.com>
parents:
1250
diff
changeset
|
31 |
static Layout layouts[] = { |
1237
7af79b380a77
removed Layout->updategeom, unnecessary
Anselm R Garbe <garbeam@gmail.com>
parents:
1235
diff
changeset
|
32 |
/* symbol arrange function */ |
1289 | 33 |
{ "[]=", tile }, /* first entry is default */ |
34 |
{ "><>", NULL }, /* no layout function means floating behavior */ |
|
1305
027ae8f1bd1d
removed useless comment
Anselm R Garbe <garbeam@gmail.com>
parents:
1301
diff
changeset
|
35 |
{ "[M]", monocle }, |
787
9728e9e85f93
changed some odering in config*.h
Anselm R. Garbe <arg@suckless.org>
parents:
785
diff
changeset
|
36 |
}; |
9728e9e85f93
changed some odering in config*.h
Anselm R. Garbe <arg@suckless.org>
parents:
785
diff
changeset
|
37 |
|
798
2c42d9e7f79c
cleaned up and commented the config.*.h
Anselm R. Garbe <arg@suckless.org>
parents:
788
diff
changeset
|
38 |
/* key definitions */ |
1199
94ecece0f25d
renamed setlayout into togglelayout
Anselm R Garbe <garbeam@gmail.com>
parents:
1192
diff
changeset
|
39 |
#define MODKEY Mod1Mask |
1235
13f86ee1a8e6
applied yiyus domax patch with slight modifications
Anselm R Garbe <garbeam@gmail.com>
parents:
1232
diff
changeset
|
40 |
#define TAGKEYS(KEY,TAG) \ |
1270
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
41 |
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \ |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
42 |
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
43 |
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
44 |
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, |
1235
13f86ee1a8e6
applied yiyus domax patch with slight modifications
Anselm R Garbe <garbeam@gmail.com>
parents:
1232
diff
changeset
|
45 |
|
1272 | 46 |
/* helper for spawning shell commands in the pre dwm-5.0 fashion */ |
1275
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
47 |
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } |
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
48 |
|
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
49 |
/* commands */ |
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
50 |
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; |
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
51 |
static const char *termcmd[] = { "uxterm", NULL }; |
1265 | 52 |
|
1260
2d3d08d2dd19
applied anydot's patchset.diff
Anselm R Garbe <garbeam@gmail.com>
parents:
1250
diff
changeset
|
53 |
static Key keys[] = { |
1199
94ecece0f25d
renamed setlayout into togglelayout
Anselm R Garbe <garbeam@gmail.com>
parents:
1192
diff
changeset
|
54 |
/* modifier key function argument */ |
1275
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
55 |
{ MODKEY, XK_p, spawn, {.v = dmenucmd } }, |
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
56 |
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, |
1270
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
57 |
{ MODKEY, XK_b, togglebar, {0} }, |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
58 |
{ MODKEY, XK_j, focusstack, {.i = +1 } }, |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
59 |
{ MODKEY, XK_k, focusstack, {.i = -1 } }, |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
60 |
{ MODKEY, XK_h, setmfact, {.f = -0.05} }, |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
61 |
{ MODKEY, XK_l, setmfact, {.f = +0.05} }, |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
62 |
{ MODKEY, XK_Return, zoom, {0} }, |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
63 |
{ MODKEY, XK_Tab, view, {0} }, |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
64 |
{ MODKEY|ShiftMask, XK_c, killclient, {0} }, |
1289 | 65 |
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, |
66 |
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, |
|
67 |
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, |
|
68 |
{ MODKEY, XK_space, setlayout, {0} }, |
|
1270
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
69 |
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} }, |
1260
2d3d08d2dd19
applied anydot's patchset.diff
Anselm R Garbe <garbeam@gmail.com>
parents:
1250
diff
changeset
|
70 |
{ MODKEY, XK_0, view, {.ui = ~0 } }, |
2d3d08d2dd19
applied anydot's patchset.diff
Anselm R Garbe <garbeam@gmail.com>
parents:
1250
diff
changeset
|
71 |
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, |
1270
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
72 |
TAGKEYS( XK_1, 0) |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
73 |
TAGKEYS( XK_2, 1) |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
74 |
TAGKEYS( XK_3, 2) |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
75 |
TAGKEYS( XK_4, 3) |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
76 |
TAGKEYS( XK_5, 4) |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
77 |
TAGKEYS( XK_6, 5) |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
78 |
TAGKEYS( XK_7, 6) |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
79 |
TAGKEYS( XK_8, 7) |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
80 |
TAGKEYS( XK_9, 8) |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
81 |
{ MODKEY|ShiftMask, XK_q, quit, {0} }, |
146
f328ce9c558c
centralized/externalized configuration to config.h
arg@10ksloc.org
parents:
diff
changeset
|
82 |
}; |
1270
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
83 |
|
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
84 |
/* button definitions */ |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
85 |
/* click can be a tag number (starting at 0), |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
86 |
* ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
87 |
static Button buttons[] = { |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
88 |
/* click event mask button function argument */ |
1289 | 89 |
{ ClkLtSymbol, 0, Button1, setlayout, {0} }, |
90 |
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, |
|
1270
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
91 |
{ ClkWinTitle, 0, Button2, zoom, {0} }, |
1275
e121660425a0
removed font and color definitions
Anselm R Garbe <garbeam@gmail.com>
parents:
1272
diff
changeset
|
92 |
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, |
1270
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
93 |
{ ClkClientWin, MODKEY, Button1, movemouse, {0} }, |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
94 |
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} }, |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
95 |
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} }, |
1301
45e486845a1f
removed useless characters
Anselm R Garbe <garbeam@gmail.com>
parents:
1295
diff
changeset
|
96 |
{ ClkTagBar, 0, Button1, view, {0} }, |
45e486845a1f
removed useless characters
Anselm R Garbe <garbeam@gmail.com>
parents:
1295
diff
changeset
|
97 |
{ ClkTagBar, 0, Button3, toggleview, {0} }, |
45e486845a1f
removed useless characters
Anselm R Garbe <garbeam@gmail.com>
parents:
1295
diff
changeset
|
98 |
{ ClkTagBar, MODKEY, Button1, tag, {0} }, |
1295
9f20458e3bbc
applied Gottox' ClkTagBar patch
Anselm R Garbe <garbeam@gmail.com>
parents:
1289
diff
changeset
|
99 |
{ ClkTagBar, MODKEY, Button3, toggletag, {0} }, |
1270
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
100 |
}; |
262ee84a2fdb
integrated yiyus mouse.diff (though the bar click handling is slightly broken, I'm to tired to debug it now, yiyus could you please?)
Anselm R Garbe <garbeam@gmail.com>
parents:
1269
diff
changeset
|
101 |