diff options
author | xyz <gky44px1999@gmail.com> | 2021-12-17 18:36:56 -0800 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2021-12-17 18:36:56 -0800 |
commit | 7cce26e5f41930e23f695656761709d9d6700c55 (patch) | |
tree | 2f192acd2dec6f568b747f67b55480e700546f87 | |
parent | c4e604da07b90640b68d67d2a30b150a848ba6aa (diff) |
move all sxhkd hotkeys here; caps_lock detect is a workaround, if press caps_lock too long, status bar will not show the change, keypressrelease patch is another solution
-rw-r--r-- | config.def.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h index 49b62f5..446dac2 100644 --- a/config.def.h +++ b/config.def.h @@ -1,5 +1,7 @@ /* See LICENSE file for copyright and license details. */ +#include <X11/XF86keysym.h> + /* appearance */ static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ @@ -102,6 +104,29 @@ static Key keys[] = { TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) { MODKEY|ShiftMask, XK_q, quit, {0} }, + + { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("amixer set Master 5%-; kill -RTMIN+1 \"$(cat \"$XDG_CACHE_HOME/pidofbar\")\"") }, + { 0, XF86XK_AudioMute, spawn, SHCMD("amixer set Master toggle; kill -RTMIN+1 \"$(cat \"$XDG_CACHE_HOME/pidofbar\")\"") }, + { 0, XF86XK_AudioNext, spawn, SHCMD("playerctl next") }, + { 0, XF86XK_AudioPlay, spawn, SHCMD("playerctl play-pause") }, + { 0, XF86XK_AudioPrev, spawn, SHCMD("playerctl previous") }, + { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("amixer set Master 5%+; kill -RTMIN+1 \"$(cat \"$XDG_CACHE_HOME/pidofbar\")\"") }, + { 0, XK_Caps_Lock,spawn, SHCMD("sleep 0.2; kill -RTMIN+3 \"$(cat \"$XDG_CACHE_HOME/pidofbar\")\"") }, + { 0, XK_Print, spawn, SHCMD("ffmpeg -f x11grab -i \"$DISPLAY\" -vframes 1 \"$XDG_PICTURES_DIR/screenshots/$(time.uuid).png\"") }, + { MODKEY, XF86XK_AudioMute, spawn, SHCMD("amixer set Capture toggle; kill -RTMIN \"$(cat \"$XDG_CACHE_HOME/pidofbar\")\"") }, + { MODKEY, XK_Print, spawn, SHCMD("xrectsel '%w %h %x %y' | xargs sh -c 'ffmpeg -f x11grab -s \"$1x$2\" -i \"$DISPLAY+$3,$4\" -vframes 1 \"$XDG_PICTURES_DIR/screenshots/$(time.uuid).png\"' shell") }, + { MODKEY, XK_n, spawn, SHCMD("dunstctl close") }, + { MODKEY, XK_q, spawn, SHCMD("mullvad connect -w; kill -RTMIN+4 \"$(cat \"$XDG_CACHE_HOME/pidofbar\")\"; qbittorrent") }, + { MODKEY, XK_r, spawn, SHCMD("xsel -ob | rev | xsel -ib") }, + { MODKEY, XK_s, spawn, SHCMD("shufwall") }, + { MODKEY, XK_v, spawn, SHCMD("if mullvad status | grep -q 'Disconnect'; then mullvad connect -w; else killall qbittorrent; mullvad disconnect -w; fi; kill -RTMIN+4 \"$(cat \"$XDG_CACHE_HOME/pidofbar\")\"") }, + { MODKEY, XK_w, spawn, SHCMD("$BROWSER") }, + { MODKEY, XK_y, spawn, SHCMD("mpvy -s") }, + { MODKEY|ControlMask, XK_y, spawn, SHCMD("tsp mpvy -A -u \"$(xsel -ob)\"") }, + { MODKEY|ShiftMask, XK_Print, spawn, SHCMD("reco") }, + { MODKEY|ShiftMask, XK_n, spawn, SHCMD("alarm 12 'Boiling Water!'") }, + { MODKEY|ShiftMask, XK_w, spawn, SHCMD("mullvad-exclude $BROWSER") }, + { MODKEY|ShiftMask, XK_y, spawn, SHCMD("mpvy -a") }, }; /* button definitions */ |