Add a configuration variable to display a notification at the be… (#345)

This commit is contained in:
Roey Darwish Dror
2020-02-27 13:30:55 +02:00
committed by GitHub
parent 738d70c91d
commit 2392124f71
3 changed files with 35 additions and 0 deletions

View File

@@ -70,6 +70,7 @@ pub struct ConfigFile {
no_retry: Option<bool>,
run_in_tmux: Option<bool>,
cleanup: Option<bool>,
notify_each_step: Option<bool>,
accept_all_windows_updates: Option<bool>,
only: Option<Vec<Step>>,
}
@@ -355,6 +356,12 @@ impl Config {
self.config_file.accept_all_windows_updates.unwrap_or(true)
}
/// Whether to send a desktop notification at the beginning of every step
#[allow(dead_code)]
pub fn notify_each_step(&self) -> bool {
self.config_file.notify_each_step.unwrap_or(false)
}
/// Extra yay arguments
#[cfg(target_os = "linux")]
pub fn yay_arguments(&self) -> &str {