Expand description
Cross-platform notification backend.
Dispatches desktop notifications via platform-appropriate shell commands.
Provides AutoNotifier which implements the crate::runner::Notifier
trait and replaces the previous RealNotifier stub.
§Backend selection
detect tries backends in platform-specific order using which::which.
An explicit override via [meta] notify_backend in .krypt.toml (or
the --backend CLI flag) bypasses auto-detection.
§Backend commands
| Backend | Command |
|---|---|
notify-send | notify-send <title> <body> |
osascript | osascript -e 'display notification ...' |
terminal-notifier | terminal-notifier -title <title> -message <body> |
powershell | PowerShell [System.Windows.Forms.MessageBox] |
stderr | eprintln!("notice: {title} — {body}") |
§PowerShell strategy
BurntToast requires a third-party module install (Install-Module BurntToast) which most users won’t have. Instead we use
System.Windows.Forms.MessageBox which ships in every .NET installation.
Values are passed via $env:KRYPT_NOTIFY_TITLE / $env:KRYPT_NOTIFY_BODY
environment variables to avoid PowerShell single-quote escaping entirely.
Structs§
- Auto
Notifier - Production notifier backed by a detected or configured
NotifyBackend.
Enums§
- Notify
Backend - Available notification backends.
- Notify
Error - Errors that can occur while dispatching a notification.
Functions§
- command_
for - Build the command + args for a given backend without spawning.
- detect
- Detect the best available notification backend.
- escape_
applescript - Escape a string for use inside an AppleScript double-quoted string.
- notify
- Send a desktop notification using the specified backend.