--- persepolis/scripts/mac_notification.py | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/persepolis/scripts/mac_notification.py b/persepolis/scripts/mac_notification.py index 4d69929..9a9a7cf 100644 --- a/persepolis/scripts/mac_notification.py +++ b/persepolis/scripts/mac_notification.py @@ -15,20 +15,13 @@ # native notification on mac! needs Xcode (latest version) installed and pyobjc # library from pip -import Foundation -import AppKit -import objc - -NSUserNotification = objc.lookUpClass('NSUserNotification') -NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter') - - def notifyMac(title, subtitle, info_text, delay=0): - notification = NSUserNotification.alloc().init() - notification.setTitle_(title) - notification.setSubtitle_(subtitle) - notification.setInformativeText_(info_text) - notification.setDeliveryDate_(Foundation.NSDate.dateWithTimeInterval_sinceDate_( - delay, Foundation.NSDate.date())) - NSUserNotificationCenter.defaultUserNotificationCenter( - ).scheduleNotification_(notification) + print(f""" +Warning: Persepolis was installed from nixpkgs, which currently breaks notifications + on macOS. Until https://github.com/NixOS/nixpkgs/issues/105156 is resolved, + this cannot be fixed. The notification that should've been displayed was: + + title: {title} + subtitle: {subtitle} + info_text: {info_text} + """) -- 2.39.3 (Apple Git-145)