-1

For Ubuntu it's easy to create a desktop notification: https://askubuntu.com/questions/187022/how-can-i-send-a-custom-desktop-notification

it looks like:

$ notify-send "Hello world!"

on MacOS, I am looking for a simple command that I can use to create a system notification. Is there some apple script that I can launch to accomplish that?

1

Yes, you can use display notification in Applescript. For example:

osascript -e 'display notification "Hello World!" with title "Notification Example"'

The Applescript documentation for Displaying Notifications has additional details.

| improve this answer | |
  • happen to know if there are C bindings that can be used, instead of launching a child process? – Alexander Mills Mar 21 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.