comparison config/dwm/config.def.h @ 0:face7f4d84f7

Initial commit
author Yasuri <yasuri@charliesmp.net>
date Mon, 28 Sep 2026 13:10:19 -0500
parents
children f78c8a98f113
comparison
equal deleted inserted replaced
-1:000000000000 0:face7f4d84f7
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 unsigned int gappih = 20; /* horiz inner gap between windows */
7 static const unsigned int gappiv = 10; /* vert inner gap between windows */
8 static const unsigned int gappoh = 0; /* horiz outer gap between windows and screen edge */
9 static const unsigned int gappov = 0; /* vert outer gap between windows and screen edge */
10 static int smartgaps = 0; /* 1 means no outer gap when there is only one window */
11 static const int showbar = 1; /* 0 means no bar */
12 static const int topbar = 1; /* 0 means bottom bar */
13 static const char *fonts[] = { "JetBrainsMono Nerd Font Propo:size=10" };
14 static const char dmenufont[] = "JetBrainsMono Nerd Font Propo:size=10";
15 static const char col_bg[] = "#1c1a2b";
16 static const char col_border[] = "#4a4668";
17 static const char col_fg[] = "#e8e0f0";
18 static const char col_selfg[] = "#1c1a2b";
19 static const char col_selbg[] = "#f5b0d8";
20 static const char col_selbrd[] = "#6ecbff";
21
22 static const char *colors[][3] = {
23 /* fg bg border */
24 [SchemeNorm] = { col_fg, col_bg, col_border },
25 [SchemeSel] = { col_selfg, col_selbg, col_selbrd },
26 };
27
28 /* tagging */
29 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
30
31 static const Rule rules[] = {
32 /* xprop(1):
33 * WM_CLASS(STRING) = instance, class
34 * WM_NAME(STRING) = title
35 */
36 /* class instance title tags mask isfloating monitor */
37 { "Gimp", NULL, NULL, 0, 1, -1 },
38 { "Firefox", NULL, NULL, 1 << 8, 0, -1 },
39 };
40
41 /* layout(s) */
42 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
43 static const int nmaster = 1; /* number of clients in master area */
44 static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
45 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
46 static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */
47
48 #define FORCE_VSPLIT 1 /* nrowgrid layout: force two clients to always split vertically */
49 #include "vanitygaps.c"
50
51 static const Layout layouts[] = {
52 /* symbol arrange function */
53 { "[]=", tile }, /* first entry is default */
54 { "[M]", monocle },
55 { "[@]", spiral },
56 { "[\\]", dwindle },
57 { "H[]", deck },
58 { "TTT", bstack },
59 { "===", bstackhoriz },
60 { "HHH", grid },
61 { "###", nrowgrid },
62 { "---", horizgrid },
63 { ":::", gaplessgrid },
64 { "|M|", centeredmaster },
65 { ">M>", centeredfloatingmaster },
66 { "><>", NULL }, /* no layout function means floating behavior */
67 { NULL, NULL },
68 };
69
70 /* key definitions */
71 #define MODKEY Mod4Mask
72 #define TAGKEYS(KEY,TAG) \
73 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
74 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
75 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
76 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
77
78 /* helper for spawning shell commands in the pre dwm-5.0 fashion */
79 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
80
81 /* commands */
82 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
83 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_bg, "-nf", col_fg, "-sb", col_selbg, "-sf", col_selfg, NULL };
84 static const char *termcmd[] = { "st", NULL };
85
86 static const Key keys[] = {
87 /* modifier key function argument */
88 { MODKEY, XK_d, spawn, {.v = dmenucmd } },
89 { MODKEY, XK_Return, spawn, {.v = termcmd } },
90 { MODKEY, XK_b, togglebar, {0} },
91 { MODKEY, XK_j, focusstack, {.i = +1 } },
92 { MODKEY, XK_k, focusstack, {.i = -1 } },
93 { MODKEY, XK_i, incnmaster, {.i = +1 } },
94 { MODKEY, XK_p, incnmaster, {.i = -1 } },
95 { MODKEY, XK_h, setmfact, {.f = -0.05} },
96 { MODKEY, XK_l, setmfact, {.f = +0.05} },
97 { MODKEY|ShiftMask, XK_h, setcfact, {.f = +0.25} },
98 { MODKEY|ShiftMask, XK_l, setcfact, {.f = -0.25} },
99 { MODKEY|ShiftMask, XK_o, setcfact, {.f = 0.00} },
100 { MODKEY|ShiftMask, XK_Return, zoom, {0} },
101 { MODKEY|Mod4Mask, XK_u, incrgaps, {.i = +1 } },
102 { MODKEY|Mod4Mask|ShiftMask, XK_u, incrgaps, {.i = -1 } },
103 { MODKEY|Mod4Mask, XK_i, incrigaps, {.i = +1 } },
104 { MODKEY|Mod4Mask|ShiftMask, XK_i, incrigaps, {.i = -1 } },
105 { MODKEY|Mod4Mask, XK_o, incrogaps, {.i = +1 } },
106 { MODKEY|Mod4Mask|ShiftMask, XK_o, incrogaps, {.i = -1 } },
107 { MODKEY|Mod4Mask, XK_6, incrihgaps, {.i = +1 } },
108 { MODKEY|Mod4Mask|ShiftMask, XK_6, incrihgaps, {.i = -1 } },
109 { MODKEY|Mod4Mask, XK_7, incrivgaps, {.i = +1 } },
110 { MODKEY|Mod4Mask|ShiftMask, XK_7, incrivgaps, {.i = -1 } },
111 { MODKEY|Mod4Mask, XK_8, incrohgaps, {.i = +1 } },
112 { MODKEY|Mod4Mask|ShiftMask, XK_8, incrohgaps, {.i = -1 } },
113 { MODKEY|Mod4Mask, XK_9, incrovgaps, {.i = +1 } },
114 { MODKEY|Mod4Mask|ShiftMask, XK_9, incrovgaps, {.i = -1 } },
115 { MODKEY|Mod4Mask, XK_0, togglegaps, {0} },
116 { MODKEY|Mod4Mask|ShiftMask, XK_0, defaultgaps, {0} },
117 { MODKEY, XK_Tab, view, {0} },
118 { MODKEY, XK_q, killclient, {0} },
119 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
120 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
121 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
122 { MODKEY, XK_space, setlayout, {0} },
123 { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
124 { MODKEY, XK_0, view, {.ui = ~0 } },
125 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
126 { MODKEY, XK_comma, focusmon, {.i = -1 } },
127 { MODKEY, XK_period, focusmon, {.i = +1 } },
128 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
129 { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
130 TAGKEYS( XK_1, 0)
131 TAGKEYS( XK_2, 1)
132 TAGKEYS( XK_3, 2)
133 TAGKEYS( XK_4, 3)
134 TAGKEYS( XK_5, 4)
135 TAGKEYS( XK_6, 5)
136 TAGKEYS( XK_7, 6)
137 TAGKEYS( XK_8, 7)
138 TAGKEYS( XK_9, 8)
139 { MODKEY|ShiftMask, XK_q, quit, {0} },
140 };
141
142 /* button definitions */
143 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
144 static const Button buttons[] = {
145 /* click event mask button function argument */
146 { ClkLtSymbol, 0, Button1, setlayout, {0} },
147 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
148 { ClkWinTitle, 0, Button2, zoom, {0} },
149 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
150 { ClkClientWin, MODKEY, Button1, movemouse, {0} },
151 { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
152 { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
153 { ClkTagBar, 0, Button1, view, {0} },
154 { ClkTagBar, 0, Button3, toggleview, {0} },
155 { ClkTagBar, MODKEY, Button1, tag, {0} },
156 { ClkTagBar, MODKEY, Button3, toggletag, {0} },
157 };
158