summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/eventcmd.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/eventcmd.sh b/contrib/eventcmd.sh
index c414282..a857afd 100755
--- a/contrib/eventcmd.sh
+++ b/contrib/eventcmd.sh
@@ -5,7 +5,7 @@ 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\)=' /dev/stdin) # don't overwrite $1...
+done < <(grep -e '^\(title\|artist\|album\|stationName\|pRet\|pRetStr\)=' /dev/stdin) # don't overwrite $1...
case "$1" in
songstart)
@@ -13,5 +13,10 @@ case "$1" in
#echo "$title -- $artist" > $HOME/.config/pianobar/nowplaying
# or whatever you like...
;;
+ *)
+ if [ $pRet -ne 0 ]; then
+ echo "naughty.notify({title = \"pianobar\", text = \"$1 failed: $pRetStr\"})" | awesome-client -
+ fi
+ ;;
esac