From ccd1d8e25cd4aafe3de98e3dcb57cfde45006011 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 6 Apr 2010 12:20:23 +0200 Subject: Update example eventcmd script --- contrib/eventcmd.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'contrib') 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 -- cgit v1.2.3