notify-rust
Shows desktop notifications. This implementation does not rely on libnotify, as it is using dbus-rs. Basic notification features are supported, more sophisticated functionality will follow. The API shown below should be stable.
[]
= "3"
Requirements
rustc
>= 1.31- linux, with
libdbus
(see dbus-rs) - macos
- no windows support, yet
Examples
Example 1 (Simple Notification)
use Notification;
new
.summary
.body
.icon
.show.unwrap;
Example 2 (Persistent Notification)
use Notification;
use NotificationHint as Hint;
new
.summary
.body
.icon
.appname
.hint
.hint // this is not supported by all implementations
.timeout // this however is
.show.unwrap;
Usage & Documentation
Please see the documentation for current examples.
Commandline tool
Checkout toastify, it exposes most of the functionality of the lib to the commandline.
macOS support
This library shines on linux and bsd, which is its original target platform.
Lately it gained support for macOS thanks to mac-notification-sys.
However this only includes a small subset of the current functionality, since NSNotification
s don't have as many features. Please refer to the You are a versed macOS UI developer with mad Objective-C skillz? PRSV.