sxhkd: Control mpv with mpris + playerctl

I personally love this setup for language learning and it emphasizes how
far one can go with customizing their setup when using a window manager
like bspwm + sxhkd. Although it's possible to achieve the same effect in
other desktop environments, sxhkdrc makes adding new keybinds extremely
simple and easy to maintain.
This commit is contained in:
Donovan Glover 2022-09-28 11:25:02 -04:00
parent 4fb088585d
commit 188217ce46
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -113,19 +113,19 @@ super + F6
brightnessctl set +5% && notify-send -t 2000 "Increased brightness to" "$(brightnessctl get)"
super + F7
notify-send -t 2000 "F7" "No command defined."
playerctl -p mpv previous && notify-send -t 2000 "Previous track" "$(playerctl -p mpv metadata xesam:title)"
super + F8
notify-send -t 2000 "F8" "No command defined."
playerctl -p mpv next && notify-send -t 2000 "Next track" "$(playerctl -p mpv metadata xesam:title)"
super + F9
notify-send -t 2000 "F9" "No command defined."
playerctl -p mpv play-pause && notify-send -t 2000 "mpv" "$(playerctl -p mpv status)"
super + F10
notify-send -t 2000 "F10" "No command defined."
playerctl -p mpv position "5-" && notify-send -t 2000 "Minus 5 seconds" "$(playerctl -p mpv position)"
super + F11
notify-send -t 2000 "F11" "No command defined."
playerctl -p mpv position "5+" && notify-send -t 2000 "Plus 5 seconds" "$(playerctl -p mpv position)"
super + F12
~/.config/sxhkd/ctb.sh jisho