diff options
author | Alex Berowski <alex@berowski.com> | 2022-07-17 19:36:24 -0500 |
---|---|---|
committer | Alex Berowski <alex@berowski.com> | 2022-07-17 19:36:24 -0500 |
commit | 49f8cc7184a1ebace0d21c79c246afdb94d1a9a7 (patch) | |
tree | f958752204ea57d04c874b3bf851ce24afac6e0e | |
parent | 4bb0aee58805ca0a6917b85e9dc9ed522d7d13be (diff) |
-rw-r--r-- | config.h | 118 |
1 files changed, 59 insertions, 59 deletions
@@ -3,7 +3,6 @@ /* Constants */ #define TERMINAL "st" #define TERMCLASS "St" -#define BROWSER "brave" /* appearance */ static unsigned int borderpx = 3; /* border pixel of windows */ @@ -136,8 +135,9 @@ static Key keys[] = { /* modifier key function argument */ STACKKEYS(MODKEY, focus) STACKKEYS(MODKEY|ShiftMask, push) - /* { MODKEY|ShiftMask, XK_Escape, spawn, SHCMD("") }, */ - { MODKEY, XK_grave, spawn, {.v = (const char*[]){ "dmenuunicode", NULL } } }, + { MODKEY, XK_grave, spawn, SHCMD("dmenuunicode") }, + { MODKEY, XK_Escape, spawn, SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv") }, + { MODKEY|ShiftMask, XK_Escape, spawn, SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv") }, /* { MODKEY|ShiftMask, XK_grave, togglescratch, SHCMD("") }, */ TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) @@ -154,19 +154,19 @@ static Key keys[] = { { MODKEY|ShiftMask, XK_minus, spawn, SHCMD("pamixer --allow-boost -d 15; kill -44 $(pidof dwmblocks)") }, { MODKEY, XK_equal, spawn, SHCMD("pamixer --allow-boost -i 5; kill -44 $(pidof dwmblocks)") }, { MODKEY|ShiftMask, XK_equal, spawn, SHCMD("pamixer --allow-boost -i 15; kill -44 $(pidof dwmblocks)") }, - { MODKEY, XK_BackSpace, spawn, {.v = (const char*[]){ "sysact", NULL } } }, - { MODKEY|ShiftMask, XK_BackSpace, spawn, {.v = (const char*[]){ "sysact", NULL } } }, + { MODKEY, XK_BackSpace, spawn, SHCMD("sysact") }, + { MODKEY|ShiftMask, XK_BackSpace, spawn, SHCMD("sysact") }, { MODKEY, XK_Tab, view, {0} }, /* { MODKEY|ShiftMask, XK_Tab, spawn, SHCMD("") }, */ { MODKEY, XK_q, killclient, {0} }, - { MODKEY|ShiftMask, XK_q, spawn, {.v = (const char*[]){ "sysact", NULL } } }, - { MODKEY, XK_w, spawn, {.v = (const char*[]){ BROWSER, NULL } } }, - { MODKEY|ShiftMask, XK_w, spawn, {.v = (const char*[]){ TERMINAL, "-e", "sudo", "nmtui", NULL } } }, + { MODKEY|ShiftMask, XK_q, spawn, SHCMD("sysact") }, + { MODKEY, XK_w, spawn, SHCMD("$BROWSER") }, + { MODKEY|ShiftMask, XK_w, spawn, SHCMD(TERMINAL " -e sudo nmtui") }, { MODKEY, XK_e, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks; rmdir ~/.abook") }, { MODKEY|ShiftMask, XK_e, spawn, SHCMD(TERMINAL " -e abook -C ~/.config/abook/abookrc --datafile ~/.config/abook/addressbook") }, - { MODKEY, XK_r, spawn, {.v = (const char*[]){ TERMINAL, "-e", "lfub", NULL } } }, - { MODKEY|ShiftMask, XK_r, spawn, {.v = (const char*[]){ TERMINAL, "-e", "htop", NULL } } }, + { MODKEY, XK_r, spawn, SHCMD(TERMINAL " -e lfub") }, + { MODKEY|ShiftMask, XK_r, spawn, SHCMD(TERMINAL " -e htop") }, { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, /* tile */ { MODKEY|ShiftMask, XK_t, setlayout, {.v = &layouts[1]} }, /* bstack */ { MODKEY, XK_y, setlayout, {.v = &layouts[2]} }, /* spiral */ @@ -177,12 +177,12 @@ static Key keys[] = { { MODKEY|ShiftMask, XK_i, setlayout, {.v = &layouts[7]} }, /* centeredfloatingmaster */ { MODKEY, XK_o, incnmaster, {.i = +1 } }, { MODKEY|ShiftMask, XK_o, incnmaster, {.i = -1 } }, - { MODKEY, XK_p, spawn, {.v = (const char*[]){ "mpc", "toggle", NULL } } }, - { MODKEY|ShiftMask, XK_p, spawn, SHCMD("mpc pause; pauseallmpv") }, - { MODKEY, XK_bracketleft, spawn, {.v = (const char*[]){ "mpc", "seek", "-10", NULL } } }, - { MODKEY|ShiftMask, XK_bracketleft, spawn, {.v = (const char*[]){ "mpc", "seek", "-60", NULL } } }, - { MODKEY, XK_bracketright, spawn, {.v = (const char*[]){ "mpc", "seek", "+10", NULL } } }, - { MODKEY|ShiftMask, XK_bracketright, spawn, {.v = (const char*[]){ "mpc", "seek", "+60", NULL } } }, + { MODKEY, XK_p, spawn, SHCMD("mpc toggle") }, + { MODKEY|ShiftMask, XK_p, spawn, SHCMD("mpc pause ; pauseallmpv") }, + { MODKEY, XK_bracketleft, spawn, SHCMD("mpc seek -10") }, + { MODKEY|ShiftMask, XK_bracketleft, spawn, SHCMD("mpc seek -60") }, + { MODKEY, XK_bracketright, spawn, SHCMD("mpc seek +10") }, + { MODKEY|ShiftMask, XK_bracketright, spawn, SHCMD("mpc seek +60") }, { MODKEY, XK_backslash, view, {0} }, /* { MODKEY|ShiftMask, XK_backslash, spawn, SHCMD("") }, */ @@ -190,8 +190,8 @@ static Key keys[] = { { MODKEY|ShiftMask, XK_a, defaultgaps, {0} }, { MODKEY, XK_s, togglesticky, {0} }, /* { MODKEY|ShiftMask, XK_s, spawn, SHCMD("") }, */ - { MODKEY, XK_d, spawn, {.v = (const char*[]){ "dmenu_run", NULL } } }, - { MODKEY|ShiftMask, XK_d, spawn, {.v = (const char*[]){ "passmenu", NULL } } }, + { MODKEY, XK_d, spawn, SHCMD("dmenu_run") }, + { MODKEY|ShiftMask, XK_d, spawn, SHCMD("passmenu") }, { MODKEY, XK_f, togglefullscr, {0} }, { MODKEY|ShiftMask, XK_f, setlayout, {.v = &layouts[8]} }, { MODKEY, XK_g, shiftview, { .i = -1 } }, @@ -211,19 +211,19 @@ static Key keys[] = { /* { MODKEY|ShiftMask, XK_z, spawn, SHCMD("") }, */ { MODKEY, XK_x, incrgaps, {.i = -3 } }, /* { MODKEY|ShiftMask, XK_x, spawn, SHCMD("") }, */ - { MODKEY, XK_c, spawn, {.v = (const char*[]){ TERMINAL, "-e", "profanity", NULL } } }, + /* { MODKEY, XK_c, spawn, SHCMD("") }, */ /* { MODKEY|ShiftMask, XK_c, spawn, SHCMD("") }, */ /* V is automatically bound above in STACKKEYS */ { MODKEY, XK_b, togglebar, {0} }, /* { MODKEY|ShiftMask, XK_b, spawn, SHCMD("") }, */ - { MODKEY, XK_n, spawn, {.v = (const char*[]){ TERMINAL, "-e", "nvim", "-c", "VimwikiIndex", NULL } } }, - { MODKEY|ShiftMask, XK_n, spawn, SHCMD(TERMINAL " -e newsboat ; pkill -RTMIN+6 dwmblocks") }, - { MODKEY, XK_m, spawn, {.v = (const char*[]){ TERMINAL, "-e", "ncmpcpp", NULL } } }, + { MODKEY, XK_n, spawn, SHCMD(TERMINAL " -e nvim -c VimwikiIndex") }, + { MODKEY|ShiftMask, XK_n, spawn, SHCMD(TERMINAL " -e newsboat; pkill -RTMIN+6 dwmblocks") }, + { MODKEY, XK_m, spawn, SHCMD(TERMINAL " -e ncmpcpp") }, { MODKEY|ShiftMask, XK_m, spawn, SHCMD("pamixer -t; kill -44 $(pidof dwmblocks)") }, - { MODKEY, XK_comma, spawn, {.v = (const char*[]){ "mpc", "prev", NULL } } }, - { MODKEY|ShiftMask, XK_comma, spawn, {.v = (const char*[]){ "mpc", "seek", "0%", NULL } } }, - { MODKEY, XK_period, spawn, {.v = (const char*[]){ "mpc", "next", NULL } } }, - { MODKEY|ShiftMask, XK_period, spawn, {.v = (const char*[]){ "mpc", "repeat", NULL } } }, + { MODKEY, XK_comma, spawn, SHCMD("mpc prev") }, + { MODKEY|ShiftMask, XK_comma, spawn, SHCMD("mpc seek 0%") }, + { MODKEY, XK_period, spawn, SHCMD("mpc next") }, + { MODKEY|ShiftMask, XK_period, spawn, SHCMD("mpc repeat") }, { MODKEY, XK_Left, focusmon, {.i = -1 } }, { MODKEY|ShiftMask, XK_Left, tagmon, {.i = -1 } }, @@ -237,55 +237,55 @@ static Key keys[] = { { MODKEY, XK_Insert, spawn, SHCMD("xdotool type $(grep -v '^#' ~/.local/share/larbs/snippets | dmenu -i -l 50 | cut -d' ' -f1)") }, { MODKEY, XK_F1, spawn, SHCMD("groff -mom /usr/local/share/dwm/larbs.mom -Tpdf | zathura -") }, - { MODKEY, XK_F2, spawn, {.v = (const char*[]){ "tutorialvids", NULL } } }, - { MODKEY, XK_F3, spawn, {.v = (const char*[]){ "displayselect", NULL } } }, + { MODKEY, XK_F2, spawn, SHCMD("tutorialvids") }, + { MODKEY, XK_F3, spawn, SHCMD("displayselect") }, { MODKEY, XK_F4, spawn, SHCMD(TERMINAL " -e pulsemixer; kill -44 $(pidof dwmblocks)") }, - { MODKEY, XK_F5, xrdb, {.v = NULL } }, - { MODKEY, XK_F6, spawn, {.v = (const char*[]){ "torwrap", NULL } } }, - { MODKEY, XK_F7, spawn, {.v = (const char*[]){ "td-toggle", NULL } } }, - { MODKEY, XK_F8, spawn, {.v = (const char*[]){ "mw", "-Y", NULL } } }, - { MODKEY, XK_F9, spawn, {.v = (const char*[]){ "dmenumount", NULL } } }, - { MODKEY, XK_F10, spawn, {.v = (const char*[]){ "dmenuumount", NULL } } }, + /* { MODKEY, XK_F5, xrdb, {.v = NULL } }, */ + { MODKEY, XK_F6, spawn, SHCMD("torwrap") }, + { MODKEY, XK_F7, spawn, SHCMD("td-toggle") }, + { MODKEY, XK_F8, spawn, SHCMD("mw -Y") }, + { MODKEY, XK_F9, spawn, SHCMD("dmenumount") }, + { MODKEY, XK_F10, spawn, SHCMD("dmenuumount") }, { MODKEY, XK_F11, spawn, SHCMD("mpv --untimed --no-cache --no-osc --no-input-default-bindings --profile=low-latency --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1)") }, - { MODKEY, XK_F12, spawn, SHCMD("remaps") }, + { MODKEY, XK_F12, spawn, SHCMD("remaps & notify-send \\\"⌨️ Keyboard remapping...\\\" \\\"Re-running keyboard defaults for any newly plugged-in keyboards.\\\"") }, { MODKEY, XK_space, zoom, {0} }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, { 0, XK_Print, spawn, SHCMD("maim pic-full-$(date '+%y%m%d-%H%M-%S').png") }, - { ShiftMask, XK_Print, spawn, {.v = (const char*[]){ "maimpick", NULL } } }, - { MODKEY, XK_Print, spawn, {.v = (const char*[]){ "dmenurecord", NULL } } }, - { MODKEY|ShiftMask, XK_Print, spawn, {.v = (const char*[]){ "dmenurecord", "kill", NULL } } }, - { MODKEY, XK_Delete, spawn, {.v = (const char*[]){ "dmenurecord", "kill", NULL } } }, + { ShiftMask, XK_Print, spawn, SHCMD("maimpick") }, + { MODKEY, XK_Print, spawn, SHCMD("dmenurecord") }, + { MODKEY|ShiftMask, XK_Print, spawn, SHCMD("dmenurecord kill") }, + { MODKEY, XK_Delete, spawn, SHCMD("dmenurecord kill") }, { MODKEY, XK_Scroll_Lock, spawn, SHCMD("killall screenkey || screenkey &") }, { 0, XF86XK_AudioMute, spawn, SHCMD("pamixer -t; kill -44 $(pidof dwmblocks)") }, { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer --allow-boost -i 3; kill -44 $(pidof dwmblocks)") }, { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer --allow-boost -d 3; kill -44 $(pidof dwmblocks)") }, - { 0, XF86XK_AudioPrev, spawn, {.v = (const char*[]){ "mpc", "prev", NULL } } }, - { 0, XF86XK_AudioNext, spawn, {.v = (const char*[]){ "mpc", "next", NULL } } }, - { 0, XF86XK_AudioPause, spawn, {.v = (const char*[]){ "mpc", "pause", NULL } } }, - { 0, XF86XK_AudioPlay, spawn, {.v = (const char*[]){ "mpc", "play", NULL } } }, - { 0, XF86XK_AudioStop, spawn, {.v = (const char*[]){ "mpc", "stop", NULL } } }, - { 0, XF86XK_AudioRewind, spawn, {.v = (const char*[]){ "mpc", "seek", "-10", NULL } } }, - { 0, XF86XK_AudioForward, spawn, {.v = (const char*[]){ "mpc", "seek", "+10", NULL } } }, - { 0, XF86XK_AudioMedia, spawn, {.v = (const char*[]){ TERMINAL, "-e", "ncmpcpp", NULL } } }, + { 0, XF86XK_AudioPrev, spawn, SHCMD("mpc prev") }, + { 0, XF86XK_AudioNext, spawn, SHCMD("mpc next") }, + { 0, XF86XK_AudioPause, spawn, SHCMD("mpc pause") }, + { 0, XF86XK_AudioPlay, spawn, SHCMD("mpc play") }, + { 0, XF86XK_AudioStop, spawn, SHCMD("mpc stop") }, + { 0, XF86XK_AudioRewind, spawn, SHCMD("mpc seek -10") }, + { 0, XF86XK_AudioForward, spawn, SHCMD("mpc seek +10") }, + { 0, XF86XK_AudioMedia, spawn, SHCMD(TERMINAL " -e ncmpcpp") }, { 0, XF86XK_AudioMicMute, spawn, SHCMD("pactl set-source-mute @DEFAULT_SOURCE@ toggle") }, - /* { 0, XF86XK_PowerOff, spawn, {.v = (const char*[]){ "sysact", NULL } } }, */ - { 0, XF86XK_Calculator, spawn, {.v = (const char*[]){ TERMINAL, "-e", "bc", "-l", NULL } } }, - { 0, XF86XK_Sleep, spawn, {.v = (const char*[]){ "sudo", "-A", "zzz", NULL } } }, - { 0, XF86XK_WWW, spawn, {.v = (const char*[]){ BROWSER, NULL } } }, - { 0, XF86XK_DOS, spawn, {.v = termcmd } }, + { 0, XF86XK_PowerOff, spawn, SHCMD("sysact") }, + { 0, XF86XK_Calculator, spawn, SHCMD(TERMINAL " -e bc -l") }, + { 0, XF86XK_Sleep, spawn, SHCMD("sudo -A zzz") }, + { 0, XF86XK_WWW, spawn, SHCMD("$BROWSER") }, + { 0, XF86XK_DOS, spawn, SHCMD(TERMINAL) }, { 0, XF86XK_ScreenSaver, spawn, SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv") }, - { 0, XF86XK_TaskPane, spawn, {.v = (const char*[]){ TERMINAL, "-e", "htop", NULL } } }, + { 0, XF86XK_TaskPane, spawn, SHCMD(TERMINAL " -e htop") }, { 0, XF86XK_Mail, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks") }, - { 0, XF86XK_MyComputer, spawn, {.v = (const char*[]){ TERMINAL, "-e", "lfub", "/", NULL } } }, + { 0, XF86XK_MyComputer, spawn, SHCMD(TERMINAL " -e lfub /") }, /* { 0, XF86XK_Battery, spawn, SHCMD("") }, */ - { 0, XF86XK_Launch1, spawn, {.v = (const char*[]){ "xset", "dpms", "force", "off", NULL } } }, + { 0, XF86XK_Launch1, spawn, SHCMD("xset dpms force off") }, { 0, XF86XK_TouchpadToggle, spawn, SHCMD("(synclient | grep 'TouchpadOff.*1' && synclient TouchpadOff=0) || synclient TouchpadOff=1") }, - { 0, XF86XK_TouchpadOff, spawn, {.v = (const char*[]){ "synclient", "TouchpadOff=1", NULL } } }, - { 0, XF86XK_TouchpadOn, spawn, {.v = (const char*[]){ "synclient", "TouchpadOff=0", NULL } } }, - { 0, XF86XK_MonBrightnessUp, spawn, {.v = (const char*[]){ "xbacklight", "-inc", "15", NULL } } }, - { 0, XF86XK_MonBrightnessDown, spawn, {.v = (const char*[]){ "xbacklight", "-dec", "15", NULL } } }, + { 0, XF86XK_TouchpadOff, spawn, SHCMD("synclient TouchpadOff=1") }, + { 0, XF86XK_TouchpadOn, spawn, SHCMD("synclient TouchpadOff=0") }, + { 0, XF86XK_MonBrightnessUp, spawn, SHCMD("xbacklight -inc 15") }, + { 0, XF86XK_MonBrightnessDown, spawn, SHCMD("xbacklight -dec 15") }, /* { MODKEY|Mod4Mask, XK_h, incrgaps, {.i = +1 } }, */ /* { MODKEY|Mod4Mask, XK_l, incrgaps, {.i = -1 } }, */ |