aboutsummaryrefslogtreecommitdiff
path: root/config/i3blocks/scripts/mpd
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-02-04 22:20:38 +0100
committerKarel Kočí <cynerd@email.cz>2017-02-04 22:20:38 +0100
commitecd517d2f3a6b17757a502f4d83372aa499d2f1d (patch)
treefe992641315494200556e8a2d507aae49663af67 /config/i3blocks/scripts/mpd
parent6451a52dc269703b04f67bdecd4f69ef6b18f7c6 (diff)
downloadmyconfigs-ecd517d2f3a6b17757a502f4d83372aa499d2f1d.tar.gz
myconfigs-ecd517d2f3a6b17757a502f4d83372aa499d2f1d.tar.bz2
myconfigs-ecd517d2f3a6b17757a502f4d83372aa499d2f1d.zip
Control mpd using i3block
Diffstat (limited to 'config/i3blocks/scripts/mpd')
-rwxr-xr-xconfig/i3blocks/scripts/mpd16
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