config.def.h (9791B)
1 /* See LICENSE file for copyright and license details. */ 2 3 /* appearance */ 4 static const unsigned int borderpx = 0; /* border pixel of windows */ 5 static const unsigned int snap = 32; /* snap pixel */ 6 static const unsigned int gappih = 10; /* horiz inner gap between windows */ 7 static const unsigned int gappiv = 10; /* vert inner gap between windows */ 8 static const unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */ 9 static const unsigned int gappov = 10; /* vert outer gap between windows and screen edge */ 10 static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */ 11 static const int swallowfloating = 0; /* 1 means swallow floating windows by default */ 12 static const int showbar = 1; /* 0 means no bar */ 13 static const int topbar = 1; /* 0 means bottom bar */ 14 static const int horizpadbar = 2; /* horizontal padding for statusbar */ 15 static const int vertpadbar = 3; /* vertical padding for statusbar */ 16 static const int vertpad = 10; /* vertical padding of bar */ 17 static const int sidepad = 10; /* horizontal padding of bar */ 18 static const char *fonts[] = { "monospace:size=10" }; 19 static const char dmenufont[] = "monospace:size=10"; 20 static char normbgcolor[] = "#222222"; 21 static char normbordercolor[] = "#444444"; 22 static char normfgcolor[] = "#bbbbbb"; 23 static char selfgcolor[] = "#eeeeee"; 24 static char selbordercolor[] = "#005577"; 25 static char selbgcolor[] = "#005577"; 26 static char *colors[][3] = { 27 /* fg bg border */ 28 [SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor }, 29 [SchemeSel] = { selfgcolor, selbgcolor, selbordercolor }, 30 }; 31 32 typedef struct { 33 const char *name; 34 const void *cmd; 35 } Sp; 36 const char *spcmd1[] = {"st", "-n", "spmixer", "-g", "120x34", "-e", "pulsemixer", NULL }; 37 const char *spcmd2[] = {"st", "-n", "spfm", "-g", "144x41", "-e", "ranger", NULL }; 38 const char *spcmd3[] = {"keepassxc", NULL }; 39 static Sp scratchpads[] = { 40 /* name cmd */ 41 {"spmixer", spcmd1}, 42 {"spranger", spcmd2}, 43 {"keepassxc", spcmd3}, 44 }; 45 46 /* tagging */ 47 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 48 static const Rule rules[] = { 49 /* xprop(1): 50 * WM_CLASS(STRING) = instance, class 51 * WM_NAME(STRING) = title 52 */ 53 /* class instance title tags mask isfloating isterminal noswallow monitor */ 54 { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 }, 55 { "Firefox", NULL, NULL, 1 << 8, 0, 0, -1, -1 }, 56 { "St", NULL, NULL, 0, 0, 1, 0, -1 }, 57 { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */ 58 { NULL, "spmixer", NULL, SPTAG(0), 1, 1, 1, -1 }, 59 { NULL, "spfm", NULL, SPTAG(1), 1, 1, 1, -1 }, 60 { NULL, "keepassxc", NULL, SPTAG(2), 0, 0, 1, -1 }, 61 }; 62 63 /* layout(s) */ 64 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ 65 static const int nmaster = 1; /* number of clients in master area */ 66 static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ 67 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ 68 static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */ 69 70 static const Layout layouts[] = { 71 /* symbol arrange function */ 72 { "[]=", tile }, /* first entry is default */ 73 { "><>", NULL }, /* no layout function means floating behavior */ 74 { "[M]", monocle }, 75 }; 76 77 /* key definitions */ 78 #define MODKEY Mod4Mask 79 #define TAGKEYS(KEY,TAG) \ 80 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ 81 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ 82 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ 83 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, 84 85 /* helper for spawning shell commands in the pre dwm-5.0 fashion */ 86 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 87 88 /* commands */ 89 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ 90 static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; 91 static const char *termcmd[] = { "st", NULL }; 92 93 static Key keys[] = { 94 /* modifier key function argument */ 95 { MODKEY, XK_d, spawn, {.v = dmenucmd } }, 96 { MODKEY, XK_Return, spawn, {.v = termcmd } }, 97 { MODKEY, XK_b, togglebar, {0} }, 98 { MODKEY, XK_j, focusstack, {.i = +1 } }, 99 { MODKEY, XK_k, focusstack, {.i = -1 } }, 100 { MODKEY|ControlMask, XK_k, incnmaster, {.i = +1 } }, 101 { MODKEY|ControlMask, XK_j, incnmaster, {.i = -1 } }, 102 { MODKEY, XK_h, setmfact, {.f = -0.05} }, 103 { MODKEY, XK_l, setmfact, {.f = +0.05} }, 104 { MODKEY, XK_space, zoom, {0} }, 105 { MODKEY, XK_Tab, view, {0} }, 106 { MODKEY, XK_q, killclient, {0} }, 107 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, 108 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, 109 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, 110 { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, 111 { MODKEY, XK_0, view, {.ui = ~0 } }, 112 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, 113 { MODKEY, XK_comma, focusmon, {.i = -1 } }, 114 { MODKEY, XK_period, focusmon, {.i = +1 } }, 115 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, 116 { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, 117 { MODKEY, XK_p, togglescratch, {.ui = 0 } }, 118 { MODKEY, XK_u, togglescratch, {.ui = 1 } }, 119 { MODKEY, XK_x, togglescratch, {.ui = 2 } }, 120 { MODKEY, XK_F5, xrdb, {.v = NULL } }, 121 { MODKEY|ShiftMask, XK_h, incrgaps, {.i = +1 } }, 122 { MODKEY|ShiftMask, XK_l, incrgaps, {.i = -1 } }, 123 { MODKEY|Mod4Mask|ShiftMask, XK_h, incrogaps, {.i = +1 } }, 124 { MODKEY|Mod4Mask|ShiftMask, XK_l, incrogaps, {.i = -1 } }, 125 { MODKEY|Mod4Mask|ControlMask, XK_h, incrigaps, {.i = +1 } }, 126 { MODKEY|Mod4Mask|ControlMask, XK_l, incrigaps, {.i = -1 } }, 127 { MODKEY, XK_g, togglegaps, {0} }, 128 { MODKEY|ShiftMask, XK_g, defaultgaps, {0} }, 129 { MODKEY, XK_y, incrihgaps, {.i = +1 } }, 130 { MODKEY, XK_o, incrihgaps, {.i = -1 } }, 131 { MODKEY|ControlMask, XK_y, incrivgaps, {.i = +1 } }, 132 { MODKEY|ControlMask, XK_o, incrivgaps, {.i = -1 } }, 133 { MODKEY|Mod4Mask, XK_y, incrohgaps, {.i = +1 } }, 134 { MODKEY|Mod4Mask, XK_o, incrohgaps, {.i = -1 } }, 135 { MODKEY|ShiftMask, XK_y, incrovgaps, {.i = +1 } }, 136 { MODKEY|ShiftMask, XK_o, incrovgaps, {.i = -1 } }, 137 TAGKEYS( XK_1, 0) 138 TAGKEYS( XK_2, 1) 139 TAGKEYS( XK_3, 2) 140 TAGKEYS( XK_4, 3) 141 TAGKEYS( XK_5, 4) 142 TAGKEYS( XK_6, 5) 143 TAGKEYS( XK_7, 6) 144 TAGKEYS( XK_8, 7) 145 TAGKEYS( XK_9, 8) 146 { MODKEY|ShiftMask, XK_q, quit, {0} }, 147 }; 148 149 /* button definitions */ 150 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ 151 static const Button buttons[] = { 152 /* click event mask button function argument */ 153 { ClkLtSymbol, 0, Button1, setlayout, {0} }, 154 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, 155 { ClkWinTitle, 0, Button2, zoom, {0} }, 156 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, 157 { ClkClientWin, MODKEY, Button1, movemouse, {0} }, 158 { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, 159 { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, 160 { ClkTagBar, 0, Button1, view, {0} }, 161 { ClkTagBar, 0, Button3, toggleview, {0} }, 162 { ClkTagBar, MODKEY, Button1, tag, {0} }, 163 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 164 }; 165