summaryrefslogtreecommitdiff
path: root/contrib/eventcmd.sh
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2011-01-30 11:12:00 +0100
committerLars-Dominik Braun <lars@6xq.net>2011-01-30 11:12:00 +0100
commit0a76b7239781e6e0cb77169302219e6566b6c4d3 (patch)
treefd86e46903352bb757f9803904ea7a952d1f3481 /contrib/eventcmd.sh
parent07f39d2f5a6af556406589ba93ade1dc7aee8909 (diff)
downloadpianobar-windows-0a76b7239781e6e0cb77169302219e6566b6c4d3.tar.gz
pianobar-windows-0a76b7239781e6e0cb77169302219e6566b6c4d3.tar.bz2
pianobar-windows-0a76b7239781e6e0cb77169302219e6566b6c4d3.zip
Move example eventcmd scripts to own directory
Diffstat (limited to 'contrib/eventcmd.sh')
-rwxr-xr-xcontrib/eventcmd.sh38
1 files changed, 0 insertions, 38 deletions
diff --git a/contrib/eventcmd.sh b/contrib/eventcmd.sh
deleted file mode 100755
index 81dee3a..0000000
--- a/contrib/eventcmd.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-# create variables
-while read L; do
- k="`echo "$L" | cut -d '=' -f 1`"
- v="`echo "$L" | cut -d '=' -f 2`"
- export "$k=$v"
-done < <(grep -e '^\(title\|artist\|album\|stationName\|pRet\|pRetStr\|wRet\|wRetStr\|songDuration\|songPlayed\|rating\|coverArt\|stationCount\|station[0-9]*\)=' /dev/stdin) # don't overwrite $1...
-
-case "$1" in
-# songstart)
-# echo 'naughty.notify({title = "pianobar", text = "Now playing: ' "$title" ' by ' "$artist" '"})' | awesome-client -
-# echo "$title -- $artist" > $HOME/.config/pianobar/nowplaying
-# # or whatever you like...
-# ;;
-
-# songfinish)
-# # scrobble if 75% of song have been played, but only if the song hasn't
-# # been banned
-# if [ -n "$songDuration" ] &&
-# [ $(echo "scale=4; ($songPlayed/$songDuration*100)>50" | bc) -eq 1 ] &&
-# [ "$rating" -ne 2 ]; then
-# # scrobbler-helper is part of the Audio::Scrobble package at cpan
-# # "pia" is the last.fm client identifier of "pianobar", don't use
-# # it for anything else, please
-# scrobbler-helper -P pia -V 1.0 "$title" "$artist" "$album" "" "" "" "$((songDuration/1000))" &
-# fi
-# ;;
-
- *)
- if [ "$pRet" -ne 1 ]; then
- echo "naughty.notify({title = \"pianobar\", text = \"$1 failed: $pRetStr\"})" | awesome-client -
- elif [ "$wRet" -ne 1 ]; then
- echo "naughty.notify({title = \"pianobar\", text = \"$1 failed: Network error: $wRetStr\"})" | awesome-client -
- fi
- ;;
-esac
-