diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2010-04-06 12:20:23 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2010-04-06 16:48:25 +0200 |
commit | ccd1d8e25cd4aafe3de98e3dcb57cfde45006011 (patch) | |
tree | bd7c22703d889b3ac3c6b1f727741791195d599b /contrib/eventcmd.sh | |
parent | bf79a91a3f6381cade8a9e0fd50c2897bfb316c9 (diff) | |
download | pianobar-windows-ccd1d8e25cd4aafe3de98e3dcb57cfde45006011.tar.gz pianobar-windows-ccd1d8e25cd4aafe3de98e3dcb57cfde45006011.tar.bz2 pianobar-windows-ccd1d8e25cd4aafe3de98e3dcb57cfde45006011.zip |
Update example eventcmd script
Diffstat (limited to 'contrib/eventcmd.sh')
-rwxr-xr-x | contrib/eventcmd.sh | 6 |
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 |