From a56f2b42d498cb33c0bc735e3303202612c3d905 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Tue, 23 Dec 2025 20:01:47 -0800 Subject: [PATCH] docs(schema): remove custom layout and stackbar refs This commit removes references to custom layouts and the stackbar as these are end-of-life komorebi for Windows features which are not being ported. --- docs/komorebi.bar.example.json | 6 +- docs/komorebi.example.json | 4 +- komorebi/src/static_config.rs | 88 +++++----- komorebi/src/theme_manager.rs | 96 +++++----- komorebi/src/workspace.rs | 29 ++- schema.json | 312 ++++++++++++++++++--------------- 6 files changed, 280 insertions(+), 255 deletions(-) diff --git a/docs/komorebi.bar.example.json b/docs/komorebi.bar.example.json index d1254319..08625aad 100644 --- a/docs/komorebi.bar.example.json +++ b/docs/komorebi.bar.example.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.38/schema.bar.json", + "$schema": "https://komorebi-for-mac.lgug2z.com/komorebi.bar.0.1.0.schema.json", "monitor": 0, "font_family": "JetBrainsMono Nerd Font", "height": 30, @@ -45,7 +45,7 @@ "Network": { "enable": true, "show_activity": true, - "show_total_activity": true, + "show_total_activity": true } }, { @@ -59,6 +59,6 @@ "enable": true, "format": "TwentyFourHour" } - }, + } ] } diff --git a/docs/komorebi.example.json b/docs/komorebi.example.json index b4338193..2df4783c 100644 --- a/docs/komorebi.example.json +++ b/docs/komorebi.example.json @@ -1,5 +1,5 @@ { - "$schema": "https://gist.githubusercontent.com/LGUG2Z/78b3dd12a7b7069f1d1c60621fe50730/raw", + "$schema": "https://komorebi-for-mac.lgug2z.com/komorebi.0.1.0.schema.json", "app_specific_configuration_path": "$HOME/.config/komorebi/applications.json", "cross_monitor_move_behaviour": "Insert", "default_workspace_padding": 15, @@ -58,4 +58,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/komorebi/src/static_config.rs b/komorebi/src/static_config.rs index 25a3faf7..9ed40607 100644 --- a/komorebi/src/static_config.rs +++ b/komorebi/src/static_config.rs @@ -118,15 +118,15 @@ pub struct ThemeOptions { /// Border colour when the container is unfocused and locked (default: Base08) #[serde(skip_serializing_if = "Option::is_none")] pub unfocused_locked_border: Option, - /// Stackbar focused tab text colour (default: Base0B) - #[serde(skip_serializing_if = "Option::is_none")] - pub stackbar_focused_text: Option, - /// Stackbar unfocused tab text colour (default: Base05) - #[serde(skip_serializing_if = "Option::is_none")] - pub stackbar_unfocused_text: Option, - /// Stackbar tab background colour (default: Base01) - #[serde(skip_serializing_if = "Option::is_none")] - pub stackbar_background: Option, + // /// Stackbar focused tab text colour (default: Base0B) + // #[serde(skip_serializing_if = "Option::is_none")] + // pub stackbar_focused_text: Option, + // /// Stackbar unfocused tab text colour (default: Base05) + // #[serde(skip_serializing_if = "Option::is_none")] + // pub stackbar_unfocused_text: Option, + // /// Stackbar tab background colour (default: Base01) + // #[serde(skip_serializing_if = "Option::is_none")] + // pub stackbar_background: Option, /// Komorebi status bar accent (default: Base0D) #[serde(skip_serializing_if = "Option::is_none")] pub bar_accent: Option, @@ -160,10 +160,10 @@ pub struct WorkspaceConfig { /// Layout-specific options (default: None) #[serde(skip_serializing_if = "Option::is_none")] pub layout_options: Option, - /// END OF LIFE FEATURE: Custom Layout (default: None) - #[serde(skip_serializing_if = "Option::is_none")] - #[serde_as(as = "Option")] - pub custom_layout: Option, + // /// END OF LIFE FEATURE: Custom Layout (default: None) + // #[serde(skip_serializing_if = "Option::is_none")] + // #[serde_as(as = "Option")] + // pub custom_layout: Option, /// Layout rules in the format of threshold => layout (default: None) #[serde(skip_serializing_if = "Option::is_none")] pub layout_rules: Option>, @@ -258,10 +258,10 @@ impl From<&Workspace> for WorkspaceConfig { }) .flatten(), layout_options: value.layout_options, - custom_layout: value - .workspace_config - .as_ref() - .and_then(|c| c.custom_layout.clone()), + // custom_layout: value + // .workspace_config + // .as_ref() + // .and_then(|c| c.custom_layout.clone()), layout_rules, container_padding, workspace_padding, @@ -583,15 +583,15 @@ pub enum KomorebiTheme { /// Border colour when the container is unfocused and locked (default: Red) #[serde(skip_serializing_if = "Option::is_none")] unfocused_locked_border: Option, - /// Stackbar focused tab text colour (default: Green) - #[serde(skip_serializing_if = "Option::is_none")] - stackbar_focused_text: Option, - /// Stackbar unfocused tab text colour (default: Text) - #[serde(skip_serializing_if = "Option::is_none")] - stackbar_unfocused_text: Option, - /// Stackbar tab background colour (default: Base) - #[serde(skip_serializing_if = "Option::is_none")] - stackbar_background: Option, + // /// Stackbar focused tab text colour (default: Green) + // #[serde(skip_serializing_if = "Option::is_none")] + // stackbar_focused_text: Option, + // /// Stackbar unfocused tab text colour (default: Text) + // #[serde(skip_serializing_if = "Option::is_none")] + // stackbar_unfocused_text: Option, + // /// Stackbar tab background colour (default: Base) + // #[serde(skip_serializing_if = "Option::is_none")] + // stackbar_background: Option, /// Komorebi status bar accent (default: Blue) #[serde(skip_serializing_if = "Option::is_none")] bar_accent: Option, @@ -618,15 +618,15 @@ pub enum KomorebiTheme { /// Border colour when the container is unfocused and locked (default: Base08) #[serde(skip_serializing_if = "Option::is_none")] unfocused_locked_border: Option, - /// Stackbar focused tab text colour (default: Base0B) - #[serde(skip_serializing_if = "Option::is_none")] - stackbar_focused_text: Option, - /// Stackbar unfocused tab text colour (default: Base05) - #[serde(skip_serializing_if = "Option::is_none")] - stackbar_unfocused_text: Option, - /// Stackbar tab background colour (default: Base01) - #[serde(skip_serializing_if = "Option::is_none")] - stackbar_background: Option, + // /// Stackbar focused tab text colour (default: Base0B) + // #[serde(skip_serializing_if = "Option::is_none")] + // stackbar_focused_text: Option, + // /// Stackbar unfocused tab text colour (default: Base05) + // #[serde(skip_serializing_if = "Option::is_none")] + // stackbar_unfocused_text: Option, + // /// Stackbar tab background colour (default: Base01) + // #[serde(skip_serializing_if = "Option::is_none")] + // stackbar_background: Option, /// Komorebi status bar accent (default: Base0D) #[serde(skip_serializing_if = "Option::is_none")] bar_accent: Option, @@ -653,15 +653,15 @@ pub enum KomorebiTheme { /// Border colour when the container is unfocused and locked (default: Base08) #[serde(skip_serializing_if = "Option::is_none")] unfocused_locked_border: Option, - /// Stackbar focused tab text colour (default: Base0B) - #[serde(skip_serializing_if = "Option::is_none")] - stackbar_focused_text: Option, - /// Stackbar unfocused tab text colour (default: Base05) - #[serde(skip_serializing_if = "Option::is_none")] - stackbar_unfocused_text: Option, - /// Stackbar tab background colour (default: Base01) - #[serde(skip_serializing_if = "Option::is_none")] - stackbar_background: Option, + // /// Stackbar focused tab text colour (default: Base0B) + // #[serde(skip_serializing_if = "Option::is_none")] + // stackbar_focused_text: Option, + // /// Stackbar unfocused tab text colour (default: Base05) + // #[serde(skip_serializing_if = "Option::is_none")] + // stackbar_unfocused_text: Option, + // /// Stackbar tab background colour (default: Base01) + // #[serde(skip_serializing_if = "Option::is_none")] + // stackbar_background: Option, /// Komorebi status bar accent (default: Base0D) #[serde(skip_serializing_if = "Option::is_none")] bar_accent: Option, diff --git a/komorebi/src/theme_manager.rs b/komorebi/src/theme_manager.rs index 7e2626ad..fdca3473 100644 --- a/komorebi/src/theme_manager.rs +++ b/komorebi/src/theme_manager.rs @@ -76,9 +76,9 @@ pub fn handle_notifications() -> color_eyre::Result<()> { floating_border, unfocused_border, unfocused_locked_border, - _stackbar_focused_text, - _stackbar_unfocused_text, - _stackbar_background, + // _stackbar_focused_text, + // _stackbar_unfocused_text, + // _stackbar_background, ) = match theme { KomorebiTheme::Catppuccin { name, @@ -88,9 +88,9 @@ pub fn handle_notifications() -> color_eyre::Result<()> { floating_border, unfocused_border, unfocused_locked_border, - stackbar_focused_text, - stackbar_unfocused_text, - stackbar_background, + // stackbar_focused_text, + // stackbar_unfocused_text, + // stackbar_background, .. } => { let single_border = single_border @@ -117,17 +117,17 @@ pub fn handle_notifications() -> color_eyre::Result<()> { .unwrap_or(komorebi_themes::CatppuccinValue::Red) .color32(name.as_theme()); - let stackbar_focused_text = stackbar_focused_text - .unwrap_or(komorebi_themes::CatppuccinValue::Green) - .color32(name.as_theme()); + // let stackbar_focused_text = stackbar_focused_text + // .unwrap_or(komorebi_themes::CatppuccinValue::Green) + // .color32(name.as_theme()); - let stackbar_unfocused_text = stackbar_unfocused_text - .unwrap_or(komorebi_themes::CatppuccinValue::Text) - .color32(name.as_theme()); + // let stackbar_unfocused_text = stackbar_unfocused_text + // .unwrap_or(komorebi_themes::CatppuccinValue::Text) + // .color32(name.as_theme()); - let stackbar_background = stackbar_background - .unwrap_or(komorebi_themes::CatppuccinValue::Base) - .color32(name.as_theme()); + // let stackbar_background = stackbar_background + // .unwrap_or(komorebi_themes::CatppuccinValue::Base) + // .color32(name.as_theme()); ( single_border, @@ -136,9 +136,9 @@ pub fn handle_notifications() -> color_eyre::Result<()> { floating_border, unfocused_border, unfocused_locked_border, - stackbar_focused_text, - stackbar_unfocused_text, - stackbar_background, + // stackbar_focused_text, + // stackbar_unfocused_text, + // stackbar_background, ) } KomorebiTheme::Base16 { @@ -149,9 +149,9 @@ pub fn handle_notifications() -> color_eyre::Result<()> { floating_border, unfocused_border, unfocused_locked_border, - stackbar_focused_text, - stackbar_unfocused_text, - stackbar_background, + // stackbar_focused_text, + // stackbar_unfocused_text, + // stackbar_background, .. } => { let single_border = single_border @@ -178,17 +178,17 @@ pub fn handle_notifications() -> color_eyre::Result<()> { .unwrap_or(komorebi_themes::Base16Value::Base09) .color32(Base16Wrapper::Base16(*name)); - let stackbar_focused_text = stackbar_focused_text - .unwrap_or(komorebi_themes::Base16Value::Base0B) - .color32(Base16Wrapper::Base16(*name)); + // let stackbar_focused_text = stackbar_focused_text + // .unwrap_or(komorebi_themes::Base16Value::Base0B) + // .color32(Base16Wrapper::Base16(*name)); - let stackbar_unfocused_text = stackbar_unfocused_text - .unwrap_or(komorebi_themes::Base16Value::Base05) - .color32(Base16Wrapper::Base16(*name)); + // let stackbar_unfocused_text = stackbar_unfocused_text + // .unwrap_or(komorebi_themes::Base16Value::Base05) + // .color32(Base16Wrapper::Base16(*name)); - let stackbar_background = stackbar_background - .unwrap_or(komorebi_themes::Base16Value::Base01) - .color32(Base16Wrapper::Base16(*name)); + // let stackbar_background = stackbar_background + // .unwrap_or(komorebi_themes::Base16Value::Base01) + // .color32(Base16Wrapper::Base16(*name)); ( single_border, @@ -197,9 +197,9 @@ pub fn handle_notifications() -> color_eyre::Result<()> { floating_border, unfocused_border, unfocused_locked_border, - stackbar_focused_text, - stackbar_unfocused_text, - stackbar_background, + // stackbar_focused_text, + // stackbar_unfocused_text, + // stackbar_background, ) } KomorebiTheme::Custom { @@ -210,9 +210,9 @@ pub fn handle_notifications() -> color_eyre::Result<()> { floating_border, unfocused_border, unfocused_locked_border, - stackbar_focused_text, - stackbar_unfocused_text, - stackbar_background, + // stackbar_focused_text, + // stackbar_unfocused_text, + // stackbar_background, .. } => { let single_border = single_border @@ -239,17 +239,17 @@ pub fn handle_notifications() -> color_eyre::Result<()> { .unwrap_or(komorebi_themes::Base16Value::Base09) .color32(Base16Wrapper::Custom(colours.clone())); - let stackbar_focused_text = stackbar_focused_text - .unwrap_or(komorebi_themes::Base16Value::Base0B) - .color32(Base16Wrapper::Custom(colours.clone())); + // let stackbar_focused_text = stackbar_focused_text + // .unwrap_or(komorebi_themes::Base16Value::Base0B) + // .color32(Base16Wrapper::Custom(colours.clone())); - let stackbar_unfocused_text = stackbar_unfocused_text - .unwrap_or(komorebi_themes::Base16Value::Base05) - .color32(Base16Wrapper::Custom(colours.clone())); + // let stackbar_unfocused_text = stackbar_unfocused_text + // .unwrap_or(komorebi_themes::Base16Value::Base05) + // .color32(Base16Wrapper::Custom(colours.clone())); - let stackbar_background = stackbar_background - .unwrap_or(komorebi_themes::Base16Value::Base01) - .color32(Base16Wrapper::Custom(colours.clone())); + // let stackbar_background = stackbar_background + // .unwrap_or(komorebi_themes::Base16Value::Base01) + // .color32(Base16Wrapper::Custom(colours.clone())); ( single_border, @@ -258,9 +258,9 @@ pub fn handle_notifications() -> color_eyre::Result<()> { floating_border, unfocused_border, unfocused_locked_border, - stackbar_focused_text, - stackbar_unfocused_text, - stackbar_background, + // stackbar_focused_text, + // stackbar_unfocused_text, + // stackbar_background, ) } }; diff --git a/komorebi/src/workspace.rs b/komorebi/src/workspace.rs index ab8ced09..da1e7acd 100644 --- a/komorebi/src/workspace.rs +++ b/komorebi/src/workspace.rs @@ -164,9 +164,8 @@ impl Workspace { self.layout = Layout::Default(*layout); } - self.tile = - !(config.custom_layout.is_none() && config.layout.is_none() && config.tile.is_none() - || config.tile.is_some_and(|tile| !tile)); + self.tile = !(/* config.custom_layout.is_none() && */config.layout.is_none() && config.tile.is_none() + || config.tile.is_some_and(|tile| !tile)); let mut all_layout_rules = vec![]; if let Some(layout_rules) = &config.layout_rules { @@ -1375,18 +1374,18 @@ impl Workspace { .theme_options .as_ref() .and_then(|o| o.unfocused_locked_border), - stackbar_focused_text: wallpaper - .theme_options - .as_ref() - .and_then(|o| o.stackbar_focused_text), - stackbar_unfocused_text: wallpaper - .theme_options - .as_ref() - .and_then(|o| o.stackbar_unfocused_text), - stackbar_background: wallpaper - .theme_options - .as_ref() - .and_then(|o| o.stackbar_background), + // stackbar_focused_text: wallpaper + // .theme_options + // .as_ref() + // .and_then(|o| o.stackbar_focused_text), + // stackbar_unfocused_text: wallpaper + // .theme_options + // .as_ref() + // .and_then(|o| o.stackbar_unfocused_text), + // stackbar_background: wallpaper + // .theme_options + // .as_ref() + // .and_then(|o| o.stackbar_background), bar_accent: wallpaper.theme_options.as_ref().and_then(|o| o.bar_accent), }; diff --git a/schema.json b/schema.json index ffec640c..03c8b77c 100644 --- a/schema.json +++ b/schema.json @@ -4,6 +4,17 @@ "description": "The `komorebi.json` static configuration file reference for komorebi for Mac `v0.1.0`\n\n`\"$schema\": \"https://komorebi-for-mac.lgug2z.com/komorebi.0.1.0.schema.json\"`", "type": "object", "properties": { + "animation": { + "description": "Animations configuration options", + "anyOf": [ + { + "$ref": "#/$defs/AnimationsConfig" + }, + { + "type": "null" + } + ] + }, "app_specific_configuration_path": { "description": "Path to applications.json from komorebi-application-specific-configurations (default: None)", "anyOf": [ @@ -332,6 +343,121 @@ } }, "$defs": { + "AnimationStyle": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Linear", + "EaseInSine", + "EaseOutSine", + "EaseInOutSine", + "EaseInQuad", + "EaseOutQuad", + "EaseInOutQuad", + "EaseInCubic", + "EaseOutCubic", + "EaseInOutCubic", + "EaseInQuart", + "EaseOutQuart", + "EaseInOutQuart", + "EaseInQuint", + "EaseOutQuint", + "EaseInOutQuint", + "EaseInExpo", + "EaseOutExpo", + "EaseInOutExpo", + "EaseInCirc", + "EaseOutCirc", + "EaseInOutCirc", + "EaseInBack", + "EaseOutBack", + "EaseInOutBack", + "EaseInElastic", + "EaseOutElastic", + "EaseInOutElastic", + "EaseInBounce", + "EaseOutBounce", + "EaseInOutBounce" + ] + }, + { + "type": "object", + "properties": { + "CubicBezier": { + "type": "array", + "maxItems": 4, + "minItems": 4, + "prefixItems": [ + { + "type": "number", + "format": "double" + }, + { + "type": "number", + "format": "double" + }, + { + "type": "number", + "format": "double" + }, + { + "type": "number", + "format": "double" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "CubicBezier" + ] + } + ] + }, + "AnimationsConfig": { + "type": "object", + "properties": { + "duration": { + "description": "Set the animation duration in ms (default: 250)", + "anyOf": [ + { + "$ref": "#/$defs/PerAnimationPrefixConfig2" + }, + { + "type": "null" + } + ] + }, + "enabled": { + "description": "Enable or disable animations (default: false)", + "$ref": "#/$defs/PerAnimationPrefixConfig" + }, + "fps": { + "description": "Set the animation FPS (default: 60)", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0 + }, + "style": { + "description": "Set the animation style (default: Linear)", + "anyOf": [ + { + "$ref": "#/$defs/PerAnimationPrefixConfig3" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "enabled" + ] + }, "AppSpecificConfigurationPath": { "anyOf": [ { @@ -1031,39 +1157,6 @@ } ] }, - "stackbar_background": { - "description": "Stackbar tab background colour (default: Base)", - "anyOf": [ - { - "$ref": "#/$defs/CatppuccinValue" - }, - { - "type": "null" - } - ] - }, - "stackbar_focused_text": { - "description": "Stackbar focused tab text colour (default: Green)", - "anyOf": [ - { - "$ref": "#/$defs/CatppuccinValue" - }, - { - "type": "null" - } - ] - }, - "stackbar_unfocused_text": { - "description": "Stackbar unfocused tab text colour (default: Text)", - "anyOf": [ - { - "$ref": "#/$defs/CatppuccinValue" - }, - { - "type": "null" - } - ] - }, "unfocused_border": { "description": "Border colour when the container is unfocused (default: Base)", "anyOf": [ @@ -1159,39 +1252,6 @@ } ] }, - "stackbar_background": { - "description": "Stackbar tab background colour (default: Base01)", - "anyOf": [ - { - "$ref": "#/$defs/Base16Value" - }, - { - "type": "null" - } - ] - }, - "stackbar_focused_text": { - "description": "Stackbar focused tab text colour (default: Base0B)", - "anyOf": [ - { - "$ref": "#/$defs/Base16Value" - }, - { - "type": "null" - } - ] - }, - "stackbar_unfocused_text": { - "description": "Stackbar unfocused tab text colour (default: Base05)", - "anyOf": [ - { - "$ref": "#/$defs/Base16Value" - }, - { - "type": "null" - } - ] - }, "unfocused_border": { "description": "Border colour when the container is unfocused (default: Base01)", "anyOf": [ @@ -1287,39 +1347,6 @@ } ] }, - "stackbar_background": { - "description": "Stackbar tab background colour (default: Base01)", - "anyOf": [ - { - "$ref": "#/$defs/Base16Value" - }, - { - "type": "null" - } - ] - }, - "stackbar_focused_text": { - "description": "Stackbar focused tab text colour (default: Base0B)", - "anyOf": [ - { - "$ref": "#/$defs/Base16Value" - }, - { - "type": "null" - } - ] - }, - "stackbar_unfocused_text": { - "description": "Stackbar unfocused tab text colour (default: Base05)", - "anyOf": [ - { - "$ref": "#/$defs/Base16Value" - }, - { - "type": "null" - } - ] - }, "unfocused_border": { "description": "Border colour when the container is unfocused (default: Base01)", "anyOf": [ @@ -1535,6 +1562,49 @@ "PathBuf": { "type": "string" }, + "PerAnimationPrefixConfig": { + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + }, + { + "type": "boolean" + } + ] + }, + "PerAnimationPrefixConfig2": { + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + ] + }, + "PerAnimationPrefixConfig3": { + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/AnimationStyle" + } + }, + { + "$ref": "#/$defs/AnimationStyle" + } + ] + }, "Placement": { "oneOf": [ { @@ -1707,39 +1777,6 @@ } ] }, - "stackbar_background": { - "description": "Stackbar tab background colour (default: Base01)", - "anyOf": [ - { - "$ref": "#/$defs/Base16Value" - }, - { - "type": "null" - } - ] - }, - "stackbar_focused_text": { - "description": "Stackbar focused tab text colour (default: Base0B)", - "anyOf": [ - { - "$ref": "#/$defs/Base16Value" - }, - { - "type": "null" - } - ] - }, - "stackbar_unfocused_text": { - "description": "Stackbar unfocused tab text colour (default: Base05)", - "anyOf": [ - { - "$ref": "#/$defs/Base16Value" - }, - { - "type": "null" - } - ] - }, "theme_variant": { "description": "Specify Light or Dark variant for theme generation (default: Dark)", "anyOf": [ @@ -1858,17 +1895,6 @@ ], "format": "int32" }, - "custom_layout": { - "description": "END OF LIFE FEATURE: Custom Layout (default: None)", - "anyOf": [ - { - "$ref": "#/$defs/PathBuf" - }, - { - "type": "null" - } - ] - }, "float_override": { "description": "Enable or disable float override, which makes it so every new window opens in floating mode (default: false)", "type": [