Guest User

notify-without-growl

a guest
Oct 12th, 2016
108
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.   `osascript -e 'display notification "#{songinfo['title']}" with title "#{songinfo['artist']}"'`
  10. end
RAW Paste Data