Display the preamble in Linux only if notify-send is installed (#401)

This commit is contained in:
Roey Darwish Dror
2023-04-05 15:34:47 +03:00
committed by GitHub
parent 565aa405be
commit ddb1a021bb
2 changed files with 6 additions and 1 deletions

View File

@@ -345,3 +345,8 @@ pub fn notify_desktop<P: AsRef<str>>(message: P, timeout: Option<Duration>) {
pub fn display_time(display_time: bool) {
TERMINAL.lock().unwrap().display_time(display_time);
}
#[cfg(target_os = "linux")]
pub fn supports_notify_send() -> bool {
TERMINAL.lock().unwrap().notify_send.is_some()
}