From b76e4477a970fc07bba46c261efbd64197042b1d Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 7 Apr 2009 22:49:46 +0200 Subject: eventcmd example script added --- contrib/eventcmd.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 contrib/eventcmd.sh (limited to 'contrib') 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 + -- cgit v1.2.3