summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2010-04-06 12:20:23 +0200
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2010-04-06 16:48:25 +0200
commitccd1d8e25cd4aafe3de98e3dcb57cfde45006011 (patch)
treebd7c22703d889b3ac3c6b1f727741791195d599b /contrib
parentbf79a91a3f6381cade8a9e0fd50c2897bfb316c9 (diff)
downloadpianobar-ccd1d8e25cd4aafe3de98e3dcb57cfde45006011.tar.gz
pianobar-ccd1d8e25cd4aafe3de98e3dcb57cfde45006011.tar.bz2
pianobar-ccd1d8e25cd4aafe3de98e3dcb57cfde45006011.zip
Update example eventcmd script
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/eventcmd.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/eventcmd.sh b/contrib/eventcmd.sh
index 7a9ad49..fd02973 100755
--- a/contrib/eventcmd.sh
+++ b/contrib/eventcmd.sh
@@ -5,7 +5,9 @@ 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\|songDuration\|songPlayed\|rating\)=' /dev/stdin) # don't overwrite $1...
+done < <(grep -e '^\(title\|artist\|album\|stationName\|pRet\|pRetStr\|wRet\|wRetStr\|songDuration\|songPlayed\|rating\)=' /dev/stdin) # don't overwrite $1...
+
+env > /tmp/pianobar-env
case "$1" in
# songstart)
@@ -30,6 +32,8 @@ case "$1" in
*)
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