diff options
author | Karel Kočí <cynerd@email.cz> | 2017-02-04 22:20:38 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-02-04 22:20:38 +0100 |
commit | ecd517d2f3a6b17757a502f4d83372aa499d2f1d (patch) | |
tree | fe992641315494200556e8a2d507aae49663af67 | |
parent | 6451a52dc269703b04f67bdecd4f69ef6b18f7c6 (diff) | |
download | myconfigs-ecd517d2f3a6b17757a502f4d83372aa499d2f1d.tar.gz myconfigs-ecd517d2f3a6b17757a502f4d83372aa499d2f1d.tar.bz2 myconfigs-ecd517d2f3a6b17757a502f4d83372aa499d2f1d.zip |
Control mpd using i3block
-rwxr-xr-x | config/i3blocks/scripts/mpd | 16 |
1 files changed, 16 insertions, 0 deletions
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 |