Merge code for desktop notification between MacOS and Linux (#438)

This commit is contained in:
Kevin Gavrois
2023-05-26 10:07:14 +02:00
committed by GitHub
parent d75782892e
commit 7db991db9d
6 changed files with 194 additions and 160 deletions

View File

@@ -397,8 +397,6 @@ pub struct Misc {
display_time: Option<bool>,
display_preamble: Option<bool>,
assume_yes: Option<bool>,
#[merge(strategy = crate::utils::merge_strategies::string_append_opt)]
@@ -787,7 +785,7 @@ pub struct CommandLineArgs {
/// Tracing filter directives.
///
/// See: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/struct.EnvFilter.html
#[clap(long, default_value = "info")]
#[clap(long, default_value = "warn")]
pub log_filter: String,
/// Print completion script for the given shell and exit
@@ -1489,14 +1487,6 @@ impl Config {
.unwrap_or(true)
}
pub fn display_preamble(&self) -> bool {
self.config_file
.misc
.as_ref()
.and_then(|misc| misc.display_preamble)
.unwrap_or(true)
}
pub fn should_run_custom_command(&self, name: &str) -> bool {
if self.opt.custom_commands.is_empty() {
return true;