1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
|
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 2; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
static const unsigned int systrayspacing = 2; /* systray spacing */
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
static int showsystray = 0; /* 0 means no systray */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const int barpadding = 10;
static const int barheight = 12; /* + font height */
static const char *fonts[] = { "monospace:pixelsize=15", "Font Awesome 5 Free Solid:pixelsize=18" };
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { "#a374ba", "#15191e", "#15191e" }, /* Unselected window */
[SchemeSel] = { "#a374ba", "#383847", "#a374ba" }, /* Selected window */
};
typedef struct {
const char *name;
const void *cmd;
} Sp;
const char *keepassxc_sp[] = {"org.keepassxc.KeePassXC", "-name", "keepassxc-sp", NULL };
static Sp scratchpads[] = {
/* name cmd */
{"keepassxc", keepassxc_sp},
};
/* tagging */
static const char *tags[] = { "1 ", "2 ", "3 ", "4 ", "5 ", "6 ", "7 ", "8 ", "9 ", "10 " };
/* window rules */
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tag center float monitor */
/* Web (WS1) */
{ "Chromium", NULL, NULL, 1 << 0, 0, 0, -1 },
{ "Epiphany", NULL, NULL, 1 << 0, 0, 0, -1 },
{ "Falkon", NULL, NULL, 1 << 0, 0, 0, -1 },
{ "firefox", NULL, NULL, 1 << 0, 0, 0, -1 },
{ "Firefox", NULL, NULL, 1 << 0, 0, 0, -1 },
{ "firefoxdeveloperediton", NULL, NULL, 1 << 0, 0, 0, -1 },
{ "Midori", NULL, NULL, 1 << 0, 0, 0, -1 },
{ "Mullvad Browser", NULL, NULL, 1 << 0, 0, 0, -1 },
{ "qutebrowser", NULL, NULL, 1 << 0, 0, 0, -1 },
{ "Tor Browser", NULL, NULL, 1 << 0, 0, 0, -1 },
/* Code (WS2) */
{ "Code - OSS", NULL, NULL, 1 << 1, 0, 0, -1 },
/* Messages (WS4) */
{ "discord", NULL, NULL, 1 << 3, 0, 0, -1 },
{ "Element", NULL, NULL, 1 << 3, 0, 0, -1 },
{ "Keybase", NULL, NULL, 1 << 3, 0, 0, -1 },
{ "Signal", NULL, NULL, 1 << 3, 0, 0, -1 },
{ "TelegramDesktop", NULL, NULL, 1 << 3, 0, 0, -1 },
/* Mail (WS5) */
{ NULL, "aerc", NULL, 1 << 4, 0, 0, -1 },
{ NULL, "neomutt", NULL, 1 << 4, 0, 0, -1 },
{ "Thunderbird", NULL, NULL, 1 << 4, 0, 0, -1 },
/* Documents (WS6) */
{ "Evince", NULL, NULL, 1 << 5, 0, 0, -1 },
{ "libreoffice", NULL, NULL, 1 << 5, 0, 0, -1 },
{ "libreoffice-calc", NULL, NULL, 1 << 5, 0, 0, -1 },
{ "libreoffice-impress", NULL, NULL, 1 << 5, 0, 0, -1 },
{ "libreoffice-math", NULL, NULL, 1 << 5, 0, 0, -1 },
{ "libreoffice-writer", NULL, NULL, 1 << 5, 0, 0, -1 },
{ "Zathura", NULL, NULL, 1 << 5, 0, 0, -1 },
/* Graphics (WS7) */
{ "Gimp", NULL, NULL, 1 << 6, 0, 0, -1 },
{ "Inkscape", NULL, NULL, 1 << 6, 0, 0, -1 },
{ "libreoffice-draw", NULL, NULL, 1 << 5, 0, 0, -1 },
/* Games (WS8) */
{ "cartridges", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "Citra", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "Desmume", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "dolphin-emu", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "duckstation-qt", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "flycast", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "Gnome-2048", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "gnome-chess", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "Gnome-mahjongg", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "Gnome-mines", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "Gnome-sudoku", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "Gnome-tetravex", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "heroic", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "Hiro", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "lsdl2srb2", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "melonDS", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "mGBA", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "Minecraft", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "org.ppsspp.PPSSPP", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "pcsx2-qt", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "PrismLauncher", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "ProtonUp-Qt", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "Quadrapassel", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "retroarch", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "Rosalie's Mupen GUI", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "RPCS3", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "Ryujinx", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "Slippi", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "Snes9x-gtk", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "steam", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "supertuxkart", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "xemu", NULL, NULL, 1 << 7, 0, 0, -1 },
{ "yuzu", NULL, NULL, 1 << 7, 0, 0, -1 },
/* Music (WS9) */
{ NULL, "ncmpcpp", NULL, 1 << 8, 0, 0, -1 },
{ "alsa-scarlett-gui", NULL, NULL, 1 << 8, 0, 0, -1 },
{ "Audacity", NULL, NULL, 1 << 8, 0, 0, -1 },
{ "Rhythmbox", NULL, NULL, 1 << 8, 0, 0, -1 },
/* Video (WS10) */
{ "kdenlive", NULL, NULL, 1 << 9, 0, 0, -1 },
{ "mpv", NULL, NULL, 1 << 9, 0, 0, -1 },
{ "obs", NULL, NULL, 1 << 9, 0, 0, -1 },
{ "vlc", NULL, NULL, 1 << 9, 0, 0, -1 },
/* Scratchpad */
{ NULL, "keepassxc-sp", NULL, SPTAG(0), 0, 1, -1 },
/* Other */
{ "Gcolor3", NULL, NULL, 0, 1, 1, -1 },
{ "gnome-calculator", NULL, NULL, 0, 1, 1, -1 },
{ "Nl.hjdskes.gcolor3", NULL, NULL, 0, 1, 1, -1 },
{ "re.sonny.Junction", NULL, NULL, 0, 1, 1, -1 },
};
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* default */
{ "[M]", monocle },
{ "()(", NULL }, /* floating */
};
/*
* key definitions
*/
#define Mod Mod4Mask
#define Alt Mod1Mask
#define Ctrl ControlMask
#define Shift ShiftMask
#define Tag(KEY,TAG) \
{ Mod, KEY, view, {.ui = 1 << TAG} }, \
{ Mod|Ctrl, KEY, toggleview, {.ui = 1 << TAG} }, \
{ Mod|Shift, KEY, tag, {.ui = 1 << TAG} }, \
{ Mod|Ctrl|Shift, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
static Key keys[] = {
/* modifier key function argument */
/* layout */
{ Mod, XK_e, setlayout, {.v = &layouts[0]} },
{ Mod, XK_w, setlayout, {.v = &layouts[1]} },
/* toggle */
{ Mod, XK_bracketright, togglesystray, {0} },
{ Mod, XK_s, togglesticky, {0} },
{ Mod|Shift, XK_space, togglefloating, {0} },
{ Mod, XK_b, togglebar, {0} },
{ Mod, XK_F11, togglefullscr, {0} },
/* stack */
{ Alt, XK_Return, zoom, {0} },
{ Alt, XK_j, focusstack, {.i = +1 } },
{ Alt, XK_k, focusstack, {.i = -1 } },
{ Mod|Shift, XK_j, pushdown, {0} },
{ Mod|Shift, XK_k, pushup, {0} },
{ Mod, XK_h, setmfact, {.f = -0.025} },
{ Mod, XK_l, setmfact, {.f = +0.025} },
{ Mod, XK_equal, incnmaster, {.i = +1 } },
{ Mod, XK_minus, incnmaster, {.i = -1 } },
/* murderer */
{ Mod|Shift, XK_q, killclient, {0} },
{ Mod|Shift, XK_x, quit, {0} },
/* tag */
Tag( XK_1, 0)
Tag( XK_2, 1)
Tag( XK_3, 2)
Tag( XK_4, 3)
Tag( XK_5, 4)
Tag( XK_6, 5)
Tag( XK_7, 6)
Tag( XK_8, 7)
Tag( XK_9, 8)
Tag( XK_0, 9)
{ Mod, XK_j, shiftview, {.i = +1 } },
{ Mod, XK_k, shiftview, {.i = -1 } },
{ Mod, XK_Tab, view, {0} },
{ Mod, XK_p, togglescratch, {.ui = 0 } },
/* monitor */
{ Alt, XK_h, focusmon, {.i = +1 } },
{ Alt, XK_l, focusmon, {.i = -1 } },
{ Mod|Shift, XK_h, tagmon, {.i = +1 } },
{ Mod|Shift, XK_l, tagmon, {.i = -1 } },
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkClientWin, Mod, Button1, movemouse, {0} },
{ ClkClientWin, Mod, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, Mod, Button1, tag, {0} },
{ ClkTagBar, Mod, Button3, toggletag, {0} },
};
/* vim: ft=c
*/
|