From f7122cf43ce537ecf3ccd1f9d43281aeaebef874 Mon Sep 17 00:00:00 2001 From: Enrico Stemmer Date: Sun, 8 Sep 2024 01:49:14 +0200 Subject: [PATCH 1/3] feat: added remaining bind flags --- src/config.rs | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) 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(()) } } From 8e5f7843a3b8648c229d75a8d1ee87f6d4d51078 Mon Sep 17 00:00:00 2001 From: leiserfg Date: Sun, 15 Sep 2024 13:53:58 +0200 Subject: [PATCH 2/3] Include disabled monitors --- src/data/regular.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/data/regular.rs b/src/data/regular.rs index c875549..1caebf1 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 { From 369a00c0456f6bf978ca0564efcf6811b457961b Mon Sep 17 00:00:00 2001 From: Enrico Stemmer Date: Wed, 23 Oct 2024 15:09:18 +0200 Subject: [PATCH 3/3] fix: update Version Struct to contain all fields --- src/data/regular.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/data/regular.rs b/src/data/regular.rs index 1caebf1..46e35bf 100644 --- a/src/data/regular.rs +++ b/src/data/regular.rs @@ -432,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, }