gen2brain / beeep

Go cross-platform library for sending desktop notifications, alerts and beeps
BSD 2-Clause "Simplified" License
1.43k stars 89 forks source link

Use 'display notification' with sound parameter instead of 'System Events' on macOS #60

Closed FlorianLoch closed 8 months ago

FlorianLoch commented 8 months ago

While not being an Apple Script expert, I am under the impression that every time the caller/its parent process's fingerprint changes one needs to allow it to call System Events (again).

That does not seem to be necessary with display notification. And as this also got a parameter for sound that might be the better approach?

Regarding backwards compatibility: this is mentioned in some doc from Apple that dates back by at least 6 years. So I assume this should cover all scenarios: https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/DisplayNotifications.html

WDYT?

gen2brain commented 8 months ago

Merged, thanks.