config.def.h (view raw)
1/* See LICENSE file for copyright and license details. */
2
3/* appearance */
4static const unsigned int borderpx = 1; /* border pixel of windows */
5static const unsigned int snap = 32; /* snap pixel */
6static const int showbar = 1; /* 0 means no bar */
7static const int topbar = 1; /* 0 means bottom bar */
8static const char *fonts[] = { "Lato Medium:size=11" };
9static const char dmenufont[] = "JetBrains Mono Medium:size=11";
10static const char norm_fg[] = "#cadcde";
11static const char norm_bg[] = "#19191a";
12static const char norm_border[] = "#393838";
13static const char sel_fg[] = "#c7ea76";
14static const char sel_bg[] = "#5a514b";
15static const char sel_border[] = "#5a514b";
16static const char *colors[][3] = {
17 /* fg bg border */
18 [SchemeNorm] = { norm_fg, norm_bg, norm_border },
19 [SchemeSel] = { sel_fg, sel_bg, sel_border },
20};
21
22/* tagging */
23static const char *tags[] = {
24 "sona", "musi", "pali", "lipu", "poki", "toki", "suli", "lukin", "ante"
25};
26
27static const Rule rules[] = {
28 /* xprop(1):
29 * WM_CLASS(STRING) = instance, class
30 * WM_NAME(STRING) = title
31 */
32 /* class instance title tags mask isfloating monitor */
33 { "Qalculate-gtk", NULL, NULL, 0, 1, -1 },
34 { "Nitrogen", NULL, NULL, 0, 1, -1 },
35 { "Brave", NULL, NULL, 2, 0, -1 },
36 { "discord", NULL, NULL, 1 << 5, 0, -1 },
37 { "Gimp", NULL, NULL, 1 << 8, 1, -1 },
38 { "Blender", NULL, NULL, 1 << 8, 0, -1 },
39};
40
41/* layout(s) */
42static const float mfact = 0.5; /* factor of master area size [0.05..0.95] */
43static const int nmaster = 1; /* number of clients in master area */
44static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
45static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
46
47static const Layout layouts[] = {
48 /* symbol arrange function */
49 { "[]=", tile }, /* first entry is default */
50 { "><>", NULL }, /* no layout function means floating behavior */
51 { "[M]", monocle },
52};
53
54/* key definitions */
55#define MODKEY Mod4Mask
56#define TAGKEYS(KEY,TAG) \
57 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
58 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
59 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
60 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
61
62/* helper for spawning shell commands in the pre dwm-5.0 fashion */
63#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
64
65/* commands */
66static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
67static const char *dmenucmd[] = {
68 "dmenu_run", "-m", dmenumon, "-fn", dmenufont,
69 "-nb", norm_bg, "-nf", norm_fg, "-sb", sel_bg, "-sf", sel_fg, NULL
70};
71static const char *termcmd[] = { "alacritty", NULL };
72static const char *editorcmd[] = { "emacsclient", "-c", NULL };
73static const char *browsercmd[] = { "brave", NULL };
74
75/* scrot */
76static const char *scrot_full[] = { "scrot_cmd", "--full", NULL };
77static const char *scrot_focused[] = { "scrot_cmd", "--focused", NULL };
78static const char *scrot_area[] = { "scrot_cmd", "--area", NULL };
79
80static Key keys[] = {
81 /* modifier key function argument */
82 { MODKEY, XK_p, spawn, {.v = dmenucmd } },
83 { MODKEY, XK_Return, spawn, {.v = termcmd } },
84 { MODKEY|ShiftMask, XK_e, spawn, {.v = editorcmd } },
85 { MODKEY, XK_w, spawn, {.v = browsercmd } },
86 { 0, XK_Print, spawn, {.v = scrot_full } },
87 { ControlMask, XK_Print, spawn, {.v = scrot_area } },
88 { Mod1Mask, XK_Print, spawn, {.v = scrot_focused } },
89 { MODKEY, XK_b, togglebar, {0} },
90 { MODKEY, XK_j, focusstack, {.i = +1 } },
91 { MODKEY, XK_k, focusstack, {.i = -1 } },
92 { MODKEY, XK_i, incnmaster, {.i = +1 } },
93 { MODKEY, XK_d, incnmaster, {.i = -1 } },
94 { MODKEY, XK_h, setmfact, {.f = -0.01} },
95 { MODKEY, XK_l, setmfact, {.f = +0.01} },
96 { MODKEY|ShiftMask, XK_Return, zoom, {0} },
97 { MODKEY, XK_Tab, view, {0} },
98 { MODKEY|ShiftMask, XK_c, killclient, {0} },
99 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
100 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
101 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
102 { MODKEY, XK_space, setlayout, {0} },
103 { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
104 { MODKEY, XK_0, view, {.ui = ~0 } },
105 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
106 { MODKEY, XK_comma, focusmon, {.i = -1 } },
107 { MODKEY, XK_period, focusmon, {.i = +1 } },
108 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
109 { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
110 TAGKEYS( XK_1, 0)
111 TAGKEYS( XK_2, 1)
112 TAGKEYS( XK_3, 2)
113 TAGKEYS( XK_4, 3)
114 TAGKEYS( XK_5, 4)
115 TAGKEYS( XK_6, 5)
116 TAGKEYS( XK_7, 6)
117 TAGKEYS( XK_8, 7)
118 TAGKEYS( XK_9, 8)
119 { MODKEY|ShiftMask, XK_q, quit, {0} },
120};
121
122/* button definitions */
123/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
124static Button buttons[] = {
125 /* click event mask button function argument */
126 { ClkLtSymbol, 0, Button1, setlayout, {0} },
127 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
128 { ClkWinTitle, 0, Button2, zoom, {0} },
129 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
130 { ClkClientWin, MODKEY, Button1, movemouse, {0} },
131 { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
132 { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
133 { ClkTagBar, 0, Button1, view, {0} },
134 { ClkTagBar, 0, Button3, toggleview, {0} },
135 { ClkTagBar, MODKEY, Button1, tag, {0} },
136 { ClkTagBar, MODKEY, Button3, toggletag, {0} },
137};
138