/* Copied from config.dev.h file. */ /* See LICENSE file for copyright and license details. */ // define BROWSER_CMD "qutebrowser" #define BROWSER_CMD "brave" #define SYSTEM_MONITOR "htop" // define TERMINAL_CLASS "St" // define TERMINAL_CMD "st" #define TERMINAL_CLASS "Kitty" #define TERMINAL_CMD "kitty" /* appearance */ static unsigned int borderpx = 1; /* border pixel of windows */ static unsigned int snap = 32; /* snap pixel */ static int showbar = 1; /* 0 means no bar */ static int topbar = 1; /* 0 means bottom bar */ static char font[] = "monospace:size=10"; static char dmenufont[] = "monospace:size=10"; static const char *fonts[] = { font }; static char normbgcolor[] = "#222222"; static char normbordercolor[] = "#444444"; static char normfgcolor[] = "#bbbbbb"; static char selfgcolor[] = "#eeeeee"; static char selbordercolor[] = "#005577"; static char selbgcolor[] = "#005577"; static char *colors[][3] = { /* fg bg border */ [SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor }, [SchemeSel] = { selfgcolor, selbgcolor, selbordercolor }, }; /* window replacement */ static const int swallowfloating = 0; /* tagging */ static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" }; static const Rule rules[] = { /* xprop(1): * WM_CLASS(STRING) = instance, class * WM_NAME(STRING) = title */ /* class instance title tags mask isfloating isterminal noswallow monitor */ { TERMINAL_CLASS, NULL, NULL, 0, 0, 1, 0, -1 }, { "Gimp", NULL, NULL, 0, 0, 0, 0, -1 }, { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */ }; /* layout(s) */ static float mfact = 0.55; /* factor of master area size [0.05..0.95] */ static int nmaster = 1; /* number of clients in master area */ static int resizehints = 1; /* 1 means respect size hints in tiled resizals */ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */ #include "fibonacci.c" static const Layout layouts[] = { /* symbol arrange function, (first entry is default) */ { "[M]", monocle }, { "[@]", spiral }, { "[]=", tile }, { "><>", NULL }, /* floating */ }; /* key definitions */ #define MODKEY Mod4Mask #define TAGKEYS(KEY,TAG) \ { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, #define STACKKEYS(MOD,ACTION) \ { MOD, XK_j, ACTION##stack, {.i = INC(+1) } }, \ { MOD, XK_k, ACTION##stack, {.i = INC(-1) } }, /* helper for spawning shell commands in the pre dwm-5.0 fashion */ #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } /* commands */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL }; static const char *termcmd[] = { TERMINAL_CMD, NULL }; /* * Xresources preferences to load at startup */ ResourcePref resources[] = { { "font", STRING, &font }, { "dmenufont", STRING, &dmenufont }, { "normbgcolor", STRING, &normbgcolor }, { "normbordercolor", STRING, &normbordercolor }, { "normfgcolor", STRING, &normfgcolor }, { "selbgcolor", STRING, &selbgcolor }, { "selbordercolor", STRING, &selbordercolor }, { "selfgcolor", STRING, &selfgcolor }, { "borderpx", INTEGER, &borderpx }, { "snap", INTEGER, &snap }, { "showbar", INTEGER, &showbar }, { "topbar", INTEGER, &topbar }, { "nmaster", INTEGER, &nmaster }, { "resizehints", INTEGER, &resizehints }, { "mfact", FLOAT, &mfact }, }; static const Key keys[] = { /* modifier key function argument */ { MODKEY|ShiftMask, XK_b, togglebar, {0} }, STACKKEYS(MODKEY, focus) STACKKEYS(MODKEY|ShiftMask, push) { MODKEY, XK_i, incnmaster, {.i = +1 } }, { MODKEY, XK_d, incnmaster, {.i = -1 } }, { MODKEY, XK_h, setmfact, {.f = -0.05} }, { MODKEY, XK_l, setmfact, {.f = +0.05} }, { MODKEY|ShiftMask, XK_Return, zoom, {0} }, /* swap current and master clients */ { MODKEY, XK_comma, setlayout, {.v = &layouts[0]} }, { MODKEY, XK_period, setlayout, {.v = &layouts[1]} }, { MODKEY|ShiftMask, XK_period, setlayout, {.v = &layouts[2]} }, { MODKEY, XK_slash, togglefloating, {0} }, { MODKEY|ShiftMask, XK_slash, setlayout, {.v = &layouts[3]} }, /* TODO: does this do anything? is it needed? */ { MODKEY|ShiftMask, XK_m, focusmon, {.i = -1 } }, { MODKEY, XK_m, focusmon, {.i = +1 } }, { MODKEY|ShiftMask, XK_t, tagmon, {.i = -1 } }, { MODKEY, XK_t, tagmon, {.i = +1 } }, { MODKEY, XK_grave, view, {.ui = ~0 } }, /* ` -> view all tags */ { MODKEY|ShiftMask, XK_grave, tag, {.ui = ~0 } }, /* shift + ` -> apply all tags */ TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) TAGKEYS( XK_4, 3) TAGKEYS( XK_5, 4) TAGKEYS( XK_6, 5) TAGKEYS( XK_7, 6) TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) TAGKEYS( XK_0, 9) { MODKEY, XK_q, killclient, {0} }, { MODKEY|ShiftMask, XK_q, quit, {0} }, { MODKEY, XK_space, spawn, {.v = dmenucmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } }, { MODKEY, XK_b, spawn, {.v = (const char*[]){ BROWSER_CMD, NULL } } }, { MODKEY, XK_s, spawn, SHCMD(TERMINAL_CMD " -e " SYSTEM_MONITOR) }, }; /* button definitions */ /* click options: ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, ClkRootWin */ static const Button buttons[] = { /* click event mask button function argument */ { ClkLtSymbol, 0, Button1, setlayout, {0} }, { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[0]} }, { ClkWinTitle, 0, Button2, zoom, {0} }, { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, { ClkClientWin, MODKEY, Button1, movemouse, {0} }, { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, { ClkTagBar, 0, Button1, view, {0} }, { ClkTagBar, 0, Button3, toggleview, {0} }, { ClkTagBar, MODKEY, Button1, tag, {0} }, { ClkTagBar, MODKEY, Button3, toggletag, {0} }, };