/* See LICENSE file for copyright and license details. */ /* OpenBSD port - audio via sndioctl, rexima removed (no equivalent) */ /* appearance */ static const unsigned int borderpx = 2; static const unsigned int snap = 32; static const unsigned int systraypinning = 0; static const unsigned int systrayonleft = 0; static const unsigned int systrayspacing = 2; static const int systraypinningfailfirst = 1; static const int showsystray = 1; static const int showbar = 1; static const int topbar = 0; static const char *fonts[] = { "scientifica:size=16:antialias=true" }; static const char dmenufont[] = "scientifica:size=16:antialias=true"; /* Gruvbox Material Hard */ static const char col_bg[] = "#1d2021"; static const char col_bg_alt[] = "#282828"; static const char col_fg[] = "#d4be98"; static const char col_blue[] = "#d8a657"; static const char col_border[] = "#504945"; static const char col_selfg[] = "#1d2021"; static const char *colors[][3] = { /* fg bg border */ [SchemeNorm] = { col_fg, col_bg, col_border }, [SchemeSel] = { col_selfg, col_blue, col_blue }, }; /* tagging */ static const char *tags[] = { "term", "surf", "cmus", "misc" }; static const Rule rules[] = { /* class instance title tags mask isfloating monitor */ { "Gimp", NULL, NULL, 0, 1, -1 }, { "Surf", NULL, NULL, 1 << 1, 0, -1 }, { "st", "cmus", NULL, 1 << 2, 0, -1 }, }; /* layout(s) */ static const float mfact = 0.55; static const int nmaster = 1; static const int resizehints = 0; static const int lockfullscreen = 1; static const int refreshrate = 60; static const Layout layouts[] = { { "[]=", tile }, { "><>", NULL }, { "[M]", monocle }, { NULL, NULL }, }; /* 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 SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } /* commands */ static char dmenumon[2] = "0"; static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_bg, "-nf", col_fg, "-sb", col_blue, "-sf", col_selfg, NULL }; static const char *termcmd[] = { "st", NULL }; static const char *surfcmd[] = { "tabbed", "surf", "-e", NULL }; /* OpenBSD: sndioctl for volume. no rexima equivalent, bind opens st instead */ static const char *mixercmd[] = { "st", NULL }; static const char *scrotcmd[] = { "/bin/sh", "-c", "scrot \"/home/realdaemon/Pictures/Screenshots/$(date '+%m-%d-%Y %I:%M %p').png\"", NULL }; /* OpenBSD audio: sndioctl supports relative +/- adjustments */ static const char *volupcmd[] = { "/bin/sh", "-c", "sndioctl output.level=+0.05", NULL }; static const char *voldncmd[] = { "/bin/sh", "-c", "sndioctl output.level=-0.05", NULL }; static const Key keys[] = { /* modifier key function argument */ { 0, XK_Print, spawn, {.v = scrotcmd } }, { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volupcmd } }, { 0, XF86XK_AudioLowerVolume, spawn, {.v = voldncmd } }, { MODKEY, XK_p, spawn, {.v = dmenucmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } }, { MODKEY, XK_s, spawn, {.v = surfcmd } }, { MODKEY, XK_v, spawn, {.v = mixercmd } }, { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, { 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} }, { MODKEY, XK_Tab, view, {0} }, { MODKEY, XK_q, killclient, {0} }, { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, { MODKEY|ShiftMask, XK_f, togglefullscr, {0} }, { MODKEY, XK_space, setlayout, {0} }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, /* arrow keys: focus and move windows */ { MODKEY, XK_Up, focusstack, {.i = -1 } }, { MODKEY, XK_Down, focusstack, {.i = +1 } }, { MODKEY, XK_Left, focusstack, {.i = -1 } }, { MODKEY, XK_Right, focusstack, {.i = +1 } }, /* monitors */ { MODKEY, XK_0, view, {.ui = ~0 } }, { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, { MODKEY, XK_comma, focusmon, {.i = -1 } }, { MODKEY, XK_period, focusmon, {.i = +1 } }, { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, 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) { MODKEY|ShiftMask, XK_q, quit, {0} }, }; /* button definitions */ static const Button buttons[] = { /* click 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, 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} }, };