moses-palmer / pystray

GNU General Public License v3.0
463 stars 57 forks source link

Notifications under macOS #108

Closed danrossi closed 2 years ago

danrossi commented 2 years ago

I was wondering of notification support for macOS. I see there is a few options like this. I believe this is an applescript command.

appleScriptNotification = 'display notification "{0}" {1} {2}'.format(message,titlePart,subtitlePart)
os.system("osascript -e '{0}'".format(appleScriptNotification))
moses-palmer commented 2 years ago

Thank you very much for your suggestion!

I have added an implementation for notifications using osascript to the master branch.