blob: c414282a211493496761a90d340eb38d31b676dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
|