/* See LICENSE file for copyright and license details. */ /* appearance */ static const char *fonts[] = {"monospace:bold:size=10"}; static const char dmenufont[] = "monospace:bold:size=11"; static const char normbordercolor[] = "#444444"; static const char normbgcolor[] = "#222222"; static const char normfgcolor[] = "#bbbbbb"; static const char selbordercolor[] = "#005577"; static const char selbgcolor[] = "#005577"; static const char selfgcolor[] = "#eeeeee"; static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ static const unsigned int systrayspacing = 2; /* systray spacing */ static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, 0: display systray on the last monitor*/ static const int showsystray = 1; /* 0 means no systray */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ /* tagging */ static const char *tags[] = { "1", "2", "3" }; static const Rule rules[] = { /* xprop(1): * WM_CLASS(STRING) = instance, class * WM_NAME(STRING) = title */ /* class instance title tags mask isfloating monitor */ { "Gimp", NULL, NULL, 1 << 1, 1, -1 }, { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, { "Gmrun", NULL, NULL, 0, 1, -1 }, { "copyq", NULL, NULL, 0, 1, -1 }, }; /* layout(s) */ static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ static const int nmaster = 1; /* number of clients in master area */ static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ static const Layout layouts[] = { /* symbol arrange function */ { "[T]", tile }, /* first entry is default */ { "[M]", monocle }, { "[F]", NULL }, /* no layout function means floating behavior */ }; /* key definitions */ #define MOD Mod4Mask #define ALT Mod1Mask #define CTRL ControlMask #define SHIFT ShiftMask #define TAGKEYS(KEY,TAG) \ { MOD, KEY, view, {.ui = 1 << TAG} }, \ { MOD|CTRL, KEY, toggleview, {.ui = 1 << TAG} }, \ { MOD|SHIFT, KEY, tag, {.ui = 1 << TAG} }, \ { MOD|CTRL|SHIFT, KEY, toggletag, {.ui = 1 << TAG} }, /* helper for spawning shell commands in the pre dwm-5.0 fashion */ #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } /* commands */ /*Apps launchers*/ 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", selbgcolor, "-sf", selfgcolor, NULL }; static const char *gmruncmd[] = { "gmrun", NULL }; static const char *roficmd[] = { "rofi", "-show", "run", "-sidebar-mode", "-lines", "20", "-columns", "2", NULL }; /*Basic apps*/ static const char *termcmd[] = { "lilyterm", NULL }; static const char *editcmd[] = { "mousepad", NULL }; static const char *fmancmd[] = { "xfe", NULL }; static const char *webbcmd[] = { "netsurf", NULL }; /*Session management*/ static const char *haltcmd[] = { "oblogout", NULL }; static const char *lockcmd[] = { "i3lock", "--color=008080", "--pointer=default", "--show-failed-attempts", NULL }; #include "selfrestart.c" static Key keys[] = { /* modifier key function argument */ { MOD|ALT, XK_p, spawn, {.v = dmenucmd } }, { MOD|ALT, XK_g, spawn, {.v = gmruncmd } }, { MOD|ALT, XK_space, spawn, {.v = roficmd } }, { MOD|ALT, XK_Return, spawn, {.v = termcmd } }, { MOD|ALT, XK_e, spawn, {.v = editcmd } }, { MOD|ALT, XK_f, spawn, {.v = fmancmd } }, { MOD|ALT, XK_b, spawn, {.v = webbcmd } }, { MOD|ALT, XK_Delete, spawn, {.v = lockcmd } }, { MOD|ALT, XK_End, spawn, {.v = haltcmd } }, { MOD, XK_b, togglebar, {0} }, { MOD, XK_Right, focusstack, {.i = +1 } }, { MOD, XK_Left, focusstack, {.i = -1 } }, { MOD, XK_Up, incnmaster, {.i = +1 } }, { MOD, XK_Down, incnmaster, {.i = -1 } }, { MOD, XK_Prior, setmfact, {.f = -0.05} }, { MOD, XK_Next, setmfact, {.f = +0.05} }, { MOD, XK_Home, swapfocus, {0} }, { MOD, XK_Return, zoom, {0} }, { MOD, XK_Tab, view, {0} }, { MOD|CTRL, XK_x, killclient, {0} }, { MOD, XK_t, setlayout, {.v = &layouts[0]} }, { MOD, XK_m, setlayout, {.v = &layouts[1]} }, { MOD, XK_f, setlayout, {.v = &layouts[2]} }, { MOD, XK_space, setlayout, {0} }, { MOD|SHIFT, XK_space, togglefloating, {0} }, { MOD, XK_F4, view, {.ui = ~0 } }, { MOD|SHIFT, XK_F4, tag, {.ui = ~0 } }, { MOD, XK_F5, focusmon, {.i = -1 } }, { MOD, XK_F6, focusmon, {.i = +1 } }, { MOD|SHIFT, XK_F5, tagmon, {.i = -1 } }, { MOD|SHIFT, XK_F6, tagmon, {.i = +1 } }, TAGKEYS( XK_F1, 0) TAGKEYS( XK_F2, 1) TAGKEYS( XK_F3, 2) { MOD|CTRL, XK_r, self_restart, {0} }, { MOD|CTRL, XK_q, quit, {0} }, }; /* button definitions */ /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ static Button buttons[] = { /* click event mask button function argument */ { ClkLtSymbol, 0, Button1, setlayout, {0} }, { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, { ClkWinTitle, 0, Button2, zoom, {0} }, { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, { ClkClientWin, MOD, Button1, movemouse, {0} }, { ClkClientWin, MOD, Button2, togglefloating, {0} }, { ClkClientWin, MOD, Button3, resizemouse, {0} }, { ClkTagBar, 0, Button1, view, {0} }, { ClkTagBar, 0, Button3, toggleview, {0} }, { ClkTagBar, MOD, Button1, tag, {0} }, { ClkTagBar, MOD, Button3, toggletag, {0} }, };