diff --git a/watchers/src/watchers/gnome_wayland.rs b/watchers/src/watchers/gnome_wayland.rs index 3f2e302..dc3376d 100644 --- a/watchers/src/watchers/gnome_wayland.rs +++ b/watchers/src/watchers/gnome_wayland.rs @@ -15,18 +15,20 @@ fn is_gnome() -> bool { fn is_wayland() -> bool { std::env::var("WAYLAND_DISPLAY").is_ok() - && !std::env::var("XDG_SESSION_TYPE") + && std::env::var("XDG_SESSION_TYPE") .unwrap_or("".into()) .to_lowercase() - .contains("x11") + .contains("wayland") } pub async fn load_watcher() -> anyhow::Result { if is_gnome() && is_wayland() { + debug!("Gnome Wayland detected"); let mut watcher = Err(anyhow::anyhow!("")); for _ in 0..3 { watcher = T::load().await; - if watcher.is_err() { + if let Err(e) = &watcher { + debug!("Failed to load Gnome Wayland watcher: {e}"); tokio::time::sleep(tokio::time::Duration::from_secs(3)).await; } }