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