py-reminder/notify.py
2019-07-01 12:18:34 +02:00

12 lines
289 B
Python

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()