Environment.notify module¶
Defines one useful function notify()
to (try to) send a desktop notification.
Only tested on Ubuntu and Debian desktops.
Should work on any FreeDesktop compatible desktop, see https://wiki.ubuntu.com/NotifyOSD.
Warning
Experimental support of Mac OS X has been added since #143 (https://github.com/SMPyBandits/SMPyBandits/issues/143).
-
Environment.notify.
PROGRAM_NAME
= 'SMPyBandits'¶ Program name
-
Environment.notify.
ICON_PATH
= 'logo.png'¶ Icon to use
-
Environment.notify.
has_Notify
= True¶ Trying to import gi.repository.Notify
-
Environment.notify.
notify_gi
(body, summary='SMPyBandits', icon='terminal', timeout=5)[source]¶ Send a notification, with gi.repository.Notify.
icon can be “dialog-information”, “dialog-warn”, “dialog-error”.