aboutsummaryrefslogtreecommitdiff
path: root/ratpoison/panel/music
diff options
context:
space:
mode:
authorVasil Zlatanov <vasil.zlatanov@gmail.com>2015-02-12 19:45:58 +0100
committerVasil Zlatanov <vasil.zlatanov@gmail.com>2015-02-12 19:45:58 +0100
commitf7ac47a1102006842d074146237c756648478675 (patch)
treeebd106e074f56d94046fc06d7718b2fc31ea3386 /ratpoison/panel/music
parent504b3cc5d6cbc9ec66c5e89e3ecd4310c8dd5a69 (diff)
downloaddotfiles-f7ac47a1102006842d074146237c756648478675.tar.gz
dotfiles-f7ac47a1102006842d074146237c756648478675.tar.bz2
dotfiles-f7ac47a1102006842d074146237c756648478675.zip
bspwm update
Diffstat (limited to 'ratpoison/panel/music')
-rwxr-xr-xratpoison/panel/music11
1 files changed, 11 insertions, 0 deletions
diff --git a/ratpoison/panel/music b/ratpoison/panel/music
new file mode 100755
index 0000000..6190dbc
--- /dev/null
+++ b/ratpoison/panel/music
@@ -0,0 +1,11 @@
+while true;do
+if mpc | grep -q playing; then
+echo "p`mpc current`" | cut --bytes 1-40
+echo "K`mpc -h 127.0.0.1 volume | perl -pe 's/^volume://' | perl -pe 's/%$//' | perl -pe 's/^ //'`"
+else
+echo "P`mpc current`" | cut --bytes 1-40
+sleep 1;
+echo "K`mpc -h 127.0.0.1 volume | perl -pe 's/^volume://' | perl -pe 's/%$//' | perl -pe 's/^ //'`"
+fi
+sleep 5;
+done