public
Description: A collection of scripts (some mine, some shamelessly nabbed from elsewhere) that live in my ~/local/bin folder.
Clone URL: git://github.com/nickstenning/bin.git
No longer use UDP to talk to Growl. Growl v1.1.3 fixes growlnotify
nickstenning (author)
Sat Jun 07 03:44:27 -0700 2008
commit  c909f50b1535cf0f5bc1b553bf4f7bd34b065f67
tree    130457886b19ca143b1dee9c4675c645a3a97c0b
parent  941ad55beb7221d1b8640130f7aa709bd750450c
...
6
7
8
9
 
10
11
12
...
36
37
38
39
 
40
41
42
...
6
7
8
 
9
10
11
12
...
36
37
38
 
39
40
41
42
0
@@ -6,7 +6,7 @@ require 'librmpd'
0
 GROWLNOTIFY = '/usr/local/bin/growlnotify'
0
 
0
 class MPDGrowler
0
- States = {
0
+ STATES = {
0
     :play => "playing",
0
     :pause => "paused",
0
     :stop => "stopped"
0
@@ -36,7 +36,7 @@ class MPDGrowler
0
     growl unless old_song == new_song
0
   end
0
   def growl
0
- cmd = %{#{GROWLNOTIFY} -H localhost -a iTunes.app -n MPD -m "#{message}" -t "MPD: #{States[@state]}"}
0
+ cmd = %{#{GROWLNOTIFY} -a iTunes.app -n MPD -m "#{message}" -t "MPD: #{STATES[@state]}"}
0
     system cmd
0
   end
0
   def message

Comments

    No one has commented yet.