Commit | Line | Data |
---|---|---|
1adeaf60 AT |
1 | /* See LICENSE file for copyright and license details. */ |
2 | ||
3 | /* appearance */ | |
4 | static const unsigned int borderpx = 1; /* border pixel of windows */ | |
5 | static const unsigned int snap = 32; /* snap pixel */ | |
6 | static const int showbar = 1; /* 0 means no bar */ | |
7 | static const int topbar = 1; /* 0 means bottom bar */ | |
ba835934 | 8 | static const int startontag = 1; /* 0 means no tag active on start */ |
1b6712a5 | 9 | static const char *fonts[] = { "monospace:size=12" }; |
a5832938 AT |
10 | // TODO: Make this central definition of the dmenufont apply everywhere. For |
11 | // example, at the moment it does not apply to the dmenu invocations found in | |
12 | // quitprompt() and nametag(). | |
1b6712a5 | 13 | static const char dmenufont[] = "monospace:size=12"; |
1adeaf60 AT |
14 | static const char col_gray1[] = "#222222"; |
15 | static const char col_gray2[] = "#444444"; | |
16 | static const char col_gray3[] = "#bbbbbb"; | |
17 | static const char col_gray4[] = "#eeeeee"; | |
18 | static const char col_cyan[] = "#005577"; | |
19 | static const char *colors[][3] = { | |
20 | /* fg bg border */ | |
21 | [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, | |
22 | [SchemeSel] = { col_gray4, col_cyan, col_cyan }, | |
23 | }; | |
24 | ||
25 | /* tagging */ | |
c56e7560 AT |
26 | #define MAX_TAGLEN 16 |
27 | static char tags[][MAX_TAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; | |
1adeaf60 AT |
28 | |
29 | static const Rule rules[] = { | |
30 | /* xprop(1): | |
31 | * WM_CLASS(STRING) = instance, class | |
32 | * WM_NAME(STRING) = title | |
33 | */ | |
34 | /* class instance title tags mask isfloating monitor */ | |
d9c1cfe3 | 35 | { "sample", NULL, NULL, 0, 1, -1 }, |
1adeaf60 AT |
36 | }; |
37 | ||
38 | /* layout(s) */ | |
39 | static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ | |
40 | static const int nmaster = 1; /* number of clients in master area */ | |
41 | static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ | |
42 | static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ | |
43 | ||
44 | static const Layout layouts[] = { | |
45 | /* symbol arrange function */ | |
46 | { "[]=", tile }, /* first entry is default */ | |
47 | { "><>", NULL }, /* no layout function means floating behavior */ | |
48 | { "[M]", monocle }, | |
49 | }; | |
50 | ||
51 | /* key definitions */ | |
52 | #define MODKEY Mod1Mask | |
53 | #define TAGKEYS(KEY,TAG) \ | |
54 | { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ | |
55 | { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ | |
56 | { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ | |
57 | { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, | |
58 | ||
59 | /* helper for spawning shell commands in the pre dwm-5.0 fashion */ | |
60 | #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } | |
61 | ||
62 | /* commands */ | |
63 | static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; | |
d9c1cfe3 AT |
64 | static const char *termcmd[] = { "xterm", NULL }; |
65 | static const char *lockcmd[] = { "xscreensaver-command", "-lock", NULL }; | |
66 | static const char *screenshotcmd[] = { "screenshot", NULL }; | |
9813966c | 67 | static const char *layoutmenu_cmd = "layoutmenu.sh"; |
1adeaf60 AT |
68 | |
69 | static const Key keys[] = { | |
70 | /* modifier key function argument */ | |
71 | { MODKEY, XK_p, spawn, {.v = dmenucmd } }, | |
72 | { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, | |
73 | { MODKEY, XK_b, togglebar, {0} }, | |
74 | { MODKEY, XK_j, focusstack, {.i = +1 } }, | |
75 | { MODKEY, XK_k, focusstack, {.i = -1 } }, | |
76 | { MODKEY, XK_i, incnmaster, {.i = +1 } }, | |
77 | { MODKEY, XK_d, incnmaster, {.i = -1 } }, | |
78 | { MODKEY, XK_h, setmfact, {.f = -0.05} }, | |
79 | { MODKEY, XK_l, setmfact, {.f = +0.05} }, | |
80 | { MODKEY, XK_Return, zoom, {0} }, | |
a9768a23 | 81 | { MODKEY, XK_Tab, comboview, {0} }, |
1adeaf60 AT |
82 | { MODKEY|ShiftMask, XK_c, killclient, {0} }, |
83 | { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, | |
84 | { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, | |
85 | { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, | |
86 | { MODKEY, XK_space, setlayout, {0} }, | |
87 | { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, | |
a9768a23 AT |
88 | { MODKEY, XK_0, comboview, {.ui = ~0 } }, |
89 | { MODKEY|ShiftMask, XK_0, combotag, {.ui = ~0 } }, | |
1adeaf60 AT |
90 | { MODKEY, XK_comma, focusmon, {.i = -1 } }, |
91 | { MODKEY, XK_period, focusmon, {.i = +1 } }, | |
92 | { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, | |
93 | { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, | |
c56e7560 | 94 | { MODKEY, XK_n, nametag, {0} }, |
1adeaf60 AT |
95 | TAGKEYS( XK_1, 0) |
96 | TAGKEYS( XK_2, 1) | |
97 | TAGKEYS( XK_3, 2) | |
98 | TAGKEYS( XK_4, 3) | |
99 | TAGKEYS( XK_5, 4) | |
100 | TAGKEYS( XK_6, 5) | |
101 | TAGKEYS( XK_7, 6) | |
102 | TAGKEYS( XK_8, 7) | |
103 | TAGKEYS( XK_9, 8) | |
d9c1cfe3 AT |
104 | { MODKEY|ShiftMask, XK_q, quitprompt, {0} }, |
105 | { MODKEY, XK_Escape, spawn, {.v = lockcmd } }, | |
106 | { MODKEY|ShiftMask, XK_Escape, spawn, {.v = screenshotcmd } }, | |
1adeaf60 AT |
107 | }; |
108 | ||
109 | /* button definitions */ | |
110 | /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ | |
111 | static const Button buttons[] = { | |
112 | /* click event mask button function argument */ | |
113 | { ClkLtSymbol, 0, Button1, setlayout, {0} }, | |
9813966c | 114 | { ClkLtSymbol, 0, Button3, layoutmenu, {0} }, |
1adeaf60 AT |
115 | { ClkWinTitle, 0, Button2, zoom, {0} }, |
116 | { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, | |
117 | { ClkClientWin, MODKEY, Button1, movemouse, {0} }, | |
118 | { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, | |
119 | { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, | |
a9768a23 | 120 | { ClkTagBar, 0, Button1, comboview, {0} }, |
1adeaf60 | 121 | { ClkTagBar, 0, Button3, toggleview, {0} }, |
a9768a23 | 122 | { ClkTagBar, MODKEY, Button1, combotag, {0} }, |
1adeaf60 AT |
123 | { ClkTagBar, MODKEY, Button3, toggletag, {0} }, |
124 | }; | |
125 |