summaryrefslogtreecommitdiff
path: root/contrib/eventcmd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/eventcmd.sh')
-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
+