Debian Codegraph @

examples/persistent.rs

raw symbols SCIP
1 #[cfg(any(target_os = "windows", target_os = "macos"))]
2 fn main() {
3 println!("this is a xdg only feature")
4 }
5
6 #[cfg(all(unix, not(target_os = "macos")))]
7 fn main() -> Result<(), Box<dyn std::error::Error>> {
8 use notify_rust::{Hint, Timeout};
9
10 notify_rust::Notification::new()
11 .summary("Persistent notification")
12 .body("This should not go away unless you want it to.")
13 .icon("firefox")
14 .hint(Hint::Resident(true)) // does not work on kde
15 .timeout(Timeout::Never) // works on kde and gnome
16 .show()?;
17 Ok(())
18 }