MacOSX Notification
| Schemes | macosx:// |
| Cargo feature | service-macosx |
| Service | https://github.com/julienXX/terminal-notifier |
| Body formats | text (first is the default) |
| Attachments | no |
| Title length | 250 characters |
| Body length | 32,768 characters |
| Body lines | 10 lines |
| Request throttle | none |
| Vendor URLs accepted | no |
URL formats
{schema}://
{schema} is one of macosx://.
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
click | Open/Click URL | string | ||
image | Include Image | bool | yes | |
sender | Sender | string | ||
sound | Sound | string | ||
version | Terminal-Notifier Version | choice | one of 2, 3 |
The common URL parameters (format, overflow, verify, redirect, cto, rto, retry, wait, store, tag, tz, user, password, port, optional, emojis) apply as well.
Examples
Accepted URLs (tokens are fake):
macosx://
macosx://_/
macosx://_/?image=no
macosx://_/?sender=me
macosx://_/?version=2
macosx://_/?sound=default
macosx://_/?version=2&image=no
macosx://_/?version=2&sound=-x
Rejected URLs:
macosx://_/?version=4
macosx://_/?version=abc
macosx://_/?version=3.0
Send one from the command line:
mercurio -t 'Backup' -b 'Finished in 42s' 'macosx://'
Notes
macOS Notification Center (macosx://): banners through terminal-notifier.
mercurio runs terminal-notifier (brew install terminal-notifier), looked up in the same places: /opt/homebrew/bin, /usr/local/bin, /usr/bin, /bin, /opt/local/bin. Without ?version=, the installed major version is probed once per URL with terminal-notifier -version (falling back to 3); version 2 gets -sender and -appIcon, version 3 -contentImage. Every value is prefixed with \ so terminal-notifier reads it as plain text.
There is no osascript fallback.
Differences with Apprise
- When no known path holds
terminal-notifier, mercurio still runs it throughPATH(Apprise gives up). - On other platforms delivery fails with
Unsupported(Apprise does not load the plugin there).