Last active
August 29, 2015 13:57
-
-
Save fijimunkii/9521310 to your computer and use it in GitHub Desktop.
sh: pianobar config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function lyrics | |
| { | |
| sh ~/.config/pianobar/lyrics.sh | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user = yo@gmail.com | |
| password = w00t | |
| event_command = /Users/fijimunkii/.config/pianobar/eventcommand.sh | |
| autostart_station = 45088214493320625 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| fold="$HOME/.config/pianobar" | |
| ctlf="$fold/ctl" | |
| nowplaying="$fold/lyrics.sh" | |
| 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\|album\|stationName\|pRet\|pRetStr\|wRet\|wRetStr\|songDuration\|songPlayed\|rating\|songDuration\|songPlayed\|coverArt\|stationCount\|station[0-9]\+\)=' /dev/stdin) | |
| case "$1" in | |
| songstart) | |
| echo -e "glyrc lyrics -a \"$artist\" -t \"$title\" -b \"$album\" -w /tmp/" > "$nowplaying" | |
| /usr/local/bin/terminal-notifier -subtitle "Artist: $artist" -message "Album: $album" -title "$title" | |
| ;; | |
| esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| glyrc lyrics -a "Phish" -t "Roses Are Free (Live 1998)" -b "Hampton Comes Alive 1998-11-21" -w /tmp/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment