summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2009-04-07 22:49:46 +0200
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2009-04-07 22:49:46 +0200
commitb76e4477a970fc07bba46c261efbd64197042b1d (patch)
tree421d8efe0db462a98735c4b94beca2d082f44010
parent575ae18234fa5f4d164457ab4f60616ad71b766a (diff)
downloadpianobar-b76e4477a970fc07bba46c261efbd64197042b1d.tar.gz
pianobar-b76e4477a970fc07bba46c261efbd64197042b1d.tar.bz2
pianobar-b76e4477a970fc07bba46c261efbd64197042b1d.zip
eventcmd example script added
-rwxr-xr-xcontrib/eventcmd.sh17
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
+