Created
March 30, 2019 13:21
-
-
Save CBJamo/46161a4531d6ec2f653be0a7a7e9190c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import gi | |
gi.require_version('Gio', '2.0') | |
from gi.repository import Gio | |
Application = Gio.Application.new("hello.world", Gio.ApplicationFlags.FLAGS_NONE) | |
Application.register() | |
Notification = Gio.Notification.new(sys.argv[1]) | |
Notification.set_body(sys.stdin.read()) | |
Icon = Gio.ThemedIcon.new("dialog-information") | |
Notification.set_icon(Icon) | |
Application.send_notification(None, Notification) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment