From ecd517d2f3a6b17757a502f4d83372aa499d2f1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 4 Feb 2017 22:20:38 +0100 Subject: Control mpd using i3block --- config/i3blocks/scripts/mpd | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'config/i3blocks/scripts/mpd') diff --git a/config/i3blocks/scripts/mpd b/config/i3blocks/scripts/mpd index 63ba924..6594a57 100755 --- a/config/i3blocks/scripts/mpd +++ b/config/i3blocks/scripts/mpd @@ -1,4 +1,20 @@ #!/bin/bash + +case "$BLOCK_BUTTON" in + 1) + mpc toggle >/dev/null + ;; + 2) + mpc stop >/dev/null + ;; + 4) + mpc next >/dev/null + ;; + 5) + mpc prev >/dev/null + ;; +esac + if [ -n "`mpc status | grep -E "(playing|paused)"`" ]; then echo `mpc -f "%artist%, %album%, %title%" status | head -1` echo -- cgit v1.2.3