/* See LICENSE file for copyright and license details. */ /* Geminux DWM configuration (Gemini PDA 2160x1080 HiDPI, Mod4 = Fn+Alt, systray, Pango) */ #include /* appearance */ static unsigned int borderpx = 4; static unsigned int snap = 36; static const int showbar = 1; static const int topbar = 1; static const unsigned int systraypinning = 0; static const unsigned int systrayonleft = 0; static const unsigned int systrayspacing = 8; static const int systraypinningfailfirst = 1; static const int showsystray = 1; static const char *font = "Fira Code, DejaVuSansM Nerd Font 38px"; static char normbgcolor[64] = "#0b0e14"; static char normbordercolor[64] = "#283444"; static char normfgcolor[64] = "#e6e1cf"; static char selbgcolor[64] = "#2b5278"; static char selbordercolor[64] = "#59c2ff"; static char selfgcolor[64] = "#ffffff"; static char *colors[][3] = { /* fg bg border */ [SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor }, [SchemeSel] = { selfgcolor, selbgcolor, selbordercolor }, }; /* tagging */ static const char *tags[] = { "1", "2", "3", "4", "5" }; static const Rule rules[] = { /* class instance title tags mask isfloating monitor */ { "geminux-callscreen", NULL, NULL, ~0U, 0, -1 }, { "geminux-lock", NULL, NULL, ~0U, 1, -1 }, { "geminux-control", NULL, NULL, 0, 1, -1 }, { "geminux-audio", NULL, NULL, 0, 1, -1 }, { "geminux-datetime", NULL, NULL, 0, 1, -1 }, { "geminux-themes", NULL, NULL, 0, 1, -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 Layout layouts[] = { /* symbol arrange function */ { "[]=", tile }, { "[M]", monocle }, { "><>", NULL }, { "###", grid }, }; /* key definitions: Mod4 = Fn+Alt (Super_L) on Gemini PDA keyboard */ #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 const char *termcmd[] = { "st", NULL }; static const char *launchercmd[] = { "geminux-launcher", NULL }; static const char *controlcmd[] = { "geminux-control", NULL }; static const char *dialercmd[] = { "geminux-dialer", NULL }; static const char *smscmd[] = { "geminux-sms", NULL }; static const char *netcmd[] = { "geminux-net", NULL }; static const char *audiocmd[] = { "geminux-audio", NULL }; static const char *cameracmd[] = { "geminux-camera", NULL }; static const char *themescmd[] = { "geminux-themes", NULL }; static const char *lockcmd[] = { "geminux-lock", NULL }; static const char *shotcmd[] = { "/bin/sh", "-c", "mkdir -p ~/Pictures && scrot ~/Pictures/screenshot-$(date +%Y%m%d-%H%M%S).png", NULL }; static const char *briupcmd[] = { "brightnessctl", "set", "+10%", NULL }; static const char *bridowncmd[] = { "brightnessctl", "set", "10%-", NULL }; static const char *volupcmd[] = { "/bin/sh", "-c", "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+ && pkill -USR1 geminux-statusd || true", NULL }; static const char *voldowncmd[] = { "/bin/sh", "-c", "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && pkill -USR1 geminux-statusd || true", NULL }; static const char *volmutecmd[] = { "/bin/sh", "-c", "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && pkill -USR1 geminux-statusd || true", NULL }; static const Key keys[] = { /* modifier key function argument */ { MODKEY, XK_Return, spawn, {.v = termcmd} }, { MODKEY, XK_p, spawn, {.v = launchercmd} }, { 0, XK_Menu, spawn, {.v = launchercmd} }, { 0, XF86XK_MenuKB, spawn, {.v = launchercmd} }, { 0, XF86XK_Launch1, spawn, {.v = launchercmd} }, { MODKEY, XK_c, spawn, {.v = controlcmd} }, { MODKEY, XK_d, spawn, {.v = dialercmd} }, { MODKEY, XK_s, spawn, {.v = smscmd} }, { MODKEY, XK_n, spawn, {.v = netcmd} }, { MODKEY, XK_a, spawn, {.v = audiocmd} }, { MODKEY, XK_v, spawn, {.v = cameracmd} }, { MODKEY, XK_t, spawn, {.v = themescmd} }, { MODKEY|ShiftMask, XK_l, spawn, {.v = lockcmd} }, { 0, XF86XK_ScreenSaver, spawn, {.v = lockcmd} }, { 0, XK_Print, spawn, {.v = shotcmd} }, { 0, XF86XK_MonBrightnessUp, spawn, {.v = briupcmd} }, { 0, XF86XK_MonBrightnessDown, spawn, {.v = bridowncmd} }, { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volupcmd} }, { 0, XF86XK_AudioLowerVolume, spawn, {.v = voldowncmd} }, { 0, XF86XK_AudioMute, spawn, {.v = volmutecmd} }, { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1} }, { MODKEY, XK_k, focusstack, {.i = -1} }, { MODKEY, XK_Down, focusstack, {.i = +1} }, { MODKEY, XK_Up, focusstack, {.i = -1} }, { MODKEY, XK_i, incnmaster, {.i = +1} }, { MODKEY, XK_o, incnmaster, {.i = -1} }, { MODKEY, XK_h, setmfact, {.f = -0.05} }, { MODKEY, XK_l, setmfact, {.f = +0.05} }, { MODKEY, XK_space, spawn, {.v = launchercmd} }, { MODKEY|ShiftMask, XK_Return, zoom, {0} }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, { MODKEY, XK_Tab, view, {0} }, { MODKEY|ShiftMask, XK_q, killclient, {0} }, { MODKEY|ShiftMask, XK_c, killclient, {0} }, { MODKEY, XK_F1, setlayout, {.v = &layouts[0]} }, { MODKEY, XK_F2, setlayout, {.v = &layouts[1]} }, { MODKEY, XK_F3, setlayout, {.v = &layouts[2]} }, { MODKEY, XK_F4, setlayout, {.v = &layouts[3]} }, { MODKEY, XK_m, setlayout, {.v = &layouts[1]} }, { MODKEY, XK_g, setlayout, {.v = &layouts[3]} }, { MODKEY, XK_0, view, {.ui = ~0U} }, { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0U} }, { 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} }, { MODKEY|ShiftMask, XK_r, reloadxres, {0} }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) TAGKEYS( XK_4, 3) TAGKEYS( XK_5, 4) { MODKEY|ControlMask|ShiftMask, XK_q, quit, {0} }, }; /* button definitions */ static const Button buttons[] = { /* click event mask button function argument */ { ClkLauncher, 0, Button1, spawn, {.v = launchercmd} }, { ClkLtSymbol, 0, Button1, setlayout, {0} }, { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[1]} }, { ClkWinTitle, 0, Button2, zoom, {0} }, { ClkCloseBtn, 0, Button1, killclient, {0} }, { ClkStatusText, 0, Button1, spawn, {.v = controlcmd} }, { ClkClientWin, MODKEY, Button1, movemouse, {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} }, };