config.h (8750B)
1/* See LICENSE file for copyright and license details. */ 2 3/* appearance */ 4static const unsigned int borderpx = 1; /* border pixel of windows */ 5static const unsigned int snap = 32; /* snap pixel */ 6static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ 7static const unsigned int systrayspacing = 2; /* systray spacing */ 8static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ 9static const int showsystray = 1; /* 0 means no systray */ 10static const int showbar = 1; /* 0 means no bar */ 11static const int topbar = 1; /* 0 means bottom bar */ 12static const char *fonts[] = { "monospace:size=10" }; 13static const char dmenufont[] = "monospace:size=10"; 14static const char col_gray1[] = "#2e3440"; 15static const char col_gray2[] = "#2e3440"; 16static const char col_gray3[] = "#81a1c1"; 17static const char col_gray4[] = "#e5e9f0"; 18static const char col_cyan[] = "#4c566a"; 19static const char *colors[][3] = { 20 /* fg bg border */ 21 [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, 22 [SchemeSel] = { col_gray4, col_cyan, col_cyan }, 23}; 24 25/* tagging */ 26static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 27 28static const Rule rules[] = { 29 /* xprop(1): 30 * WM_CLASS(STRING) = instance, class 31 * WM_NAME(STRING) = title 32 */ 33 /* class instance title tags mask isfloating monitor */ 34 { "Gimp", NULL, NULL, 0, 1, -1 }, 35 { "Firefox", NULL, NULL, 1 << 1, 0, -1 }, 36 { "feh", NULL, NULL, 0, 1, -1 }, 37 { "MuPDF", NULL, NULL, 0, 1, -1 }, 38 { "mpv", NULL, NULL, 0, 1, -1 }, 39 { "uTox", NULL, NULL, 0, 1, -1 }, 40 { "scrcpy", NULL, NULL, 0, 1, -1 }, 41 { "Thunar", NULL, NULL, 0, 1, -1 }, 42 { "DeltaChat", NULL, NULL, 0, 1, -1 }, 43 { "utoxvideo", NULL, NULL, 0, 1, -1 }, 44 { "TelegramDesktop", NULL, NULL, 1 << 3, 1, -1 }, 45 { "Fcitx-config-gtk3", NULL, NULL, 0, 1, -1 }, 46 { "SimpleScreenRecorder", NULL, NULL, 0, 1, -1 }, 47 { "Audacity", NULL, NULL, 0, 1, -1 }, 48 { "Gnuplot", NULL, NULL, 0, 1, -1 }, 49}; 50 51/* layout(s) */ 52static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ 53static const int nmaster = 1; /* number of clients in master area */ 54static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ 55 56static const Layout layouts[] = { 57 /* symbol arrange function */ 58 { "[]=", tile }, /* first entry is default */ 59 { "><>", NULL }, /* no layout function means floating behavior */ 60 { "[M]", monocle }, 61 { "TTT", bstack }, 62 { "===", bstackhoriz }, 63}; 64 65/* key definitions */ 66#define MODKEY Mod4Mask 67#define TAGKEYS(KEY,TAG) \ 68 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ 69 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ 70 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ 71 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, 72 73/* helper for spawning shell commands in the pre dwm-5.0 fashion */ 74#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 75 76/* commands */ 77static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ 78static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; 79static const char *termcmd[] = { "st", NULL }; 80static const char *slockcmd[] = { "slock", NULL }; 81static const char *mutecmd[] = {"amixer","-c","1","-q","sset","Master","toggle",NULL}; 82static const char *lowervolcmd[] = {"amixer","-c","1","-q","sset","Master","1%-",NULL}; 83static const char *raisevolcmd[] = {"amixer","-c","1","-q","sset","Master","1%+",NULL}; 84 85static Key keys[] = { 86 /* modifier key function argument */ 87 { MODKEY, XK_p, spawn, {.v = dmenucmd } }, 88 { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, 89 { MODKEY|ShiftMask, XK_l, spawn, {.v = slockcmd } }, 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_d, incnmaster, {.i = -1 } }, 95 { MODKEY, XK_h, setmfact, {.f = -0.05} }, 96 { MODKEY, XK_l, setmfact, {.f = +0.05} }, 97 { MODKEY, XK_Return, zoom, {0} }, 98 { MODKEY, XK_Tab, view, {0} }, 99 { MODKEY|ShiftMask, XK_c, killclient, {0} }, 100 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, 101 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, 102 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, 103 { MODKEY, XK_u, setlayout, {.v = &layouts[3]} }, 104 { MODKEY, XK_o, setlayout, {.v = &layouts[4]} }, 105 { MODKEY, XK_space, setlayout, {0} }, 106 { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, 107 { MODKEY, XK_0, view, {.ui = ~0 } }, 108 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, 109 { MODKEY, XK_comma, focusmon, {.i = -1 } }, 110 { MODKEY, XK_period, focusmon, {.i = +1 } }, 111 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, 112 { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, 113 TAGKEYS( XK_parenleft, 0) 114 TAGKEYS( XK_parenright, 1) 115 TAGKEYS( XK_braceright, 2) 116 TAGKEYS( XK_plus, 3) 117 TAGKEYS( XK_braceleft, 4) 118 TAGKEYS( XK_bracketright, 5) 119 TAGKEYS( XK_bracketleft, 6) 120 TAGKEYS( XK_exclam, 7) 121 TAGKEYS( XK_equal, 8) 122 { MODKEY|ShiftMask, XK_q, quit, {0} }, 123 { 0, 0x1008ff12,spawn, {.v = mutecmd } }, 124 { 0, 0x1008ff11,spawn, {.v = lowervolcmd } }, 125 { 0, 0x1008ff13,spawn, {.v = raisevolcmd } }, 126 { MODKEY, XK_Print, spawn, SHCMD("dwm-helper.sh screenshot") }, 127}; 128 129/* button definitions */ 130/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ 131static Button buttons[] = { 132 /* click event mask button function argument */ 133 { ClkLtSymbol, 0, Button1, setlayout, {0} }, 134 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, 135 { ClkWinTitle, 0, Button2, zoom, {0} }, 136 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, 137 { ClkClientWin, MODKEY, Button1, movemouse, {0} }, 138 { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, 139 { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, 140 { ClkTagBar, 0, Button1, view, {0} }, 141 { ClkTagBar, 0, Button3, toggleview, {0} }, 142 { ClkTagBar, MODKEY, Button1, tag, {0} }, 143 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 144}; 145