diff --git a/komorebi/src/static_config.rs b/komorebi/src/static_config.rs index e3a0d70d..78c9808c 100644 --- a/komorebi/src/static_config.rs +++ b/komorebi/src/static_config.rs @@ -109,13 +109,13 @@ pub struct WorkspaceConfig { /// Layout (default: BSP) #[serde(skip_serializing_if = "Option::is_none")] pub layout: Option, - /// Custom Layout (default: None) + /// END OF LIFE FEATURE: Custom Layout (default: None) #[serde(skip_serializing_if = "Option::is_none")] pub custom_layout: Option, /// Layout rules (default: None) #[serde(skip_serializing_if = "Option::is_none")] pub layout_rules: Option>, - /// Layout rules (default: None) + /// END OF LIFE FEATURE: Custom layout rules (default: None) #[serde(skip_serializing_if = "Option::is_none")] pub custom_layout_rules: Option>, /// Container padding (default: global) @@ -260,7 +260,7 @@ pub struct StaticConfig { /// Determine what happens when commands are sent while an unmanaged window is in the foreground (default: Op) #[serde(skip_serializing_if = "Option::is_none")] pub unmanaged_window_operation_behaviour: Option, - /// Determine focus follows mouse implementation (default: None) + /// END OF LIFE FEATURE: Determine focus follows mouse implementation (default: None) #[serde(skip_serializing_if = "Option::is_none")] pub focus_follows_mouse: Option, /// Enable or disable mouse follows focus (default: true) @@ -431,6 +431,30 @@ pub enum KomorebiTheme { } impl StaticConfig { + pub fn end_of_life(raw: &str) { + let features = vec![ + "focus_follows_mouse", + "custom_layout", + "custom_layout_rules", + ]; + + let mut display = false; + + for feature in features { + if raw.contains(feature) { + if !display { + display = true; + println!("\n\"{feature}\" is now end-of-life"); + } else { + println!(r#""{feature}" is now end-of-life"#); + } + } + } + + if display { + println!("\nEnd-of-life features will not receive any further bug fixes or updates; they should not be used\n") + } + } pub fn aliases(raw: &str) { let mut map = HashMap::new(); map.insert("border", ["active_window_border"]); diff --git a/komorebic/src/main.rs b/komorebic/src/main.rs index f805de6d..f3016595 100644 --- a/komorebic/src/main.rs +++ b/komorebic/src/main.rs @@ -1546,6 +1546,12 @@ fn main() -> Result<()> { // errors let _ = serde_json::from_str::(&config_source)?; + let path = resolve_home_path(static_config)?; + let raw = std::fs::read_to_string(path)?; + StaticConfig::aliases(&raw); + StaticConfig::deprecated(&raw); + StaticConfig::end_of_life(&raw); + if config_whkd.exists() { println!("Found {}; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag\n", config_whkd.to_string_lossy()); } else { @@ -2098,6 +2104,7 @@ if (!(Get-Process komorebi-bar -ErrorAction SilentlyContinue)) let raw = std::fs::read_to_string(path)?; StaticConfig::aliases(&raw); StaticConfig::deprecated(&raw); + StaticConfig::end_of_life(&raw); } if bar_config.is_some() {