Debian Codegraph @

examples/sound.rs

raw symbols SCIP
1 #![allow(unused_must_use)]
2 use notify_rust::Notification;
3
4 #[cfg(target_os = "macos")]
5 static SOUND: &str = "Submarine";
6
7 #[cfg(all(unix, not(target_os = "macos")))]
8 static SOUND: &str = "message-new-instant";
9
10 #[cfg(target_os = "windows")]
11 static SOUND: &str = "Mail";
12
13 fn main() {
14 Notification::new()
15 .summary("notification with sound")
16 .sound_name(SOUND)
17 .show()
18 .unwrap();
19 }