dotfiles/.config/sxhkd/sxhkdrc

108 lines
3.8 KiB
Plaintext
Raw Normal View History

#Terminal
super + Return
kitty
#Program launcher
super + r
dmenu_run
#Firefox
super + d
firefox
# Lock Screen
super + l
betterlockscreen -l
#Nautilus
super + p
nautilus
#Quit/restart bspwm
super + alt + {q,r}
bspc {quit,wm -r}
#Close and kill
super + {_,shift + }v
bspc node -{c,k}
#Set the window state
super + {t,s,f}
bspc node -t {tiled,floating,fullscreen}
#Focus the node in the given direction
super + {_,shift + }{Left,Down,Up,Right}
bspc node -{f,s} {west,south,north,east}
#Focus the given desktop
super + {ampersand,eacute,quotedbl,apostrophe,parenleft,minus,egrave,underscore,ccedilla,agrave}
bspc desktop -f '{1,2,3,4,5,6,7,8,9,0}'
#Send and follow to the given desktop
super + shift + {1,2,3,4,5,6,7,8,9,0}
bspc node -d '{1,2,3,4,5,6,7,8,9,0}' --follow
#Preselect the direction
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
#Preselect the ratio
super + ctrl + {1-9}
bspc node -o 0.{1-9}
#Cancel the preselection for the focused desktop
super + Escape
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
#Expand a window by moving one of its side outward
super + alt + {h,j,k,l}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
#Contract a window by moving one of its side inward
super + alt + shift + {h,j,k,l}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
#Move a floating window
super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}
# Mute
XF86AudioMute
pactl set-sink-mute @DEFAULT_SINK@ toggle && \
dunstify -h string:x-dunst-stack-tag:sink-mute "Sink muted" (pactl get-sink-mute @DEFAULT_SINK@ | cut -d ' ' -f 2)
# Volume +
XF86AudioRaiseVolume
pactl set-sink-volume @DEFAULT_SINK@ +2% && \
dunstify -h string:x-dunst-stack-tag:sink-volume "Sink volume" (pactl get-sink-volume @DEFAULT_SINK@ | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' | head -n 1)
# Volume -
XF86AudioLowerVolume
pactl set-sink-volume @DEFAULT_SINK@ -2% && \
dunstify -h string:x-dunst-stack-tag:sink-volume "Sink volume" (pactl get-sink-volume @DEFAULT_SINK@ | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' | head -n 1)
# Mute mic
XF86AudioMicMute
pactl set-source-mute @DEFAULT_SOURCE@ toggle && \
dunstify -h string:x-dunst-stack-tag:source-mute "Source muted" (pactl get-source-mute @DEFAULT_SOURCE@ | cut -d ' ' -f 2)
# Brightness -
XF86MonBrightnessDown
echo (math (cat /sys/class/backlight/amdgpu_bl0/brightness) - 5) > /sys/class/backlight/amdgpu_bl0/brightness
# Brightness +
XF86MonBrightnessUp
echo (math (cat /sys/class/backlight/amdgpu_bl0/brightness) + 5) > /sys/class/backlight/amdgpu_bl0/brightness
# Screenshot fullscreen
Print
set FILE_NAME "/home/louis/Pictures/Screenshots/Screeshot-"(date +'%d-%m-%Y-%H-%M-%S')".png" && import -window root ${FILE_NAME} && dunstify "Screenshot taken: ${FILE_NAME}"
# Screenshot with selecton
ctrl + Print
set FILE_NAME "/home/louis/Pictures/Screenshots/Screeshot-"(date +'%d-%m-%Y-%H-%M-%S')".png" && import ${FILE_NAME} && dunstify "Screenshot taken: ${FILE_NAME}"
# Play
XF86AudioPlay
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
# Previous
XF86AudioPrev
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
# Next
XF86AudioNext
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
# Alternate between windows, even across multiple desktops
super + Tab
bspc node last -f last.\!hidden -f last.\!same_class
# Rotate tree
super + shift + {s,d}
bspc node @/ -C {forward,backward}