diff --git a/komorebi-core/src/lib.rs b/komorebi-core/src/lib.rs index 086bebdb..407ac94e 100644 --- a/komorebi-core/src/lib.rs +++ b/komorebi-core/src/lib.rs @@ -356,7 +356,7 @@ pub enum HidingBehaviour { Hide, /// Use the SW_MINIMIZE flag to hide windows when switching workspaces (has issues with frequent workspace switching) Minimize, - /// Use the undocumented SetCloak Win32 function to hide windows when switching workspaces (has foregrounding issues) + /// Use the undocumented SetCloak Win32 function to hide windows when switching workspaces Cloak, } diff --git a/komorebi/src/static_config.rs b/komorebi/src/static_config.rs index 83f08232..a34a10d8 100644 --- a/komorebi/src/static_config.rs +++ b/komorebi/src/static_config.rs @@ -299,7 +299,7 @@ pub struct StaticConfig { /// Monitor and workspace configurations #[serde(skip_serializing_if = "Option::is_none")] pub monitors: Option>, - /// Which Windows signal to use when hiding windows (default: minimize) + /// Which Windows signal to use when hiding windows (default: Cloak) #[serde(skip_serializing_if = "Option::is_none")] pub window_hiding_behaviour: Option, /// Global work area (space used for tiling) offset (default: None) @@ -366,13 +366,25 @@ impl StaticConfig { } pub fn deprecated(raw: &str) { - let deprecated = ["invisible_borders"]; + let deprecated_options = ["invisible_borders"]; + let deprecated_variants = vec![ + ("Hide", "window_hiding_behaviour", "Cloak"), + ("Minimize", "window_hiding_behaviour", "Cloak"), + ]; - for option in deprecated { + for option in deprecated_options { if raw.contains(option) { println!(r#""{option}" is deprecated and can be removed"#); } } + + for (variant, option, recommended) in deprecated_variants { + if raw.contains(option) && raw.contains(variant) { + println!( + r#"The "{variant}" option for "{option}" is deprecated and can be removed or replaced with "{recommended}""# + ); + } + } } }