Skip to content

Instantly share code, notes, and snippets.

@zackkitzmiller
Created April 11, 2011 18:33
Show Gist options
  • Save zackkitzmiller/914010 to your computer and use it in GitHub Desktop.
Save zackkitzmiller/914010 to your computer and use it in GitHub Desktop.
ruby script for growl notify with pianobar
#!/usr/bin/ruby
trigger = ARGV.shift
if trigger == 'songstart'
songinfo = {}
STDIN.each_line { |line| songinfo.store(*line.chomp.split('=', 2))}
`growlnotify -t "Now Playing" -m "#{songinfo['title']}\nby #{songinfo['artist']}" -n 'pianobar' -a 'iTunes'`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment