diff --git a/weechat_notify.py b/weechat_notify.py index c0bbc4e..8b85049 100755 --- a/weechat_notify.py +++ b/weechat_notify.py @@ -13,7 +13,7 @@ import yaml from gi.repository import Notify -Notify.init("Weechat Notifications") +Notify.init("weechat") config = yaml.safe_load(open(os.path.expanduser('~/.config/weechat/config.yaml'))) connection = pika.BlockingConnection(pika.connection.URLParameters( @@ -33,7 +33,6 @@ def handle_notify(ch, method, properties, body): channel=data[':channel']), data[':message'], 'dialog-information') n.show() - #print(data) channel.basic_consume(handle_notify, queue=queue_name, no_ack=True) channel.start_consuming() diff --git a/xmpp_notify.py b/xmpp_notify.py new file mode 100755 index 0000000..0e986b0 --- /dev/null +++ b/xmpp_notify.py @@ -0,0 +1,19 @@ +#!/usr/bin/python3 +################################################################################ +# xmpp_notify.py - xmpp-client notifications with libnotify +# +# author: mutantmonkey +################################################################################ + +import sys +from gi.repository import Notify + + +Notify.init("xmpp-client") + +if len(sys.argv) > 0: + msg = "new message: " + sys.argv[1] +else: + msg = "new message" +n = Notify.Notification.new("xmpp-client", msg, 'dialog-information') +n.show()