diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2022-10-16 21:16:31 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2022-10-16 21:16:31 +0300 |
commit | c015df322ec4fba41d75b5418bd460de42697e07 (patch) | |
tree | 20e8184470c2f63b4de62734a2c784d5e22e0920 /dotfiles/.local/bin/lmc | |
parent | 70fc9fd33fa7e7d7cfc2fc62c8b2a4c4a17bb204 (diff) | |
download | swayrice-c015df322ec4fba41d75b5418bd460de42697e07.tar.gz swayrice-c015df322ec4fba41d75b5418bd460de42697e07.zip |
Use playerctl/MPRIS for media control
Diffstat (limited to 'dotfiles/.local/bin/lmc')
-rwxr-xr-x | dotfiles/.local/bin/lmc | 13 |
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 |