aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/lmc
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2022-10-16 21:16:31 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2022-10-16 21:16:31 +0300
commitc015df322ec4fba41d75b5418bd460de42697e07 (patch)
tree20e8184470c2f63b4de62734a2c784d5e22e0920 /dotfiles/.local/bin/lmc
parent70fc9fd33fa7e7d7cfc2fc62c8b2a4c4a17bb204 (diff)
downloadswayrice-c015df322ec4fba41d75b5418bd460de42697e07.tar.gz
swayrice-c015df322ec4fba41d75b5418bd460de42697e07.zip
Use playerctl/MPRIS for media control
Diffstat (limited to 'dotfiles/.local/bin/lmc')
-rwxr-xr-xdotfiles/.local/bin/lmc13
1 files changed, 6 insertions, 7 deletions
diff --git a/dotfiles/.local/bin/lmc b/dotfiles/.local/bin/lmc
index c740c0c..f1ef8f5 100755
--- a/dotfiles/.local/bin/lmc
+++ b/dotfiles/.local/bin/lmc
@@ -5,13 +5,12 @@ case "$1" in
"down") pamixer --allow-boost -d "$2" || amixer sset Master 2%- ;;
"mute") pamixer --allow-boost -t || amixer sset Master toggle ;;
"truemute") pamixer --allow-boost -m || amixer sset Master mute ;;
- "toggle") mpc toggle ; $newmpd ;;
- "pause") mpc pause ; $newmpd ;;
- "forward") mpc seek +"$2" ; $newmpd ;;
- "back") mpc seek -"$2" ; $newmpd ;;
- "next") mpc next ; $newmpd ;;
- "prev") mpc prev ; $newmpd ;;
- "replay") mpc seek 0% ; $newmpd ;;
+ "toggle") playerctl play-pause;;
+ "pause") playerctl pause;;
+ "forward") playerctl position "$2"+;;
+ "back") playerctl position "$2"-;;
+ "next") playerctl next;;
+ "prev") playerctl previous;;
esac
exit