1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
#[cfg(any(target_os = "windows", target_os = "macos"))]
fn main() {
println!("this is an xdg only feature")
}
#[cfg(all(unix, not(target_os = "macos")))]
fn main() {
use notify_rust::CloseReason;
notify_rust::Notification::new()
.summary("Don't Mind me")
.hint(notify_rust::Hint::Transient(true))
.body("I'll be gone soon enough.\nSorry for the inconvenience.")
.show()
.unwrap()
.on_close(|reason: CloseReason| println!("the notification was closed reason: {reason:?}"));
}
|