Skip to content

Commit

Permalink
feat: allows for passing of sound name.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-Neto committed Oct 10, 2023
1 parent c0ffee5 commit b1a240e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ enum Commands {
/// Set a specific app-name manually.
#[clap(short, long)]
app_name: Option<String>,
/// Set a specific sound manually.
#[clap(short, long)]
sound_name: Option<String>,
#[cfg(all(unix, not(target_os = "macos")))]
#[clap(flatten)]
linux_args: LinuxArgs,
Expand Down Expand Up @@ -125,6 +128,7 @@ fn main() -> nResult<()> {
title,
body,
app_name,
sound_name,
#[cfg(all(unix, not(target_os = "macos")))]
linux_args,
} => {
Expand All @@ -140,6 +144,10 @@ fn main() -> nResult<()> {
notification.appname(&appname);
}

if let Some(sound_name) = sound_name {
notification.sound_name(&sound_name);
}

#[cfg(all(unix, not(target_os = "macos")))]
{
let LinuxArgs {
Expand Down

0 comments on commit b1a240e

Please sign in to comment.