summaryrefslogtreecommitdiffstats
path: root/cholerab/knut/plugs/pynot
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2011-08-13 22:16:22 +0200
committermakefu <github@syntax-fehler.de>2011-08-13 22:16:22 +0200
commit1383106d2270a281bb697d2d1dace220ba2de163 (patch)
tree69e342e3c9f309a57055b7c7b6bdf22154082f8f /cholerab/knut/plugs/pynot
parentd39ee64d708f7728fdd8b78f8218bf49e1e7dbb3 (diff)
knut/plugs/pynot: initial commit
notification via lib-notify and python
Diffstat (limited to 'cholerab/knut/plugs/pynot')
-rwxr-xr-xcholerab/knut/plugs/pynot/index17
1 files changed, 17 insertions, 0 deletions
diff --git a/cholerab/knut/plugs/pynot/index b/cholerab/knut/plugs/pynot/index
new file mode 100755
index 00000000..04e9c90c
--- /dev/null
+++ b/cholerab/knut/plugs/pynot/index
@@ -0,0 +1,17 @@
+#!/usr/bin/python
+
+import pynotify,os,sys
+
+imageURI = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0]) + '/../../../bling/krebs_plain_negate_nobg.png'))
+try:
+ TITLE=os.environ.get('method','clive') + ':' + os.environ.get('id','-1')
+ MESSAGE=os.environ.get('params','No Message')
+except:
+ print("Error 1: You are made of stupid!")
+ exit(23)
+
+pynotify.init("Notif App",)
+print imageURI
+n = pynotify.Notification(TITLE, MESSAGE,imageURI)
+n.set_timeout(20000)
+n.show()