Advertisement
Guest User

Pianobar Notification (OS X)

a guest
Apr 14th, 2011
910
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 0.24 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement