config.h (7409B)
1 /* appearance */ 2 static const unsigned int borderpx = 2; /* border pixel of windows */ 3 static const unsigned int gappx = 4; /* gaps between windows */ 4 static const unsigned int snap = 28; /* snap pixel */ 5 static const int showbar = 1; /* 0 means no bar */ 6 static const int topbar = 1; /* 0 means bottom bar */ 7 static const char *fonts[] = { "Hack Nerd Font:size=9" }; 8 static const char dmenufont[] = { "Hack Nerd Font:size=9" }; 9 static const char col_gray1[] = "#222222"; 10 static const char col_gray2[] = "#444444"; 11 static const char col_gray3[] = "#bbbbbb"; 12 static const char col_gray4[] = "#eeeeee"; 13 static const char col_cyan[] = "#3f1e90"; 14 static const char *colors[][3] = { 15 /* fg bg border */ 16 [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, 17 [SchemeSel] = { col_gray4, col_cyan, col_cyan }, 18 }; 19 20 /* tagging */ 21 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 22 23 static const Rule rules[] = { 24 /* xprop(1): 25 * WM_CLASS(STRING) = instance, class 26 * WM_NAME(STRING) = title 27 */ 28 /* class instance title tags mask isfloating monitor */ 29 { "KeePassXC", NULL, NULL, 1 << 8, 0, -1 }, 30 { "element-desktop", NULL, NULL, 1 << 7, 0, -1 }, 31 }; 32 33 /* layout(s) */ 34 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ 35 static const int nmaster = 1; /* number of clients in master area */ 36 static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */ 37 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ 38 39 static const Layout layouts[] = { 40 /* symbol arrange function */ 41 { "[]=", tile }, /* first entry is default */ 42 { "><>", NULL }, /* no layout function means floating behavior */ 43 { "[M]", monocle }, 44 }; 45 46 /* key definitions */ 47 #define MODKEY Mod4Mask 48 #define TAGKEYS(KEY,TAG) \ 49 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ 50 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ 51 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ 52 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, 53 54 /* helper for spawning shell commands in the pre dwm-5.0 fashion */ 55 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 56 57 /* commands */ 58 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ 59 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; 60 static const char *browsercmd[] = { "librewolf", NULL }; 61 static const char *audiocmd[] = { "pavucontrol", NULL }; 62 static const char *printcmd[] = { "scrot", "-s", NULL }; 63 static const char *passwdcmd[] = { "keepassxc", NULL }; 64 static const char *termcmd[] = { "st", NULL }; 65 static const char *audioup[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "+5%", NULL }; 66 static const char *audiodown[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "-5%", NULL }; 67 68 static const Key keys[] = { 69 /* modifier key function argument */ 70 { MODKEY, XK_F3, spawn, {.v = audioup } }, 71 { MODKEY, XK_F2, spawn, {.v = audiodown } }, 72 { MODKEY, XK_p, spawn, {.v = audiocmd } }, 73 74 { 0, XK_Print, spawn, {.v = printcmd } }, 75 { MODKEY|ShiftMask, XK_k, spawn, {.v = passwdcmd } }, 76 { MODKEY, XK_r, spawn, {.v = dmenucmd } }, 77 { MODKEY, XK_Return, spawn, {.v = termcmd } }, 78 { MODKEY, XK_f, spawn, {.v = browsercmd } }, 79 { MODKEY, XK_p, spawn, {.v = audiocmd } }, 80 { MODKEY, XK_b, togglebar, {0} }, 81 { MODKEY, XK_j, focusstack, {.i = +1 } }, 82 { MODKEY, XK_k, focusstack, {.i = -1 } }, 83 { MODKEY|ShiftMask, XK_i, incnmaster, {.i = +1 } }, 84 { MODKEY|ShiftMask, XK_d, incnmaster, {.i = -1 } }, 85 { MODKEY, XK_h, setmfact, {.f = -0.05} }, 86 { MODKEY, XK_l, setmfact, {.f = +0.05} }, 87 { MODKEY|ShiftMask, XK_Return, zoom, {0} }, 88 { MODKEY, XK_Tab, view, {0} }, 89 { MODKEY|ShiftMask, XK_w, killclient, {0} }, 90 { MODKEY, XK_space, setlayout, {0} }, 91 { MODKEY|ShiftMask, XK_t, setlayout, {.v = &layouts[0]} }, 92 { MODKEY|ShiftMask, XK_f, setlayout, {.v = &layouts[1]} }, 93 { MODKEY|ShiftMask, XK_m, setlayout, {.v = &layouts[2]} }, 94 { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, 95 { MODKEY, XK_0, view, {.ui = ~0 } }, 96 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, 97 { MODKEY, XK_comma, focusmon, {.i = -1 } }, 98 { MODKEY, XK_period, focusmon, {.i = +1 } }, 99 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, 100 { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, 101 TAGKEYS( XK_1, 0) 102 TAGKEYS( XK_2, 1) 103 TAGKEYS( XK_3, 2) 104 TAGKEYS( XK_4, 3) 105 TAGKEYS( XK_5, 4) 106 TAGKEYS( XK_6, 5) 107 TAGKEYS( XK_7, 6) 108 TAGKEYS( XK_8, 7) 109 TAGKEYS( XK_9, 8) 110 { MODKEY|ShiftMask, XK_q, quit, {0} }, 111 }; 112 113 /* button definitions */ 114 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ 115 static const Button buttons[] = { 116 /* click event mask button function argument */ 117 { ClkLtSymbol, 0, Button1, setlayout, {0} }, 118 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, 119 { ClkWinTitle, 0, Button2, zoom, {0} }, 120 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, 121 { ClkClientWin, MODKEY, Button1, movemouse, {0} }, 122 { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, 123 { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, 124 { ClkTagBar, 0, Button1, view, {0} }, 125 { ClkTagBar, 0, Button3, toggleview, {0} }, 126 { ClkTagBar, MODKEY, Button1, tag, {0} }, 127 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 128 }; 129 130