Guest User

Pianobar Notification (OS X)

a guest
Apr 14th, 2011
805
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/ruby
  2.  
  3. trigger = ARGV.shift
  4.  
  5. if trigger == 'songstart'
  6.   songinfo = {}
  7.  
  8.   STDIN.each_line { |line| songinfo.store(*line.chomp.split('=', 2))}
  9.   `growlnotify -t "Now Playing" -m "#{songinfo['title']}\nby #{songinfo['artist']}"`
  10. end
RAW Paste Data