new config + uselessgap
[azarus-dwm.git] / config.h
blob7aafe7ccd13ba6a36a4548e3bc3c22e621d3b394
1 #include "X11/XF86keysym.h"
2 #include "fibonacci.c"
3 #include "push.c"
4 /* See LICENSE file for copyright and license details. */
5 /* appearance */
6 static const unsigned int borderpx = 1; /* border pixel of windows */
7 static const unsigned int snap = 32; /* snap pixel */
8 static const int showbar = 1; /* 0 means no bar */
9 static const int topbar = 1; /* 0 means bottom bar */
10 static const char normbgcolor[] = "#111111";
11 static const char normfgcolor[] = "#bbbbbb";
12 static const char selbordercolor[] = "#222222";
13 static const char selbgcolor[] = "#222222";
14 static const char selfgcolor[] = "#eeeeee";
15 static unsigned int baralpha = 0xa0;
16 static unsigned int borderalpha = OPAQUE;
17 static const char normbordercolor[] = "#444444";
18 static const char *fonts[] = { "xos4 Terminus:pixelsize=15" };
19 static const char dmenufont[] = "xos4 Terminus:pixelsize=15";
20 static const char col_gray1[] = "#222222";
21 static const char col_gray2[] = "#444444";
22 static const char col_gray3[] = "#bbbbbb";
23 static const char col_gray4[] = "#eeeeee";
24 static const char col_cyan[] = "#222222";
25 static const unsigned int gappx = 6; /* gap pixel between windows */
26 /* tagging */
27 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
28 static const Rule rules[] = {
29 /* xprop(1):
30 * WM_CLASS(STRING) = instance, class
31 * WM_NAME(STRING) = title */
32 /* class instance title tags mask isfloating monitor */
33 /*{ "Gimp", NULL, NULL, 0, 1, -1 },*/
34 /* { "Firefox", NULL, NULL, 1 << 8, 0, -1 },*/
35 { "Pinentry", NULL, NULL, 0, 1, -1 },
37 /* layout(s) */
38 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
39 static const int nmaster = 1; /* number of clients in master area */
40 static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
41 static const Layout layouts[] = {
42 /* symbol arrange function */
43 { "[]=", tile }, /* first entry is default */
44 { "><>", NULL }, /* no layout function means floating behavior */
45 { "[M]", monocle },
46 { "[\\]", dwindle },
47 { "[/]", spiral },
50 /* key definitions */
51 #define MODKEY Mod4Mask
52 #define TAGKEYS(KEY,TAG) \
53 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
54 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
55 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
56 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
58 /* helper for spawning shell commands in the pre dwm-5.0 fashion */
59 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
61 /* commands */
62 static char dmenumon[2] = "0"; /* component of dmenu, manipulated in spawn() */
63 static const char *dmenucmd[] = {"dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
64 //static const char *passmenucmd[] = {"/usr/share/pass/dmenu/passmenu", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
65 static const char *zath[] = {"zathura", NULL };
66 static const char *term[] = {"st", NULL };
67 static const char *brow[] = {"firefox", NULL };
68 static const char *play[] = {"mpc", "play", NULL };
69 static const char *stop[] = {"mpc", "stop", NULL};
70 static const char *next[] = {"mpc", "next", NULL};
71 static const char *prev[] = {"mpc", "prev", NULL};
72 static const char *togg[] = {"mpc", "toggle", NULL};
73 static const char *lock[] = {"slock", NULL};
74 static const char *lokk[] = {"lokk", NULL};
75 static const char *lowe[] = {"amixer", "-q", "sset", "Master", "5%-", NULL};
76 static const char *rais[] = {"amixer", "-q", "sset", "Master", "5%+", NULL};
78 static Key keys[] = {
79 /* modifier key function argument */
80 { MODKEY, XK_p, spawn, {.v = dmenucmd } },
81 { MODKEY|ShiftMask, XK_r, spawn, {.v = zath } },
82 { MODKEY|ShiftMask, XK_b, spawn, {.v = brow } },
83 { MODKEY|ShiftMask, XK_Return, spawn, {.v = term } },
84 { MODKEY|ShiftMask, XK_x, spawn, {.v = lock } },
85 { MODKEY|ShiftMask, XK_y, spawn, {.v = lokk } },
86 { 0, XF86XK_AudioNext, spawn, {.v = next } },
87 { 0, XF86XK_AudioPrev, spawn, {.v = prev } },
88 { 0, XF86XK_AudioStop, spawn, {.v = stop } },
89 { 0, XF86XK_AudioPlay, spawn, {.v = togg } },
90 { 0, XF86XK_AudioLowerVolume, spawn, {.v = lowe } },
91 { 0, XF86XK_AudioRaiseVolume, spawn, {.v = rais } },
92 { MODKEY, XK_b, togglebar, {0} },
93 { MODKEY, XK_j, focusstack, {.i = +1 } },
94 { MODKEY, XK_k, focusstack, {.i = -1 } },
95 { MODKEY, XK_i, incnmaster, {.i = +1 } },
96 { MODKEY, XK_d, incnmaster, {.i = -1 } },
97 { MODKEY, XK_h, setmfact, {.f = -0.05} },
98 { MODKEY, XK_l, setmfact, {.f = +0.05} },
99 { MODKEY, XK_Return, zoom, {0} },
100 { MODKEY, XK_Tab, view, {0} },
101 { MODKEY|ShiftMask, XK_c, killclient, {0} },
102 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
103 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
104 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
105 { MODKEY, XK_q, setlayout, {.v = &layouts[3]} },
106 { MODKEY, XK_w, setlayout, {.v = &layouts[4]} },
107 { MODKEY, XK_space, setlayout, {0} },
108 { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
109 { MODKEY, XK_0, view, {.ui = ~0 } },
110 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
111 { MODKEY, XK_comma, focusmon, {.i = -1 } },
112 { MODKEY, XK_period, focusmon, {.i = +1 } },
113 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
114 { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
115 { MODKEY|ControlMask, XK_j, pushdown, {0} },
116 { MODKEY|ControlMask, XK_k, pushup, {0} },
117 TAGKEYS( XK_1, 0)
118 TAGKEYS( XK_2, 1)
119 TAGKEYS( XK_3, 2)
120 TAGKEYS( XK_4, 3)
121 TAGKEYS( XK_5, 4)
122 TAGKEYS( XK_6, 5)
123 TAGKEYS( XK_7, 6)
124 TAGKEYS( XK_8, 7)
125 TAGKEYS( XK_9, 8)
126 { MODKEY|ShiftMask, XK_q, quit, {0} },
129 /* mouse button definitions */
130 /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
131 static Button buttons[] = {
132 /* click event mask button function argument */
133 { ClkLtSymbol, 0, Button1, setlayout, {0} },
134 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
135 { ClkWinTitle, 0, Button2, zoom, {0} },
136 { ClkStatusText, 0, Button2, spawn, {.v = term } },
137 { ClkClientWin, MODKEY, Button1, movemouse, {0} },
138 { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
139 { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
140 { ClkTagBar, 0, Button1, view, {0} },
141 { ClkTagBar, 0, Button3, toggleview, {0} },
142 { ClkTagBar, MODKEY, Button1, tag, {0} },
143 { ClkTagBar, MODKEY, Button3, toggletag, {0} },