From f7ac47a1102006842d074146237c756648478675 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Thu, 12 Feb 2015 19:45:58 +0100 Subject: bspwm update --- ratpoison/panel/music | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 ratpoison/panel/music (limited to 'ratpoison/panel/music') 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 -- cgit v1.2.3-54-g00ecf