diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-04-07 22:49:46 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-04-07 22:49:46 +0200 |
commit | b76e4477a970fc07bba46c261efbd64197042b1d (patch) | |
tree | 421d8efe0db462a98735c4b94beca2d082f44010 | |
parent | 575ae18234fa5f4d164457ab4f60616ad71b766a (diff) | |
download | pianobar-windows-b76e4477a970fc07bba46c261efbd64197042b1d.tar.gz pianobar-windows-b76e4477a970fc07bba46c261efbd64197042b1d.tar.bz2 pianobar-windows-b76e4477a970fc07bba46c261efbd64197042b1d.zip |
eventcmd example script added
-rwxr-xr-x | contrib/eventcmd.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/eventcmd.sh b/contrib/eventcmd.sh new file mode 100755 index 0000000..c414282 --- /dev/null +++ b/contrib/eventcmd.sh @@ -0,0 +1,17 @@ +#!/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\)=' /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... + ;; +esac + |