File: sound.rs

package info (click to toggle)
rust-notify-rust 4.11.6-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 604 kB
  • sloc: sh: 18; makefile: 4
file content (19 lines) | stat: -rw-r--r-- 415 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![allow(unused_must_use)]
use notify_rust::Notification;

#[cfg(target_os = "macos")]
static SOUND: &str = "Submarine";

#[cfg(all(unix, not(target_os = "macos")))]
static SOUND: &str = "message-new-instant";

#[cfg(target_os = "windows")]
static SOUND: &str = "Mail";

fn main() {
    Notification::new()
        .summary("notification with sound")
        .sound_name(SOUND)
        .show()
        .unwrap();
}