added pertag patch
[dwm.git] / config.def.h
1 /* See LICENSE file for copyright and license details. */
2
3 /* appearance */
4 static const char font[] = "Latin Modern Mono 9";
5 static const char normbordercolor[] = "#444444";
6 static const char normbgcolor[] = "#000022";
7 static const char normfgcolor[] = "#ddaaff";
8 static const char selbordercolor[] = "#aa00aa";
9 static const char selbgcolor[] = "#000022";
10 static const char selfgcolor[] = "#ffffff";
11 static const unsigned int borderpx = 1; /* border pixel of windows */
12 static const unsigned int snap = 32; /* snap pixel */
13 static const Bool showbar = True; /* False means no bar */
14 static const Bool topbar = True; /* False means bottom bar */
15 static const Bool statusmarkup = True; /* True means use pango markup in status message */
16
17 /* tagging */
18 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
19
20 static const Rule rules[] = {
21 /* class instance title tags mask isfloating monitor */
22 { "Gimp", NULL, NULL, 1 << 3, False, -1 },
23 { "fontforge", NULL, NULL, 1 << 2, True, -1 },
24 { "Iceweasel", NULL, NULL, 1 << 4, False, -1 },
25 { "Firefox", NULL, NULL, 1 << 4, False, -1 },
26 { "Emacs", NULL, NULL, 1, False, -1 },
27 { "Pidgin", NULL, NULL, 1 << 5, False, -1 },
28 };
29
30 /* layout(s) */
31 static const float mfact = 0.66; /* factor of master area size [0.05..0.95] */
32 static const int nmaster = 1; /* number of clients in master area */
33 static const Bool resizehints = False; /* True means respect size hints in tiled resizals */
34
35 static const Layout layouts[] = {
36 /* symbol arrange function */
37 { "[M]", monocle },
38 { "[]=", tile }, /* first entry is default */
39 { "><>", NULL }, /* no layout function means floating behavior */
40 };
41
42 /* key definitions */
43 #define MODKEY Mod4Mask
44 #define TAGKEYS(KEY,TAG) \
45 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
46 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
47 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
48 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
49
50 /* helper for spawning shell commands in the pre dwm-5.0 fashion */
51 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
52
53 /* commands */
54 static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
55 static const char *termcmd[] = { "x-terminal-emulator", NULL };
56 static const char *lockcmd[] = { "slock", NULL };
57 static const char *sshadd[] = { "ssh-add-x", NULL}; /* add .ssh/id_rsa to the ssh agent */
58 /* run rsync on the server's maildir. Run ssh-add before doing this.*/
59 static const char *getmail[] = { "/home/gpcf/software/mail/getmail.sh", NULL};
60 /* run script that sends emails over ssh */
61 static const char *sendmail[] = { "/home/gpcf/software/mail/sendmail.sh", NULL};
62
63 static Key keys[] = {
64 /* modifier key function argument */
65 { MODKEY, XK_a, spawn, {.v = sshadd} },
66 { MODKEY, XK_s, spawn, {.v = sendmail} },
67 { MODKEY, XK_g, spawn, {.v = getmail} },
68 { MODKEY, XK_x, spawn, {.v = dmenucmd } },
69 { MODKEY|ShiftMask, XK_l, spawn, {.v = lockcmd } },
70 { MODKEY, XK_e, findwindow, {.v= "Emacs"} },
71 { MODKEY, XK_p, findwindow, {.v= "Pidgin"} },
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} },
81 { MODKEY, XK_Tab, view, {0} },
82 { MODKEY|ShiftMask, XK_c, killclient, {0} },
83 { MODKEY, XK_t, setlayout, {.v = &layouts[1]} },
84 { MODKEY, XK_f, setlayout, {.v = &layouts[2]} },
85 { MODKEY, XK_m, setlayout, {.v = &layouts[0]} },
86 { MODKEY, XK_space, setlayout, {0} },
87 { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
88 { MODKEY, XK_0, view, {.ui = ~0 } },
89 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
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 } },
94 { MODKEY, XK_w, list_clients, {0} },
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)
104 { MODKEY|ShiftMask, XK_q, quit, {0} },
105 };
106
107 /* button definitions */
108 /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
109 static Button buttons[] = {
110 /* click event mask button function argument */
111 { ClkLtSymbol, 0, Button1, setlayout, {0} },
112 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
113 { ClkWinTitle, 0, Button2, zoom, {0} },
114 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
115 { ClkClientWin, MODKEY, Button1, movemouse, {0} },
116 { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
117 { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
118 { ClkTagBar, 0, Button1, view, {0} },
119 { ClkTagBar, 0, Button3, toggleview, {0} },
120 { ClkTagBar, MODKEY, Button1, tag, {0} },
121 { ClkTagBar, MODKEY, Button3, toggletag, {0} },
122 };