config.def.h (9314B)
1 /* See LICENSE file for copyright and license details. */ 2 3 /* appearance */ 4 static const unsigned int borderpx = 2; /* 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 standard bar */ 13 static const int topbar = 1; /* 0 means standard bar at bottom */ 14 static const int extrabar = 1; /* 0 means no extra bar */ 15 static const char statussep = ';'; /* separator between statuses */ 16 static const char *fonts[] = { "monospace:size=10" }; 17 static const char dmenufont[] = "monospace:size=10"; 18 static const char col_normbg[] = "#282A36"; 19 static const char col_normfg[] = "#FF79C6"; 20 static const char col_normbrd[] = "#282A36"; 21 static const char col_selbg[] = "#FF79C6"; 22 static const char col_selfg[] = "#282A36"; 23 static const char col_selbrd[] = "#FFB86C"; 24 static const char *colors[][3] = { 25 /* fg bg border */ 26 [SchemeNorm] = { col_normfg, col_normbg, col_normbrd }, 27 [SchemeSel] = { col_selfg, col_selbg, col_selbrd }, 28 }; 29 30 typedef struct { 31 const char *name; 32 const void *cmd; 33 } Sp; 34 const char *spcmd1[] = {"st", "-n", "spterm", "-g", "120x34", NULL }; 35 const char *spcmd2[] = {"st", "-n", "spfm", "-g", "144x41", "-e", "ranger", NULL }; 36 const char *spcmd3[] = {"st", "-n", "pmixer", "-g", "144x41", "-e", "pulsemixer", NULL }; 37 const char *spcmd4[] = {"keepassxc", NULL }; 38 const char *spcmd5[] = {"thunar", NULL }; 39 static Sp scratchpads[] = { 40 /* name cmd */ 41 {"spterm", spcmd1}, 42 {"spranger", spcmd2}, 43 {"pmixer", spcmd3}, 44 {"keepassxc", spcmd4}, 45 {"thunar", spcmd5}, 46 }; 47 48 /* tagging */ 49 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 50 static const Rule rules[] = { 51 /* xprop(1): 52 * WM_CLASS(STRING) = instance, class 53 * WM_NAME(STRING) = title 54 */ 55 /* class instance title tags mask isfloating isterminal noswallow monitor */ 56 { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 }, 57 { NULL, "Msgcompose", NULL, 0, 1, 0, 0, -1 }, 58 { NULL, "spterm", NULL, SPTAG(0), 1, 1, 0, -1 }, 59 { NULL, "spfm", NULL, SPTAG(1), 1, 1, 0, -1 }, 60 { NULL, "pmixer", NULL, SPTAG(2), 1, 1, 0, -1 }, 61 { NULL, "keepassxc", NULL, SPTAG(3), 1, 0, 0, -1 }, 62 { NULL, "thunar", NULL, SPTAG(4), 1, 0, 0, -1 }, 63 }; 64 65 /* layout(s) */ 66 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ 67 static const int nmaster = 1; /* number of clients in master area */ 68 static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ 69 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ 70 71 static const Layout layouts[] = { 72 /* symbol arrange function */ 73 { "[]=", tile }, /* first entry is default */ 74 { "><>", NULL }, /* no layout function means floating behavior */ 75 { "[M]", monocle }, 76 { "[][]=", tilewide }, 77 }; 78 79 /* key definitions */ 80 #define MODKEY Mod4Mask 81 #define TAGKEYS(KEY,TAG) \ 82 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ 83 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ 84 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ 85 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, 86 87 /* helper for spawning shell commands in the pre dwm-5.0 fashion */ 88 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 89 90 /* commands */ 91 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ 92 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_normbg, "-nf", col_normfg, "-sb", col_selbg, "-sf", col_selfg, NULL }; 93 static const char *termcmd[] = { "st", NULL }; 94 95 static const Key keys[] = { 96 /* modifier key function argument */ 97 { MODKEY, XK_Return, spawn, {.v = termcmd } }, 98 { MODKEY, XK_space, zoom, {0} }, 99 { MODKEY, XK_Tab, view, {0} }, 100 { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, 101 { MODKEY, XK_Left, focusmon, {.i = -1 } }, 102 { MODKEY, XK_Right, focusmon, {.i = +1 } }, 103 { MODKEY|ShiftMask, XK_Left, tagmon, {.i = -1 } }, 104 { MODKEY|ShiftMask, XK_Right, tagmon, {.i = +1 } }, 105 { MODKEY, XK_b, togglebar, {0} }, 106 { MODKEY|ShiftMask, XK_b, toggleextrabar, {0} }, 107 { MODKEY, XK_d, spawn, {.v = dmenucmd } }, 108 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, 109 { MODKEY, XK_g, togglegaps, {0} }, 110 { MODKEY|ShiftMask, XK_g, defaultgaps, {0} }, 111 { MODKEY, XK_h, setmfact, {.f = -0.05} }, 112 { MODKEY, XK_i, togglescratch, {.ui = 4 } }, 113 { MODKEY, XK_j, focusstack, {.i = +1 } }, 114 { MODKEY|ShiftMask, XK_j, incrgaps, {.i = -1 } }, 115 { MODKEY, XK_k, focusstack, {.i = -1 } }, 116 { MODKEY|ShiftMask, XK_k, incrgaps, {.i = +1 } }, 117 { MODKEY, XK_l, setmfact, {.f = +0.05} }, 118 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, 119 { MODKEY, XK_o, incnmaster, {.i = +1 } }, 120 { MODKEY|ShiftMask, XK_o, incnmaster, {.i = -1 } }, 121 { MODKEY, XK_p, togglescratch, {.ui = 2 } }, 122 { MODKEY, XK_q, killclient, {0} }, 123 { MODKEY|ShiftMask, XK_q, quit, {0} }, 124 { MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} }, 125 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, 126 { MODKEY, XK_u, togglescratch, {.ui = 1 } }, 127 { MODKEY, XK_w, setlayout, {.v = &layouts[3]} }, 128 { MODKEY, XK_x, togglescratch, {.ui = 3 } }, 129 { MODKEY, XK_y, togglescratch, {.ui = 0 } }, 130 { MODKEY, XK_0, view, {.ui = ~0 } }, 131 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, 132 TAGKEYS( XK_1, 0) 133 TAGKEYS( XK_2, 1) 134 TAGKEYS( XK_3, 2) 135 TAGKEYS( XK_4, 3) 136 TAGKEYS( XK_5, 4) 137 TAGKEYS( XK_6, 5) 138 TAGKEYS( XK_7, 6) 139 TAGKEYS( XK_8, 7) 140 TAGKEYS( XK_9, 8) 141 }; 142 143 /* button definitions */ 144 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ 145 static const Button buttons[] = { 146 /* click event mask button function argument */ 147 { ClkLtSymbol, 0, Button1, setlayout, {0} }, 148 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, 149 { ClkWinTitle, 0, Button2, zoom, {0} }, 150 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, 151 { ClkExBarLeftStatus, 0, Button2, spawn, {.v = termcmd } }, 152 { ClkExBarMiddle, 0, Button2, spawn, {.v = termcmd } }, 153 { ClkExBarRightStatus, 0, Button2, spawn, {.v = termcmd } }, 154 { ClkClientWin, MODKEY, Button1, movemouse, {0} }, 155 { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, 156 { ClkClientWin, MODKEY, Button1, resizemouse, {0} }, 157 { ClkTagBar, 0, Button1, view, {0} }, 158 { ClkTagBar, 0, Button3, toggleview, {0} }, 159 { ClkTagBar, MODKEY, Button1, tag, {0} }, 160 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 161 }; 162