diff --git a/src/config.rs b/src/config.rs index 7f7b818..22375b4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,6 +1,6 @@ //! # Hyprland Configuration in Rust //! -use crate::dispatch::{gen_dispatch_str, DispatchType}; +use crate::dispatch::{DispatchType, gen_dispatch_str}; use crate::keyword::Keyword; /// Module providing stuff for adding an removing keybinds @@ -71,22 +71,40 @@ pub mod binds { /// Works when screen is locked #[display(fmt = "l")] l, - /// Used for mouse binds - #[display(fmt = "m")] - m, - /// Repeats when held - #[display(fmt = "e")] - e, /// Activates on release #[display(fmt = "r")] r, + /// Repeats when held + #[display(fmt = "e")] + e, + /// Non-consuming, key/mouse events will be passed to the active window in addition to triggering the dispatcher. + #[display(fmt = "n")] + n, + /// Used for mouse binds + #[display(fmt = "m")] + m, + /// Transparent, cannot be shadowed by other binds. + #[display(fmt = "t")] + t, + /// Ignore mods, will ignore modifiers. + #[display(fmt = "i")] + i, + /// Separate, will arbitrarily combine keys between each mod/key + #[display(fmt = "s")] + s, + /// Has description, will allow you to write a description for your bind. + #[display(fmt = "d")] + d, + /// Bypasses the app's requests to inhibit keybinds. + #[display(fmt = "p")] + p, } impl Join for Vec { fn join(&self) -> String { let mut buf = String::new(); - for i in self { - buf.push_str(&i.to_string()); + for f in self { + buf.push_str(&f.to_string()); } buf } @@ -131,7 +149,7 @@ pub mod binds { format!("bind{}", binding.flags.join()), Self::gen_str(binding)?, ) - .await?; + .await?; Ok(()) } } diff --git a/src/data/regular.rs b/src/data/regular.rs index c875549..46e35bf 100644 --- a/src/data/regular.rs +++ b/src/data/regular.rs @@ -29,7 +29,7 @@ fn call_hyprctl_data_cmd(cmd: DataCommands) -> crate::Result { /// This pub(crate) enum holds every socket command that returns data #[derive(Debug, Display, Clone, Copy, PartialEq, Eq)] pub(crate) enum DataCommands { - #[display(fmt = "monitors")] + #[display(fmt = "monitors all")] Monitors, #[display(fmt = "workspaces")] Workspaces, @@ -122,6 +122,8 @@ pub struct Monitor { pub dpms_status: bool, /// VRR state pub vrr: bool, + /// Is the monitor disabled or not + pub disabled: bool, } impl HyprDataActive for Monitor { @@ -430,6 +432,15 @@ pub struct Version { pub dirty: bool, /// The git commit message pub commit_message: String, + /// The git commit date + pub commit_date: String, + /// The git tag hyprland was built on + pub tag: String, + /// The amount of commits to Hyprland at buildtime + pub commits: String, + /// Aquamarine version + #[serde(rename = "buildAquamarine")] + pub build_aquamarine: String, /// The flags that Hyprland was built with pub flags: Vec, }