From e10b3cf6dba424dc96383b35f02c1a7c04a51b67 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Tue, 16 Feb 2021 23:12:19 -0800 Subject: [PATCH] disable notifications on freebsd There's a compilation issue for zbus on freebsd: https://gitlab.freedesktop.org/dbus/zbus/-/issues/141 --- wezterm-toast-notification/Cargo.toml | 2 +- wezterm-toast-notification/src/dbus.rs | 2 +- wezterm-toast-notification/src/lib.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wezterm-toast-notification/Cargo.toml b/wezterm-toast-notification/Cargo.toml index 06677d827..e541314b5 100644 --- a/wezterm-toast-notification/Cargo.toml +++ b/wezterm-toast-notification/Cargo.toml @@ -10,7 +10,7 @@ build = "build.rs" [dependencies] open = "1.4" -[target.'cfg(all(not(windows), not(target_os="macos")))'.dependencies] +[target.'cfg(all(not(windows), not(target_os="macos"), not(target_os="freebsd")))'.dependencies] log = "0.4" serde = {version="1.0", features = ["derive"]} zbus = "1.8" diff --git a/wezterm-toast-notification/src/dbus.rs b/wezterm-toast-notification/src/dbus.rs index 9f311c2f9..ebc29cc98 100644 --- a/wezterm-toast-notification/src/dbus.rs +++ b/wezterm-toast-notification/src/dbus.rs @@ -1,4 +1,4 @@ -#![cfg(all(not(target_os = "macos"), not(windows)))] +#![cfg(all(not(target_os = "macos"), not(windows), not(target_os="freebsd")))] //! See use serde::{Deserialize, Serialize}; diff --git a/wezterm-toast-notification/src/lib.rs b/wezterm-toast-notification/src/lib.rs index 811439534..810aec0c6 100644 --- a/wezterm-toast-notification/src/lib.rs +++ b/wezterm-toast-notification/src/lib.rs @@ -8,7 +8,7 @@ pub fn persistent_toast_notification_with_click_to_open_url(title: &str, message macos::show_notif(title, message, Some(url)); } - #[cfg(all(not(target_os = "macos"), not(windows)))] + #[cfg(all(not(target_os = "macos"), not(windows), not(target_os="freebsd")))] { if let Err(err) = dbus::show_notif(title, message, Some(url)) { log::error!("Failed to show notification: {}", err); @@ -24,7 +24,7 @@ pub fn persistent_toast_notification(title: &str, message: &str) { macos::show_notif(title, message, None); } - #[cfg(all(not(target_os = "macos"), not(windows)))] + #[cfg(all(not(target_os = "macos"), not(windows), not(target_os="freebsd")))] { if let Err(err) = dbus::show_notif(title, message, None) { log::error!("Failed to show notification: {}", err);