Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from richo/richo_hax

Richo hax
  • Loading branch information...
commit b4c4aff757a02ce71d2ff50af2e60ee78ca9d04d 2 parents ec7e357 + d33baab
@joshbenham authored
Showing with 8 additions and 5 deletions.
  1. +1 −1  README.md
  2. +7 −4 cmus-growl
View
2  README.md
@@ -23,5 +23,5 @@ Usage
$ cmus
# set cmus to use cmus-growl
-:status_display_program=/where/the/script/is/located/cmus-growl
+:status_display_program=/path/to/cmus-growl
```
View
11 cmus-growl
@@ -1,16 +1,16 @@
#!/usr/bin/env python
+# vi: sw=2 ts=2
import os
import sys
import gntp.notifier
-if __name__ == '__main__':
-
+def main(argv):
# open up log to write to
f = open('/var/tmp/cmus.log', 'w')
# extract the data
- data = dict(zip(sys.argv[1::2], sys.argv[2::2]))
+ data = dict(zip(argv[1::2], argv[2::2]))
# set a default artwork image
artwork = "http://example.org"
@@ -48,4 +48,7 @@ if __name__ == '__main__':
icon = artwork,
sticky = False,
priority = 1,
- )
+ )
+
+if __name__ == '__main__':
+ main(sys.argv)
Please sign in to comment.
Something went wrong with that request. Please try again.