py-reminder/notify.py

12 lines
289 B
Python
Raw Normal View History

2019-07-01 10:18:34 +00:00
import os
def show_notification(title, msg):
if os.name == 'nt':
from notify_win import show_toast
show_toast(title, msg)
else:
from gi.repository import Notify
Notify.init(title)
Notify.Notification.new(msg).show()
Notify.uninit()