diff --git a/Cargo.toml b/Cargo.toml index dac027b..e93750c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -108,7 +108,7 @@ wayland-protocols-wlr = { version = "0.2.0", features = ["client"] } smithay-client-toolkit = { version = "0.18.1", default-features = false, features = [ "calloop", ] } -universal-config = { version = "0.5.0", default_features = false } +universal-config = { version = "0.5.0", default-features = false } ctrlc = "3.4.2" cfg-if = "1.0.0" @@ -119,7 +119,7 @@ clap = { version = "4.5.7", optional = true, features = ["derive"] } serde_json = { version = "1.0.117", optional = true } # http -reqwest = { version = "0.12.4", default_features = false, features = ["default-tls", "http2"], optional = true } +reqwest = { version = "0.12.4", default-features = false, features = ["default-tls", "http2"], optional = true } # cairo lua-src = { version = "546.0.2", optional = true } @@ -130,7 +130,7 @@ cairo-rs = { version = "0.18.5", optional = true, features = ["png"] } nix = { version = "0.29.0", optional = true, features = ["event", "fs"] } # clock -chrono = { version = "0.4.38", optional = true, default_features = false, features = ["clock", "unstable-locales"] } +chrono = { version = "0.4.38", optional = true, default-features = false, features = ["clock", "unstable-locales"] } # music mpd-utils = { version = "0.2.1", optional = true } diff --git a/src/clients/swaync/mod.rs b/src/clients/swaync/mod.rs index 173cf73..495040b 100644 --- a/src/clients/swaync/mod.rs +++ b/src/clients/swaync/mod.rs @@ -14,7 +14,7 @@ pub struct Event { pub count: u32, pub dnd: bool, pub cc_open: bool, - pub inhibited: bool, + // pub inhibited: bool, } type GetSubscribeData = (bool, bool, u32, bool); @@ -22,12 +22,12 @@ type GetSubscribeData = (bool, bool, u32, bool); /// Converts the data returned from /// `get_subscribe_data` into an event for convenience. impl From for Event { - fn from((dnd, cc_open, count, inhibited): (bool, bool, u32, bool)) -> Self { + fn from((dnd, cc_open, count, _inhibited): (bool, bool, u32, bool)) -> Self { Self { count, dnd, cc_open, - inhibited, + // inhibited, } } } diff --git a/src/clients/wayland/mod.rs b/src/clients/wayland/mod.rs index 8c7fcb8..ca7c367 100644 --- a/src/clients/wayland/mod.rs +++ b/src/clients/wayland/mod.rs @@ -2,8 +2,9 @@ mod macros; mod wl_output; mod wl_seat; -use crate::error::ERR_CHANNEL_RECV; +use crate::error::{ExitCode, ERR_CHANNEL_RECV}; use crate::{arc_mut, lock, register_client, send, spawn, spawn_blocking}; +use std::process::exit; use std::sync::{Arc, Mutex}; use calloop_channel::Event::Msg; @@ -305,6 +306,8 @@ impl Environment { "{:?}", Report::new(err).wrap_err("Failed to dispatch pending wayland events") ); + + exit(ExitCode::WaylandDispatchError as i32) } } } diff --git a/src/error.rs b/src/error.rs index 66f30cd..a55fa12 100644 --- a/src/error.rs +++ b/src/error.rs @@ -3,6 +3,7 @@ pub enum ExitCode { GtkDisplay = 1, CreateBars = 2, IpcResponseError = 3, + WaylandDispatchError = 4, } pub const ERR_MUTEX_LOCK: &str = "Failed to get lock on Mutex";