mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-04-19 11:24:24 +02:00
Merge pull request #644 from JakeStanger/fix/minor-changes
Fix/minor changes
This commit is contained in:
commit
a9d728f191
4 changed files with 11 additions and 7 deletions
|
@ -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 }
|
||||
|
|
|
@ -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<GetSubscribeData> 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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Add table
Reference in a new issue