From 3d8778a7d62c4cc893a255f50990b538f130d4cb Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 27 Dec 2025 12:58:46 -0800 Subject: [PATCH] docs(schema): ensure all public-facing static config opts have docstrings --- komorebi-themes/src/colour.rs | 6 +- komorebi-themes/src/generator.rs | 3 + komorebi-themes/src/lib.rs | 76 ++- komorebi/src/animation/mod.rs | 25 + komorebi/src/animation/style.rs | 1 + komorebi/src/border_manager/mod.rs | 16 + komorebi/src/core/animation.rs | 34 + komorebi/src/core/arrangement.rs | 4 + komorebi/src/core/config_generation.rs | 23 + komorebi/src/core/default_layout.rs | 90 +++ komorebi/src/core/mod.rs | 46 +- komorebi/src/core/rect.rs | 9 +- komorebi/src/static_config.rs | 14 +- komorebi/src/window.rs | 6 +- schema.asc.json | 99 ++- schema.bar.json | 720 +++++++++++++++++---- schema.json | 830 ++++++++++++++++++++----- 17 files changed, 1680 insertions(+), 322 deletions(-) diff --git a/komorebi-themes/src/colour.rs b/komorebi-themes/src/colour.rs index c9afff58..72da87a9 100644 --- a/komorebi-themes/src/colour.rs +++ b/komorebi-themes/src/colour.rs @@ -11,6 +11,7 @@ use serde::Serialize; #[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[serde(untagged)] +/// Colour representation pub enum Colour { /// Colour represented as RGB Rgb(Rgb), @@ -52,6 +53,7 @@ impl From for Color32 { } } +/// Colour represented as a Hex string #[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq)] pub struct Hex(pub HexColor); @@ -64,7 +66,8 @@ impl schemars::JsonSchema for Hex { fn json_schema(_: &mut SchemaGenerator) -> Schema { schemars::json_schema!({ "type": "string", - "format": "color-hex" + "format": "color-hex", + "description": "Colour represented as a Hex string" }) } } @@ -80,6 +83,7 @@ impl From for u32 { #[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Colour represented as RGB pub struct Rgb { /// Red pub r: u32, diff --git a/komorebi-themes/src/generator.rs b/komorebi-themes/src/generator.rs index 233e6b18..ac9be7d8 100644 --- a/komorebi-themes/src/generator.rs +++ b/komorebi-themes/src/generator.rs @@ -12,9 +12,12 @@ use serde::Serialize; #[derive(Debug, Default, Copy, Clone, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Theme variant pub enum ThemeVariant { #[default] + /// Dark variant Dark, + /// Light variant Light, } diff --git a/komorebi-themes/src/lib.rs b/komorebi-themes/src/lib.rs index 080b7034..abf24dab 100644 --- a/komorebi-themes/src/lib.rs +++ b/komorebi-themes/src/lib.rs @@ -28,18 +28,19 @@ use serde_variant::to_variant_name; #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)] #[serde(tag = "type")] +/// Theme pub enum Theme { - /// A theme from catppuccin-egui + /// Theme from catppuccin-egui Catppuccin { name: Catppuccin, accent: Option, }, - /// A theme from base16-egui-themes + /// Theme from base16-egui-themes Base16 { name: Base16, accent: Option, }, - /// A custom base16 palette + /// Custom base16 palette Custom { palette: Box, accent: Option, @@ -47,22 +48,39 @@ pub enum Theme { } #[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)] +/// Base16 colour palette: https://github.com/chriskempson/base16 pub struct Base16ColourPalette { + /// Base00 pub base_00: Colour, + /// Base01 pub base_01: Colour, + /// Base02 pub base_02: Colour, + /// Base03 pub base_03: Colour, + /// Base04 pub base_04: Colour, + /// Base05 pub base_05: Colour, + /// Base06 pub base_06: Colour, + /// Base07 pub base_07: Colour, + /// Base08 pub base_08: Colour, + /// Base09 pub base_09: Colour, + /// Base0A pub base_0a: Colour, + /// Base0B pub base_0b: Colour, + /// Base0C pub base_0c: Colour, + /// Base0D pub base_0d: Colour, + /// Base0E pub base_0e: Colour, + /// Base0F pub base_0f: Colour, } @@ -199,28 +217,48 @@ impl Theme { } #[derive(Copy, Clone, Debug, Default, Serialize, Deserialize, JsonSchema, Display, PartialEq)] +/// Base16 value pub enum Base16Value { + /// Base00 Base00, + /// Base01 Base01, + /// Base02 Base02, + /// Base03 Base03, + /// Base04 Base04, + /// Base05 Base05, + /// Base06 #[default] Base06, + /// Base07 Base07, + /// Base08 Base08, + /// Base09 Base09, + /// Base0A Base0A, + /// Base0B Base0B, + /// Base0C Base0C, + /// Base0D Base0D, + /// Base0E Base0E, + /// Base0F Base0F, } +/// Wrapper around a Base16 colour palette pub enum Base16Wrapper { + /// Predefined Base16 colour palette Base16(Base16), + /// Custom Base16 colour palette Custom(Box), } @@ -268,10 +306,15 @@ impl Base16Value { } #[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, Display, PartialEq)] +/// Catppuccin palette pub enum Catppuccin { + /// Frappe Frappe, + /// Latte Latte, + /// Macchiato Macchiato, + /// Mocha Mocha, } @@ -293,33 +336,60 @@ impl From for catppuccin_egui::Theme { } #[derive(Copy, Clone, Debug, Default, Serialize, Deserialize, JsonSchema, Display, PartialEq)] +/// Catppuccin Value pub enum CatppuccinValue { + /// Rosewater Rosewater, + /// Flamingo Flamingo, + /// Pink Pink, + /// Mauve Mauve, + /// Red Red, + /// Maroon Maroon, + /// Peach Peach, + /// Yellow Yellow, + /// Green Green, + /// Teal Teal, + /// Sky Sky, + /// Sapphire Sapphire, + /// Blue Blue, + /// Lavender Lavender, #[default] + /// Text Text, + /// Subtext1 Subtext1, + /// Subtext0 Subtext0, + /// Overlay2 Overlay2, + /// Overlay1 Overlay1, + /// Overlay0 Overlay0, + /// Surface2 Surface2, + /// Surface1 Surface1, + /// Surface0 Surface0, + /// Base Base, + /// Mantle Mantle, + /// Crust Crust, } diff --git a/komorebi/src/animation/mod.rs b/komorebi/src/animation/mod.rs index 1000902d..4566cbf1 100644 --- a/komorebi/src/animation/mod.rs +++ b/komorebi/src/animation/mod.rs @@ -25,8 +25,33 @@ use serde::Serialize; #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[serde(untagged)] +/// Animation configuration +/// +/// This can be either global: +/// ```json +/// { +/// "enabled": true, +/// "style": "EaseInSine", +/// "fps": 60, +/// "duration": 250 +/// } +/// ``` +/// +/// Or scoped by an animation kind prefix: +/// ```json +/// { +/// "movement": { +/// "enabled": true, +/// "style": "EaseInSine", +/// "fps": 60, +/// "duration": 250 +/// } +/// } +/// ``` pub enum PerAnimationPrefixConfig { + /// Animation configuration prefixed for a specific animation kind Prefix(HashMap), + /// Animation configuration for all animation kinds Global(T), } diff --git a/komorebi/src/animation/style.rs b/komorebi/src/animation/style.rs index 949f7608..0f02d3a8 100644 --- a/komorebi/src/animation/style.rs +++ b/komorebi/src/animation/style.rs @@ -420,6 +420,7 @@ pub fn apply_ease_func(t: f64, style: AnimationStyle) -> f64 { AnimationStyle::EaseOutQuad => EaseOutQuad::evaluate(t), AnimationStyle::EaseInOutQuad => EaseInOutQuad::evaluate(t), AnimationStyle::EaseInCubic => EaseInCubic::evaluate(t), + AnimationStyle::EaseOutCubic => EaseOutCubic::evaluate(t), AnimationStyle::EaseInOutCubic => EaseInOutCubic::evaluate(t), AnimationStyle::EaseInQuart => EaseInQuart::evaluate(t), AnimationStyle::EaseOutQuart => EaseOutQuart::evaluate(t), diff --git a/komorebi/src/border_manager/mod.rs b/komorebi/src/border_manager/mod.rs index ac70a1af..f29f55d1 100644 --- a/komorebi/src/border_manager/mod.rs +++ b/komorebi/src/border_manager/mod.rs @@ -813,10 +813,26 @@ pub fn hide_border(tracking_hwnd: isize) { #[derive(Debug, Copy, Clone, Display, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Z Order (https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos) pub enum ZOrder { + /// HWND_TOP + /// + /// Places the window at the top of the Z order. Top, + /// HWND_NOTOPMOST + /// + /// Places the window above all non-topmost windows (that is, behind all topmost windows). + /// This flag has no effect if the window is already a non-topmost window. NoTopMost, + /// HWND_BOTTOM + /// + /// Places the window at the bottom of the Z order. If the hWnd parameter identifies a topmost window, + /// the window loses its topmost status and is placed at the bottom of all other windows. Bottom, + /// HWND_TOPMOST + /// + /// Places the window above all non-topmost windows. + /// The window maintains its topmost position even when it is deactivated. TopMost, } diff --git a/komorebi/src/core/animation.rs b/komorebi/src/core/animation.rs index f18804f2..87492cc4 100644 --- a/komorebi/src/core/animation.rs +++ b/komorebi/src/core/animation.rs @@ -8,38 +8,72 @@ use strum::EnumString; #[derive(Copy, Clone, Debug, Display, EnumString, ValueEnum, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Mathematical function which describes the rate at which a value changes pub enum AnimationStyle { + /// Linear Linear, + /// Ease in sine EaseInSine, + /// Ease out sine EaseOutSine, + /// Ease in out sine EaseInOutSine, + /// Ease in quad EaseInQuad, + /// Ease out quad EaseOutQuad, + /// Ease in out quad EaseInOutQuad, + /// Ease in cubic EaseInCubic, + /// Ease out cubic + EaseOutCubic, + /// Ease in out cubic EaseInOutCubic, + /// Ease in quart EaseInQuart, + /// Ease out quart EaseOutQuart, + /// Ease in out quart EaseInOutQuart, + /// Ease in quint EaseInQuint, + /// Ease out quint EaseOutQuint, + /// Ease in out quint EaseInOutQuint, + /// Ease in expo EaseInExpo, + /// Ease out expo EaseOutExpo, + /// Ease in out expo EaseInOutExpo, + /// Ease in circ EaseInCirc, + /// Ease out circ EaseOutCirc, + /// Ease in out circ EaseInOutCirc, + /// Ease in back EaseInBack, + /// Ease out back EaseOutBack, + /// Ease in out back EaseInOutBack, + /// Ease in elastic EaseInElastic, + /// Ease out elastic EaseOutElastic, + /// Ease in out elastic EaseInOutElastic, + /// Ease in bounce EaseInBounce, + /// Ease out bounce EaseOutBounce, + /// Ease in out bounce EaseInOutBounce, #[value(skip)] + /// Custom Cubic Bézier function CubicBezier(f64, f64, f64, f64), } diff --git a/komorebi/src/core/arrangement.rs b/komorebi/src/core/arrangement.rs index 46b0ebe6..1c9c110e 100644 --- a/komorebi/src/core/arrangement.rs +++ b/komorebi/src/core/arrangement.rs @@ -704,9 +704,13 @@ impl Arrangement for CustomLayout { #[derive(Clone, Copy, Debug, Serialize, Deserialize, Display, EnumString, ValueEnum, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Axis on which to perform an operation pub enum Axis { + /// Horizontal axis Horizontal, + /// Vertical axis Vertical, + /// Both horizontal and vertical axes HorizontalAndVertical, } diff --git a/komorebi/src/core/config_generation.rs b/komorebi/src/core/config_generation.rs index 917b6c17..a189a0da 100644 --- a/komorebi/src/core/config_generation.rs +++ b/komorebi/src/core/config_generation.rs @@ -53,41 +53,64 @@ impl ApplicationOptions { #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[serde(untagged)] +/// Rule for matching applications pub enum MatchingRule { + /// Simple matching rule which must evaluate to true Simple(IdWithIdentifier), + /// Composite matching rule where all conditions must evaluate to true Composite(Vec), } #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Rule for assigning applications to a workspace pub struct WorkspaceMatchingRule { + /// Target monitor index pub monitor_index: usize, + /// Target workspace index pub workspace_index: usize, + /// Matching rule for the application pub matching_rule: MatchingRule, + /// Whether to apply the rule only when the application is initially launched pub initial_only: bool, } #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Rule for matching applications pub struct IdWithIdentifier { + /// Kind of identifier to target pub kind: ApplicationIdentifier, + /// Target identifier pub id: String, #[serde(skip_serializing_if = "Option::is_none")] + /// Matching strategy to use pub matching_strategy: Option, } #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Display)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Strategy for matching identifiers pub enum MatchingStrategy { + /// Should not be used, only kept for backward compatibility Legacy, + /// Equals Equals, + /// Starts With StartsWith, + /// Ends With EndsWith, + /// Contains Contains, + /// Regex Regex, + /// Does not end with DoesNotEndWith, + /// Does not start with DoesNotStartWith, + /// Does not equal DoesNotEqual, + /// Does not contain DoesNotContain, } diff --git a/komorebi/src/core/default_layout.rs b/komorebi/src/core/default_layout.rs index 044987fa..61ded0c3 100644 --- a/komorebi/src/core/default_layout.rs +++ b/komorebi/src/core/default_layout.rs @@ -12,21 +12,109 @@ use super::Sizing; Clone, Copy, Debug, Serialize, Deserialize, Eq, PartialEq, Display, EnumString, ValueEnum, )] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// A predefined komorebi layout pub enum DefaultLayout { + /// BSP Layout + /// + /// ``` + /// +-------+-----+ + /// | | | + /// | +--+--+ + /// | | |--| + /// +-------+--+--+ + /// ``` BSP, + /// Columns Layout + /// + /// ``` + /// +--+--+--+--+ + /// | | | | | + /// | | | | | + /// | | | | | + /// +--+--+--+--+ + /// ``` Columns, + /// Rows Layout + /// + /// ``` + /// +-----------+ + /// |-----------| + /// |-----------| + /// |-----------| + /// +-----------+ + /// ``` Rows, + /// Vertical Stack Layout + /// + /// ``` + /// +-------+-----+ + /// | | | + /// | +-----+ + /// | | | + /// +-------+-----+ + /// ``` VerticalStack, + /// Horizontal Stack Layout + /// + /// ``` + /// +------+------+ + /// | | + /// |------+------+ + /// | | | + /// +------+------+ + /// ``` HorizontalStack, + /// Ultrawide Vertical Stack Layout + /// + /// ``` + /// +-----+-----------+-----+ + /// | | | | + /// | | +-----+ + /// | | | | + /// | | +-----+ + /// | | | | + /// +-----+-----------+-----+ + /// ``` UltrawideVerticalStack, + /// Grid Layout + /// + /// ``` + /// +-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+ + ///| | | | | | | | | | | | | | | + ///| | | | | | | | | | | | | +---+ + ///+-----+-----+ | +---+---+ +---+---+---+ +---+---| | + ///| | | | | | | | | | | | | +---+ + ///| | | | | | | | | | | | | | | + ///+-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+ + /// 4 windows 5 windows 6 windows 7 windows + ///``` Grid, + /// Right Main Vertical Stack Layout + /// + /// ``` + /// +-----+-------+ + /// | | | + /// +-----+ | + /// | | | + /// +-----+-------+ + /// ``` RightMainVerticalStack, + /// Scrolling Layout + /// + /// ``` + /// +--+--+--+--+--+--+ + /// | | | | + /// | | | | + /// | | | | + /// +--+--+--+--+--+--+ + /// ``` Scrolling, // NOTE: If any new layout is added, please make sure to register the same in `DefaultLayout::cycle` } #[derive(Clone, Copy, Debug, Serialize, Deserialize, Eq, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Options for specific layouts pub struct LayoutOptions { /// Options related to the Scrolling layout pub scrolling: Option, @@ -36,6 +124,7 @@ pub struct LayoutOptions { #[derive(Clone, Copy, Debug, Serialize, Deserialize, Eq, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Options for the Scrolling layout pub struct ScrollingLayoutOptions { /// Desired number of visible columns (default: 3) pub columns: usize, @@ -45,6 +134,7 @@ pub struct ScrollingLayoutOptions { #[derive(Clone, Copy, Debug, Serialize, Deserialize, Eq, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Options for the Grid layout pub struct GridLayoutOptions { /// Maximum number of rows per grid column pub rows: usize, diff --git a/komorebi/src/core/mod.rs b/komorebi/src/core/mod.rs index 2e0a51a1..4193e347 100644 --- a/komorebi/src/core/mod.rs +++ b/komorebi/src/core/mod.rs @@ -274,17 +274,24 @@ pub struct SubscribeOptions { #[derive(Debug, Copy, Clone, Eq, PartialEq, Display, Serialize, Deserialize, ValueEnum)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Stackbar mode pub enum StackbarMode { + /// Always show Always, + /// Never show Never, + /// Show on stack OnStack, } #[derive(Debug, Copy, Default, Clone, Eq, PartialEq, Display, Serialize, Deserialize)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Starbar label pub enum StackbarLabel { #[default] + /// Process name Process, + /// Window title Title, } @@ -292,6 +299,7 @@ pub enum StackbarLabel { Default, Copy, Clone, Debug, Eq, PartialEq, Display, Serialize, Deserialize, ValueEnum, )] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Border style pub enum BorderStyle { #[default] /// Use the system border style @@ -306,6 +314,7 @@ pub enum BorderStyle { Default, Copy, Clone, Debug, Eq, PartialEq, Display, Serialize, Deserialize, ValueEnum, )] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Border style pub enum BorderImplementation { #[default] /// Use the adjustable komorebi border implementation @@ -329,13 +338,20 @@ pub enum BorderImplementation { Hash, )] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Window kind pub enum WindowKind { + /// Single window Single, + /// Stack container Stack, + /// Monocle container Monocle, #[default] + /// Unfocused window Unfocused, + /// Unfocused locked container UnfocusedLocked, + /// Floating window Floating, } @@ -356,30 +372,37 @@ pub enum StateQuery { Copy, Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Display, EnumString, ValueEnum, )] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Application identifier pub enum ApplicationIdentifier { + /// Executable name #[serde(alias = "exe")] Exe, + /// Class #[serde(alias = "class")] Class, #[serde(alias = "title")] + /// Window title Title, + /// Executable path #[serde(alias = "path")] Path, } #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize, Display, EnumString, ValueEnum)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Focus follows mouse implementation pub enum FocusFollowsMouseImplementation { - /// A custom FFM implementation (slightly more CPU-intensive) + /// Custom FFM implementation (slightly more CPU-intensive) Komorebi, - /// The native (legacy) Windows FFM implementation + /// Native (legacy) Windows FFM implementation Windows, } #[derive(Clone, Copy, Debug, Default, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Window management behaviour pub struct WindowManagementBehaviour { - /// The current WindowContainerBehaviour to be used + /// The current [`WindowContainerBehaviour`] to be used pub current_behaviour: WindowContainerBehaviour, /// Override of `current_behaviour` to open new windows as floating windows /// that can be later toggled to tiled, when false it will default to @@ -406,6 +429,7 @@ pub struct WindowManagementBehaviour { Clone, Copy, Debug, Default, Serialize, Deserialize, Display, EnumString, ValueEnum, PartialEq, )] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Window container behaviour when a new window is opened pub enum WindowContainerBehaviour { /// Create a new container for each new window #[default] @@ -418,6 +442,7 @@ pub enum WindowContainerBehaviour { Clone, Copy, Debug, Default, Serialize, Deserialize, Display, EnumString, ValueEnum, PartialEq, )] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Floating layer behaviour when a new window is opened pub enum FloatingLayerBehaviour { /// Tile new windows (unless they match a float rule or float override is active) #[default] @@ -430,6 +455,7 @@ pub enum FloatingLayerBehaviour { Clone, Copy, Debug, Default, Serialize, Deserialize, Display, EnumString, ValueEnum, PartialEq, )] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Placement behaviour for floating windows pub enum Placement { /// Does not change the size or position of the window #[default] @@ -469,6 +495,7 @@ impl Placement { Clone, Copy, Debug, Default, PartialEq, Serialize, Deserialize, Display, EnumString, ValueEnum, )] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Move behaviour when the operation works across a monitor boundary pub enum MoveBehaviour { /// Swap the window container with the window container at the edge of the adjacent monitor #[default] @@ -483,6 +510,7 @@ pub enum MoveBehaviour { Clone, Copy, Debug, Default, Serialize, Deserialize, Display, EnumString, ValueEnum, PartialEq, )] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Behaviour when an action would cross a monitor boundary pub enum CrossBoundaryBehaviour { /// Attempt to perform actions across a workspace boundary Workspace, @@ -493,6 +521,7 @@ pub enum CrossBoundaryBehaviour { #[derive(Copy, Clone, Debug, Serialize, Deserialize, Display, EnumString, ValueEnum, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Window hiding behaviour pub enum HidingBehaviour { /// END OF LIFE FEATURE: Use the `SW_HIDE` flag to hide windows when switching workspaces (has issues with Electron apps) #[deprecated(note = "End of life feature")] @@ -507,18 +536,22 @@ pub enum HidingBehaviour { Clone, Copy, Debug, Default, PartialEq, Serialize, Deserialize, Display, EnumString, ValueEnum, )] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Operation behaviour for temporarily unmanaged and floating windows pub enum OperationBehaviour { - /// Process komorebic commands on temporarily unmanaged/floated windows + /// Process commands on temporarily unmanaged/floated windows #[default] Op, - /// Ignore komorebic commands on temporarily unmanaged/floated windows + /// Ignore commands on temporarily unmanaged/floated windows NoOp, } #[derive(Clone, Copy, Debug, Serialize, Deserialize, Display, EnumString, ValueEnum)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Sizing pub enum Sizing { + /// Increase Increase, + /// Decrease Decrease, } @@ -542,9 +575,12 @@ impl Sizing { Clone, Copy, Debug, Default, Serialize, Deserialize, Display, EnumString, ValueEnum, PartialEq, )] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Window handling behaviour pub enum WindowHandlingBehaviour { #[default] + /// Synchronous Sync, + /// Asynchronous Async, } diff --git a/komorebi/src/core/rect.rs b/komorebi/src/core/rect.rs index 04ad653d..fb12109f 100644 --- a/komorebi/src/core/rect.rs +++ b/komorebi/src/core/rect.rs @@ -4,14 +4,15 @@ use windows::Win32::Foundation::RECT; #[derive(Debug, Default, Clone, Copy, Serialize, Deserialize, Eq, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Rectangle dimensions pub struct Rect { - /// The left point in a Win32 Rect + /// Left point of the rectangle pub left: i32, - /// The top point in a Win32 Rect + /// Top point of the rectangle pub top: i32, - /// The right point in a Win32 Rect + /// Width of the recentangle (from the left point) pub right: i32, - /// The bottom point in a Win32 Rect + /// Height of the rectangle (from the top point) pub bottom: i32, } diff --git a/komorebi/src/static_config.rs b/komorebi/src/static_config.rs index f8781099..ccb7f98b 100644 --- a/komorebi/src/static_config.rs +++ b/komorebi/src/static_config.rs @@ -127,6 +127,7 @@ mod defaults { #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Border colours for different container states pub struct BorderColours { /// Border colour when the container contains a single window #[serde(skip_serializing_if = "Option::is_none")] @@ -150,6 +151,7 @@ pub struct BorderColours { #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Theme options pub struct ThemeOptions { /// Specify Light or Dark variant for theme generation #[serde(skip_serializing_if = "Option::is_none")] @@ -200,6 +202,7 @@ pub struct ThemeOptions { #[serde_with::serde_as] #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Wallpaper configuration pub struct Wallpaper { /// Path to the wallpaper image file #[serde_as(as = "ResolvedPathBuf")] @@ -218,6 +221,7 @@ pub struct Wallpaper { #[serde_with::serde_as] #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Workspace configuration pub struct WorkspaceConfig { /// Name pub name: String, @@ -375,6 +379,7 @@ impl From<&Workspace> for WorkspaceConfig { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Monitor configuration pub struct MonitorConfig { /// Workspace configurations pub workspaces: Vec, @@ -446,6 +451,7 @@ impl From<&Monitor> for MonitorConfig { #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[serde(untagged)] +/// Path(s) to application-specific configuration file(s) pub enum AppSpecificConfigurationPath { /// A single `applications.json` file Single(#[serde_as(as = "ResolvedPathBuf")] PathBuf), @@ -540,7 +546,7 @@ pub struct StaticConfig { #[serde(alias = "active_window_border")] #[cfg_attr(feature = "schemars", schemars(extend("default" = defaults::BORDER_ENABLED)))] pub border: Option, - /// Window border colours for different container types (has no effect if a theme is defined) + /// Window border colours for different container types (has no effect if [`theme`] is defined) #[serde(skip_serializing_if = "Option::is_none")] #[serde(alias = "active_window_border_colours")] pub border_colours: Option, @@ -624,6 +630,8 @@ pub struct StaticConfig { #[serde(skip_serializing_if = "Option::is_none")] pub animation: Option, /// Theme configuration options + /// + /// If a theme is specified, `border_colours` will have no effect #[serde(skip_serializing_if = "Option::is_none")] pub theme: Option, /// Identify applications which are slow to send initial event notifications @@ -652,6 +660,7 @@ pub struct StaticConfig { #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Animations configuration options pub struct AnimationsConfig { /// Enable or disable animations pub enabled: PerAnimationPrefixConfig, @@ -670,6 +679,7 @@ pub struct AnimationsConfig { #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[serde(tag = "palette")] +/// Komorebi theme pub enum KomorebiTheme { /// A theme from catppuccin-egui Catppuccin { @@ -895,6 +905,7 @@ impl StaticConfig { #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Stackbar tabs configuration pub struct TabsConfig { /// Width of a stackbar tab #[serde(skip_serializing_if = "Option::is_none")] @@ -918,6 +929,7 @@ pub struct TabsConfig { #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Stackbar configuration pub struct StackbarConfig { /// Stackbar height #[serde(skip_serializing_if = "Option::is_none")] diff --git a/komorebi/src/window.rs b/komorebi/src/window.rs index c69f8822..2decc8db 100644 --- a/komorebi/src/window.rs +++ b/komorebi/src/window.rs @@ -302,10 +302,11 @@ impl RenderDispatcher for TransparencyRenderDispatcher { #[derive(Copy, Clone, Debug, Display, EnumString, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[serde(untagged)] +/// Aspect ratio for temporarily floating windows pub enum AspectRatio { - /// A predefined aspect ratio + /// Predefined aspect ratio Predefined(PredefinedAspectRatio), - /// A custom W:H aspect ratio + /// Custom W:H aspect ratio Custom(i32, i32), } @@ -317,6 +318,7 @@ impl Default for AspectRatio { #[derive(Copy, Clone, Debug, Default, Display, EnumString, Serialize, Deserialize, PartialEq)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// Predefined aspect ratio pub enum PredefinedAspectRatio { /// 21:9 Ultrawide, diff --git a/schema.asc.json b/schema.asc.json index 24b49e77..b0381829 100644 --- a/schema.asc.json +++ b/schema.asc.json @@ -7,12 +7,28 @@ }, "$defs": { "ApplicationIdentifier": { - "type": "string", - "enum": [ - "Exe", - "Class", - "Title", - "Path" + "description": "Application identifier", + "oneOf": [ + { + "description": "Executable name", + "type": "string", + "const": "Exe" + }, + { + "description": "Class", + "type": "string", + "const": "Class" + }, + { + "description": "Window title", + "type": "string", + "const": "Title" + }, + { + "description": "Executable path", + "type": "string", + "const": "Path" + } ] }, "AscApplicationRules": { @@ -112,15 +128,19 @@ ] }, "IdWithIdentifier": { + "description": "Rule for matching applications", "type": "object", "properties": { "id": { + "description": "Target identifier", "type": "string" }, "kind": { + "description": "Kind of identifier to target", "$ref": "#/$defs/ApplicationIdentifier" }, "matching_strategy": { + "description": "Matching strategy to use", "anyOf": [ { "$ref": "#/$defs/MatchingStrategy" @@ -137,11 +157,14 @@ ] }, "MatchingRule": { + "description": "Rule for matching applications", "anyOf": [ { + "description": "Simple matching rule which must evaluate to true", "$ref": "#/$defs/IdWithIdentifier" }, { + "description": "Composite matching rule where all conditions must evaluate to true", "type": "array", "items": { "$ref": "#/$defs/IdWithIdentifier" @@ -150,18 +173,58 @@ ] }, "MatchingStrategy": { - "type": "string", - "enum": [ - "Legacy", - "Equals", - "StartsWith", - "EndsWith", - "Contains", - "Regex", - "DoesNotEndWith", - "DoesNotStartWith", - "DoesNotEqual", - "DoesNotContain" + "description": "Strategy for matching identifiers", + "oneOf": [ + { + "description": "Should not be used, only kept for backward compatibility", + "type": "string", + "const": "Legacy" + }, + { + "description": "Equals", + "type": "string", + "const": "Equals" + }, + { + "description": "Starts With", + "type": "string", + "const": "StartsWith" + }, + { + "description": "Ends With", + "type": "string", + "const": "EndsWith" + }, + { + "description": "Contains", + "type": "string", + "const": "Contains" + }, + { + "description": "Regex", + "type": "string", + "const": "Regex" + }, + { + "description": "Does not end with", + "type": "string", + "const": "DoesNotEndWith" + }, + { + "description": "Does not start with", + "type": "string", + "const": "DoesNotStartWith" + }, + { + "description": "Does not equal", + "type": "string", + "const": "DoesNotEqual" + }, + { + "description": "Does not contain", + "type": "string", + "const": "DoesNotContain" + } ] } } diff --git a/schema.bar.json b/schema.bar.json index c308341f..2d80db11 100644 --- a/schema.bar.json +++ b/schema.bar.json @@ -187,43 +187,165 @@ ] }, "AnimationStyle": { + "description": "Mathematical function which describes the rate at which a value changes", "oneOf": [ { + "description": "Linear", "type": "string", - "enum": [ - "Linear", - "EaseInSine", - "EaseOutSine", - "EaseInOutSine", - "EaseInQuad", - "EaseOutQuad", - "EaseInOutQuad", - "EaseInCubic", - "EaseInOutCubic", - "EaseInQuart", - "EaseOutQuart", - "EaseInOutQuart", - "EaseInQuint", - "EaseOutQuint", - "EaseInOutQuint", - "EaseInExpo", - "EaseOutExpo", - "EaseInOutExpo", - "EaseInCirc", - "EaseOutCirc", - "EaseInOutCirc", - "EaseInBack", - "EaseOutBack", - "EaseInOutBack", - "EaseInElastic", - "EaseOutElastic", - "EaseInOutElastic", - "EaseInBounce", - "EaseOutBounce", - "EaseInOutBounce" - ] + "const": "Linear" }, { + "description": "Ease in sine", + "type": "string", + "const": "EaseInSine" + }, + { + "description": "Ease out sine", + "type": "string", + "const": "EaseOutSine" + }, + { + "description": "Ease in out sine", + "type": "string", + "const": "EaseInOutSine" + }, + { + "description": "Ease in quad", + "type": "string", + "const": "EaseInQuad" + }, + { + "description": "Ease out quad", + "type": "string", + "const": "EaseOutQuad" + }, + { + "description": "Ease in out quad", + "type": "string", + "const": "EaseInOutQuad" + }, + { + "description": "Ease in cubic", + "type": "string", + "const": "EaseInCubic" + }, + { + "description": "Ease out cubic", + "type": "string", + "const": "EaseOutCubic" + }, + { + "description": "Ease in out cubic", + "type": "string", + "const": "EaseInOutCubic" + }, + { + "description": "Ease in quart", + "type": "string", + "const": "EaseInQuart" + }, + { + "description": "Ease out quart", + "type": "string", + "const": "EaseOutQuart" + }, + { + "description": "Ease in out quart", + "type": "string", + "const": "EaseInOutQuart" + }, + { + "description": "Ease in quint", + "type": "string", + "const": "EaseInQuint" + }, + { + "description": "Ease out quint", + "type": "string", + "const": "EaseOutQuint" + }, + { + "description": "Ease in out quint", + "type": "string", + "const": "EaseInOutQuint" + }, + { + "description": "Ease in expo", + "type": "string", + "const": "EaseInExpo" + }, + { + "description": "Ease out expo", + "type": "string", + "const": "EaseOutExpo" + }, + { + "description": "Ease in out expo", + "type": "string", + "const": "EaseInOutExpo" + }, + { + "description": "Ease in circ", + "type": "string", + "const": "EaseInCirc" + }, + { + "description": "Ease out circ", + "type": "string", + "const": "EaseOutCirc" + }, + { + "description": "Ease in out circ", + "type": "string", + "const": "EaseInOutCirc" + }, + { + "description": "Ease in back", + "type": "string", + "const": "EaseInBack" + }, + { + "description": "Ease out back", + "type": "string", + "const": "EaseOutBack" + }, + { + "description": "Ease in out back", + "type": "string", + "const": "EaseInOutBack" + }, + { + "description": "Ease in elastic", + "type": "string", + "const": "EaseInElastic" + }, + { + "description": "Ease out elastic", + "type": "string", + "const": "EaseOutElastic" + }, + { + "description": "Ease in out elastic", + "type": "string", + "const": "EaseInOutElastic" + }, + { + "description": "Ease in bounce", + "type": "string", + "const": "EaseInBounce" + }, + { + "description": "Ease out bounce", + "type": "string", + "const": "EaseOutBounce" + }, + { + "description": "Ease in out bounce", + "type": "string", + "const": "EaseInOutBounce" + }, + { + "description": "Custom Cubic Bézier function", "type": "object", "properties": { "CubicBezier": { @@ -307,12 +429,28 @@ ] }, "ApplicationIdentifier": { - "type": "string", - "enum": [ - "Exe", - "Class", - "Title", - "Path" + "description": "Application identifier", + "oneOf": [ + { + "description": "Executable name", + "type": "string", + "const": "Exe" + }, + { + "description": "Class", + "type": "string", + "const": "Class" + }, + { + "description": "Window title", + "type": "string", + "const": "Title" + }, + { + "description": "Executable path", + "type": "string", + "const": "Path" + } ] }, "ApplicationsConfig": { @@ -381,11 +519,23 @@ ] }, "Axis": { - "type": "string", - "enum": [ - "Horizontal", - "Vertical", - "HorizontalAndVertical" + "description": "Axis on which to perform an operation", + "oneOf": [ + { + "description": "Horizontal axis", + "type": "string", + "const": "Horizontal" + }, + { + "description": "Vertical axis", + "type": "string", + "const": "Vertical" + }, + { + "description": "Both horizontal and vertical axes", + "type": "string", + "const": "HorizontalAndVertical" + } ] }, "Base16": { @@ -663,54 +813,71 @@ ] }, "Base16ColourPalette": { + "description": "Base16 colour palette: https://github.com/chriskempson/base16", "type": "object", "properties": { "base_00": { + "description": "Base00", "$ref": "#/$defs/Colour" }, "base_01": { + "description": "Base01", "$ref": "#/$defs/Colour" }, "base_02": { + "description": "Base02", "$ref": "#/$defs/Colour" }, "base_03": { + "description": "Base03", "$ref": "#/$defs/Colour" }, "base_04": { + "description": "Base04", "$ref": "#/$defs/Colour" }, "base_05": { + "description": "Base05", "$ref": "#/$defs/Colour" }, "base_06": { + "description": "Base06", "$ref": "#/$defs/Colour" }, "base_07": { + "description": "Base07", "$ref": "#/$defs/Colour" }, "base_08": { + "description": "Base08", "$ref": "#/$defs/Colour" }, "base_09": { + "description": "Base09", "$ref": "#/$defs/Colour" }, "base_0a": { + "description": "Base0A", "$ref": "#/$defs/Colour" }, "base_0b": { + "description": "Base0B", "$ref": "#/$defs/Colour" }, "base_0c": { + "description": "Base0C", "$ref": "#/$defs/Colour" }, "base_0d": { + "description": "Base0D", "$ref": "#/$defs/Colour" }, "base_0e": { + "description": "Base0E", "$ref": "#/$defs/Colour" }, "base_0f": { + "description": "Base0F", "$ref": "#/$defs/Colour" } }, @@ -734,24 +901,88 @@ ] }, "Base16Value": { - "type": "string", - "enum": [ - "Base00", - "Base01", - "Base02", - "Base03", - "Base04", - "Base05", - "Base06", - "Base07", - "Base08", - "Base09", - "Base0A", - "Base0B", - "Base0C", - "Base0D", - "Base0E", - "Base0F" + "description": "Base16 value", + "oneOf": [ + { + "description": "Base00", + "type": "string", + "const": "Base00" + }, + { + "description": "Base01", + "type": "string", + "const": "Base01" + }, + { + "description": "Base02", + "type": "string", + "const": "Base02" + }, + { + "description": "Base03", + "type": "string", + "const": "Base03" + }, + { + "description": "Base04", + "type": "string", + "const": "Base04" + }, + { + "description": "Base05", + "type": "string", + "const": "Base05" + }, + { + "description": "Base06", + "type": "string", + "const": "Base06" + }, + { + "description": "Base07", + "type": "string", + "const": "Base07" + }, + { + "description": "Base08", + "type": "string", + "const": "Base08" + }, + { + "description": "Base09", + "type": "string", + "const": "Base09" + }, + { + "description": "Base0A", + "type": "string", + "const": "Base0A" + }, + { + "description": "Base0B", + "type": "string", + "const": "Base0B" + }, + { + "description": "Base0C", + "type": "string", + "const": "Base0C" + }, + { + "description": "Base0D", + "type": "string", + "const": "Base0D" + }, + { + "description": "Base0E", + "type": "string", + "const": "Base0E" + }, + { + "description": "Base0F", + "type": "string", + "const": "Base0F" + } ] }, "BatteryConfig": { @@ -805,6 +1036,7 @@ ] }, "BorderImplementation": { + "description": "Border style", "oneOf": [ { "description": "Use the adjustable komorebi border implementation", @@ -819,6 +1051,7 @@ ] }, "BorderStyle": { + "description": "Border style", "oneOf": [ { "description": "Use the system border style", @@ -838,46 +1071,167 @@ ] }, "Catppuccin": { - "type": "string", - "enum": [ - "Frappe", - "Latte", - "Macchiato", - "Mocha" + "description": "Catppuccin palette", + "oneOf": [ + { + "description": "Frappe", + "type": "string", + "const": "Frappe" + }, + { + "description": "Latte", + "type": "string", + "const": "Latte" + }, + { + "description": "Macchiato", + "type": "string", + "const": "Macchiato" + }, + { + "description": "Mocha", + "type": "string", + "const": "Mocha" + } ] }, "CatppuccinValue": { - "type": "string", - "enum": [ - "Rosewater", - "Flamingo", - "Pink", - "Mauve", - "Red", - "Maroon", - "Peach", - "Yellow", - "Green", - "Teal", - "Sky", - "Sapphire", - "Blue", - "Lavender", - "Text", - "Subtext1", - "Subtext0", - "Overlay2", - "Overlay1", - "Overlay0", - "Surface2", - "Surface1", - "Surface0", - "Base", - "Mantle", - "Crust" + "description": "Catppuccin Value", + "oneOf": [ + { + "description": "Rosewater", + "type": "string", + "const": "Rosewater" + }, + { + "description": "Flamingo", + "type": "string", + "const": "Flamingo" + }, + { + "description": "Pink", + "type": "string", + "const": "Pink" + }, + { + "description": "Mauve", + "type": "string", + "const": "Mauve" + }, + { + "description": "Red", + "type": "string", + "const": "Red" + }, + { + "description": "Maroon", + "type": "string", + "const": "Maroon" + }, + { + "description": "Peach", + "type": "string", + "const": "Peach" + }, + { + "description": "Yellow", + "type": "string", + "const": "Yellow" + }, + { + "description": "Green", + "type": "string", + "const": "Green" + }, + { + "description": "Teal", + "type": "string", + "const": "Teal" + }, + { + "description": "Sky", + "type": "string", + "const": "Sky" + }, + { + "description": "Sapphire", + "type": "string", + "const": "Sapphire" + }, + { + "description": "Blue", + "type": "string", + "const": "Blue" + }, + { + "description": "Lavender", + "type": "string", + "const": "Lavender" + }, + { + "description": "Text", + "type": "string", + "const": "Text" + }, + { + "description": "Subtext1", + "type": "string", + "const": "Subtext1" + }, + { + "description": "Subtext0", + "type": "string", + "const": "Subtext0" + }, + { + "description": "Overlay2", + "type": "string", + "const": "Overlay2" + }, + { + "description": "Overlay1", + "type": "string", + "const": "Overlay1" + }, + { + "description": "Overlay0", + "type": "string", + "const": "Overlay0" + }, + { + "description": "Surface2", + "type": "string", + "const": "Surface2" + }, + { + "description": "Surface1", + "type": "string", + "const": "Surface1" + }, + { + "description": "Surface0", + "type": "string", + "const": "Surface0" + }, + { + "description": "Base", + "type": "string", + "const": "Base" + }, + { + "description": "Mantle", + "type": "string", + "const": "Mantle" + }, + { + "description": "Crust", + "type": "string", + "const": "Crust" + } ] }, "Colour": { + "description": "Colour representation", "anyOf": [ { "description": "Colour represented as RGB", @@ -1047,17 +1401,53 @@ ] }, "DefaultLayout": { - "type": "string", - "enum": [ - "BSP", - "Columns", - "Rows", - "VerticalStack", - "HorizontalStack", - "UltrawideVerticalStack", - "Grid", - "RightMainVerticalStack", - "Scrolling" + "description": "A predefined komorebi layout", + "oneOf": [ + { + "description": "BSP Layout\n\n```\n+-------+-----+\n| | |\n| +--+--+\n| | |--|\n+-------+--+--+\n```", + "type": "string", + "const": "BSP" + }, + { + "description": "Columns Layout\n\n```\n+--+--+--+--+\n| | | | |\n| | | | |\n| | | | |\n+--+--+--+--+\n```", + "type": "string", + "const": "Columns" + }, + { + "description": "Rows Layout\n\n```\n+-----------+\n|-----------|\n|-----------|\n|-----------|\n+-----------+\n```", + "type": "string", + "const": "Rows" + }, + { + "description": "Vertical Stack Layout\n\n```\n+-------+-----+\n| | |\n| +-----+\n| | |\n+-------+-----+\n```", + "type": "string", + "const": "VerticalStack" + }, + { + "description": "Horizontal Stack Layout\n\n```\n+------+------+\n| |\n|------+------+\n| | |\n+------+------+\n```", + "type": "string", + "const": "HorizontalStack" + }, + { + "description": "Ultrawide Vertical Stack Layout\n\n```\n+-----+-----------+-----+\n| | | |\n| | +-----+\n| | | |\n| | +-----+\n| | | |\n+-----+-----------+-----+\n```", + "type": "string", + "const": "UltrawideVerticalStack" + }, + { + "description": "Grid Layout\n\n```\n+-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+\n| | | | | | | | | | | | | | |\n| | | | | | | | | | | | | +---+\n+-----+-----+ | +---+---+ +---+---+---+ +---+---| |\n| | | | | | | | | | | | | +---+\n| | | | | | | | | | | | | | |\n+-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+\n 4 windows 5 windows 6 windows 7 windows\n```", + "type": "string", + "const": "Grid" + }, + { + "description": "Right Main Vertical Stack Layout\n\n```\n+-----+-------+\n| | |\n+-----+ |\n| | |\n+-----+-------+\n```", + "type": "string", + "const": "RightMainVerticalStack" + }, + { + "description": "Scrolling Layout\n\n```\n+--+--+--+--+--+--+\n| | | |\n| | | |\n| | | |\n+--+--+--+--+--+--+\n```", + "type": "string", + "const": "Scrolling" + } ] }, "DisplayFormat": { @@ -1090,14 +1480,15 @@ ] }, "FocusFollowsMouseImplementation": { + "description": "Focus follows mouse implementation", "oneOf": [ { - "description": "A custom FFM implementation (slightly more CPU-intensive)", + "description": "Custom FFM implementation (slightly more CPU-intensive)", "type": "string", "const": "Komorebi" }, { - "description": "The native (legacy) Windows FFM implementation", + "description": "Native (legacy) Windows FFM implementation", "type": "string", "const": "Windows" } @@ -1300,10 +1691,12 @@ ] }, "Hex": { + "description": "Colour represented as a Hex string", "type": "string", "format": "color-hex" }, "HidingBehaviour": { + "description": "Window hiding behaviour", "oneOf": [ { "description": "END OF LIFE FEATURE: Use the `SW_HIDE` flag to hide windows when switching workspaces (has issues with Electron apps)", @@ -1764,6 +2157,7 @@ ] }, "KomorebiTheme": { + "description": "Komorebi theme", "oneOf": [ { "description": "A theme from catppuccin-egui", @@ -2492,6 +2886,7 @@ ] }, "MoveBehaviour": { + "description": "Move behaviour when the operation works across a monitor boundary", "oneOf": [ { "description": "Swap the window container with the window container at the edge of the adjacent monitor", @@ -2622,14 +3017,15 @@ } }, "OperationBehaviour": { + "description": "Operation behaviour for temporarily unmanaged and floating windows", "oneOf": [ { - "description": "Process komorebic commands on temporarily unmanaged/floated windows", + "description": "Process commands on temporarily unmanaged/floated windows", "type": "string", "const": "Op" }, { - "description": "Ignore komorebic commands on temporarily unmanaged/floated windows", + "description": "Ignore commands on temporarily unmanaged/floated windows", "type": "string", "const": "NoOp" } @@ -2694,25 +3090,26 @@ } }, "Rect": { + "description": "Rectangle dimensions", "type": "object", "properties": { "bottom": { - "description": "The bottom point in a Win32 Rect", + "description": "Height of the rectangle (from the top point)", "type": "integer", "format": "int32" }, "left": { - "description": "The left point in a Win32 Rect", + "description": "Left point of the rectangle", "type": "integer", "format": "int32" }, "right": { - "description": "The right point in a Win32 Rect", + "description": "Width of the recentangle (from the left point)", "type": "integer", "format": "int32" }, "top": { - "description": "The top point in a Win32 Rect", + "description": "Top point of the rectangle", "type": "integer", "format": "int32" } @@ -2725,6 +3122,7 @@ ] }, "Rgb": { + "description": "Colour represented as RGB", "type": "object", "properties": { "b": { @@ -2772,10 +3170,18 @@ ] }, "Sizing": { - "type": "string", - "enum": [ - "Increase", - "Decrease" + "description": "Sizing", + "oneOf": [ + { + "description": "Increase", + "type": "string", + "const": "Increase" + }, + { + "description": "Decrease", + "type": "string", + "const": "Decrease" + } ] }, "SocketMessage": { @@ -6303,18 +6709,38 @@ ] }, "StackbarLabel": { - "type": "string", - "enum": [ - "Process", - "Title" + "description": "Starbar label", + "oneOf": [ + { + "description": "Process name", + "type": "string", + "const": "Process" + }, + { + "description": "Window title", + "type": "string", + "const": "Title" + } ] }, "StackbarMode": { - "type": "string", - "enum": [ - "Always", - "Never", - "OnStack" + "description": "Stackbar mode", + "oneOf": [ + { + "description": "Always show", + "type": "string", + "const": "Always" + }, + { + "description": "Never show", + "type": "string", + "const": "Never" + }, + { + "description": "Show on stack", + "type": "string", + "const": "OnStack" + } ] }, "StateQuery": { @@ -6682,14 +7108,38 @@ ] }, "WindowKind": { - "type": "string", - "enum": [ - "Single", - "Stack", - "Monocle", - "Unfocused", - "UnfocusedLocked", - "Floating" + "description": "Window kind", + "oneOf": [ + { + "description": "Single window", + "type": "string", + "const": "Single" + }, + { + "description": "Stack container", + "type": "string", + "const": "Stack" + }, + { + "description": "Monocle container", + "type": "string", + "const": "Monocle" + }, + { + "description": "Unfocused window", + "type": "string", + "const": "Unfocused" + }, + { + "description": "Unfocused locked container", + "type": "string", + "const": "UnfocusedLocked" + }, + { + "description": "Floating window", + "type": "string", + "const": "Floating" + } ] }, "WorkspacesDisplayFormat": { diff --git a/schema.json b/schema.json index 4265d7a4..23304695 100644 --- a/schema.json +++ b/schema.json @@ -45,7 +45,7 @@ "default": true }, "border_colours": { - "description": "Window border colours for different container types (has no effect if a theme is defined)", + "description": "Window border colours for different container types (has no effect if [`theme`] is defined)", "anyOf": [ { "$ref": "#/$defs/BorderColours" @@ -432,7 +432,7 @@ ] }, "theme": { - "description": "Theme configuration options", + "description": "Theme configuration options\n\nIf a theme is specified, `border_colours` will have no effect", "anyOf": [ { "$ref": "#/$defs/KomorebiTheme" @@ -544,43 +544,165 @@ }, "$defs": { "AnimationStyle": { + "description": "Mathematical function which describes the rate at which a value changes", "oneOf": [ { + "description": "Linear", "type": "string", - "enum": [ - "Linear", - "EaseInSine", - "EaseOutSine", - "EaseInOutSine", - "EaseInQuad", - "EaseOutQuad", - "EaseInOutQuad", - "EaseInCubic", - "EaseInOutCubic", - "EaseInQuart", - "EaseOutQuart", - "EaseInOutQuart", - "EaseInQuint", - "EaseOutQuint", - "EaseInOutQuint", - "EaseInExpo", - "EaseOutExpo", - "EaseInOutExpo", - "EaseInCirc", - "EaseOutCirc", - "EaseInOutCirc", - "EaseInBack", - "EaseOutBack", - "EaseInOutBack", - "EaseInElastic", - "EaseOutElastic", - "EaseInOutElastic", - "EaseInBounce", - "EaseOutBounce", - "EaseInOutBounce" - ] + "const": "Linear" }, { + "description": "Ease in sine", + "type": "string", + "const": "EaseInSine" + }, + { + "description": "Ease out sine", + "type": "string", + "const": "EaseOutSine" + }, + { + "description": "Ease in out sine", + "type": "string", + "const": "EaseInOutSine" + }, + { + "description": "Ease in quad", + "type": "string", + "const": "EaseInQuad" + }, + { + "description": "Ease out quad", + "type": "string", + "const": "EaseOutQuad" + }, + { + "description": "Ease in out quad", + "type": "string", + "const": "EaseInOutQuad" + }, + { + "description": "Ease in cubic", + "type": "string", + "const": "EaseInCubic" + }, + { + "description": "Ease out cubic", + "type": "string", + "const": "EaseOutCubic" + }, + { + "description": "Ease in out cubic", + "type": "string", + "const": "EaseInOutCubic" + }, + { + "description": "Ease in quart", + "type": "string", + "const": "EaseInQuart" + }, + { + "description": "Ease out quart", + "type": "string", + "const": "EaseOutQuart" + }, + { + "description": "Ease in out quart", + "type": "string", + "const": "EaseInOutQuart" + }, + { + "description": "Ease in quint", + "type": "string", + "const": "EaseInQuint" + }, + { + "description": "Ease out quint", + "type": "string", + "const": "EaseOutQuint" + }, + { + "description": "Ease in out quint", + "type": "string", + "const": "EaseInOutQuint" + }, + { + "description": "Ease in expo", + "type": "string", + "const": "EaseInExpo" + }, + { + "description": "Ease out expo", + "type": "string", + "const": "EaseOutExpo" + }, + { + "description": "Ease in out expo", + "type": "string", + "const": "EaseInOutExpo" + }, + { + "description": "Ease in circ", + "type": "string", + "const": "EaseInCirc" + }, + { + "description": "Ease out circ", + "type": "string", + "const": "EaseOutCirc" + }, + { + "description": "Ease in out circ", + "type": "string", + "const": "EaseInOutCirc" + }, + { + "description": "Ease in back", + "type": "string", + "const": "EaseInBack" + }, + { + "description": "Ease out back", + "type": "string", + "const": "EaseOutBack" + }, + { + "description": "Ease in out back", + "type": "string", + "const": "EaseInOutBack" + }, + { + "description": "Ease in elastic", + "type": "string", + "const": "EaseInElastic" + }, + { + "description": "Ease out elastic", + "type": "string", + "const": "EaseOutElastic" + }, + { + "description": "Ease in out elastic", + "type": "string", + "const": "EaseInOutElastic" + }, + { + "description": "Ease in bounce", + "type": "string", + "const": "EaseInBounce" + }, + { + "description": "Ease out bounce", + "type": "string", + "const": "EaseOutBounce" + }, + { + "description": "Ease in out bounce", + "type": "string", + "const": "EaseInOutBounce" + }, + { + "description": "Custom Cubic Bézier function", "type": "object", "properties": { "CubicBezier": { @@ -615,6 +737,7 @@ ] }, "AnimationsConfig": { + "description": "Animations configuration options", "type": "object", "properties": { "duration": { @@ -659,6 +782,7 @@ ] }, "AppSpecificConfigurationPath": { + "description": "Path(s) to application-specific configuration file(s)", "anyOf": [ { "description": "A single `applications.json` file", @@ -674,22 +798,39 @@ ] }, "ApplicationIdentifier": { - "type": "string", - "enum": [ - "Exe", - "Class", - "Title", - "Path" + "description": "Application identifier", + "oneOf": [ + { + "description": "Executable name", + "type": "string", + "const": "Exe" + }, + { + "description": "Class", + "type": "string", + "const": "Class" + }, + { + "description": "Window title", + "type": "string", + "const": "Title" + }, + { + "description": "Executable path", + "type": "string", + "const": "Path" + } ] }, "AspectRatio": { + "description": "Aspect ratio for temporarily floating windows", "anyOf": [ { - "description": "A predefined aspect ratio", + "description": "Predefined aspect ratio", "$ref": "#/$defs/PredefinedAspectRatio" }, { - "description": "A custom W:H aspect ratio", + "description": "Custom W:H aspect ratio", "type": "array", "maxItems": 2, "minItems": 2, @@ -707,11 +848,23 @@ ] }, "Axis": { - "type": "string", - "enum": [ - "Horizontal", - "Vertical", - "HorizontalAndVertical" + "description": "Axis on which to perform an operation", + "oneOf": [ + { + "description": "Horizontal axis", + "type": "string", + "const": "Horizontal" + }, + { + "description": "Vertical axis", + "type": "string", + "const": "Vertical" + }, + { + "description": "Both horizontal and vertical axes", + "type": "string", + "const": "HorizontalAndVertical" + } ] }, "Base16": { @@ -989,54 +1142,71 @@ ] }, "Base16ColourPalette": { + "description": "Base16 colour palette: https://github.com/chriskempson/base16", "type": "object", "properties": { "base_00": { + "description": "Base00", "$ref": "#/$defs/Colour" }, "base_01": { + "description": "Base01", "$ref": "#/$defs/Colour" }, "base_02": { + "description": "Base02", "$ref": "#/$defs/Colour" }, "base_03": { + "description": "Base03", "$ref": "#/$defs/Colour" }, "base_04": { + "description": "Base04", "$ref": "#/$defs/Colour" }, "base_05": { + "description": "Base05", "$ref": "#/$defs/Colour" }, "base_06": { + "description": "Base06", "$ref": "#/$defs/Colour" }, "base_07": { + "description": "Base07", "$ref": "#/$defs/Colour" }, "base_08": { + "description": "Base08", "$ref": "#/$defs/Colour" }, "base_09": { + "description": "Base09", "$ref": "#/$defs/Colour" }, "base_0a": { + "description": "Base0A", "$ref": "#/$defs/Colour" }, "base_0b": { + "description": "Base0B", "$ref": "#/$defs/Colour" }, "base_0c": { + "description": "Base0C", "$ref": "#/$defs/Colour" }, "base_0d": { + "description": "Base0D", "$ref": "#/$defs/Colour" }, "base_0e": { + "description": "Base0E", "$ref": "#/$defs/Colour" }, "base_0f": { + "description": "Base0F", "$ref": "#/$defs/Colour" } }, @@ -1060,27 +1230,92 @@ ] }, "Base16Value": { - "type": "string", - "enum": [ - "Base00", - "Base01", - "Base02", - "Base03", - "Base04", - "Base05", - "Base06", - "Base07", - "Base08", - "Base09", - "Base0A", - "Base0B", - "Base0C", - "Base0D", - "Base0E", - "Base0F" + "description": "Base16 value", + "oneOf": [ + { + "description": "Base00", + "type": "string", + "const": "Base00" + }, + { + "description": "Base01", + "type": "string", + "const": "Base01" + }, + { + "description": "Base02", + "type": "string", + "const": "Base02" + }, + { + "description": "Base03", + "type": "string", + "const": "Base03" + }, + { + "description": "Base04", + "type": "string", + "const": "Base04" + }, + { + "description": "Base05", + "type": "string", + "const": "Base05" + }, + { + "description": "Base06", + "type": "string", + "const": "Base06" + }, + { + "description": "Base07", + "type": "string", + "const": "Base07" + }, + { + "description": "Base08", + "type": "string", + "const": "Base08" + }, + { + "description": "Base09", + "type": "string", + "const": "Base09" + }, + { + "description": "Base0A", + "type": "string", + "const": "Base0A" + }, + { + "description": "Base0B", + "type": "string", + "const": "Base0B" + }, + { + "description": "Base0C", + "type": "string", + "const": "Base0C" + }, + { + "description": "Base0D", + "type": "string", + "const": "Base0D" + }, + { + "description": "Base0E", + "type": "string", + "const": "Base0E" + }, + { + "description": "Base0F", + "type": "string", + "const": "Base0F" + } ] }, "BorderColours": { + "description": "Border colours for different container states", "type": "object", "properties": { "floating": { @@ -1152,6 +1387,7 @@ } }, "BorderImplementation": { + "description": "Border style", "oneOf": [ { "description": "Use the adjustable komorebi border implementation", @@ -1166,6 +1402,7 @@ ] }, "BorderStyle": { + "description": "Border style", "oneOf": [ { "description": "Use the system border style", @@ -1185,46 +1422,167 @@ ] }, "Catppuccin": { - "type": "string", - "enum": [ - "Frappe", - "Latte", - "Macchiato", - "Mocha" + "description": "Catppuccin palette", + "oneOf": [ + { + "description": "Frappe", + "type": "string", + "const": "Frappe" + }, + { + "description": "Latte", + "type": "string", + "const": "Latte" + }, + { + "description": "Macchiato", + "type": "string", + "const": "Macchiato" + }, + { + "description": "Mocha", + "type": "string", + "const": "Mocha" + } ] }, "CatppuccinValue": { - "type": "string", - "enum": [ - "Rosewater", - "Flamingo", - "Pink", - "Mauve", - "Red", - "Maroon", - "Peach", - "Yellow", - "Green", - "Teal", - "Sky", - "Sapphire", - "Blue", - "Lavender", - "Text", - "Subtext1", - "Subtext0", - "Overlay2", - "Overlay1", - "Overlay0", - "Surface2", - "Surface1", - "Surface0", - "Base", - "Mantle", - "Crust" + "description": "Catppuccin Value", + "oneOf": [ + { + "description": "Rosewater", + "type": "string", + "const": "Rosewater" + }, + { + "description": "Flamingo", + "type": "string", + "const": "Flamingo" + }, + { + "description": "Pink", + "type": "string", + "const": "Pink" + }, + { + "description": "Mauve", + "type": "string", + "const": "Mauve" + }, + { + "description": "Red", + "type": "string", + "const": "Red" + }, + { + "description": "Maroon", + "type": "string", + "const": "Maroon" + }, + { + "description": "Peach", + "type": "string", + "const": "Peach" + }, + { + "description": "Yellow", + "type": "string", + "const": "Yellow" + }, + { + "description": "Green", + "type": "string", + "const": "Green" + }, + { + "description": "Teal", + "type": "string", + "const": "Teal" + }, + { + "description": "Sky", + "type": "string", + "const": "Sky" + }, + { + "description": "Sapphire", + "type": "string", + "const": "Sapphire" + }, + { + "description": "Blue", + "type": "string", + "const": "Blue" + }, + { + "description": "Lavender", + "type": "string", + "const": "Lavender" + }, + { + "description": "Text", + "type": "string", + "const": "Text" + }, + { + "description": "Subtext1", + "type": "string", + "const": "Subtext1" + }, + { + "description": "Subtext0", + "type": "string", + "const": "Subtext0" + }, + { + "description": "Overlay2", + "type": "string", + "const": "Overlay2" + }, + { + "description": "Overlay1", + "type": "string", + "const": "Overlay1" + }, + { + "description": "Overlay0", + "type": "string", + "const": "Overlay0" + }, + { + "description": "Surface2", + "type": "string", + "const": "Surface2" + }, + { + "description": "Surface1", + "type": "string", + "const": "Surface1" + }, + { + "description": "Surface0", + "type": "string", + "const": "Surface0" + }, + { + "description": "Base", + "type": "string", + "const": "Base" + }, + { + "description": "Mantle", + "type": "string", + "const": "Mantle" + }, + { + "description": "Crust", + "type": "string", + "const": "Crust" + } ] }, "Colour": { + "description": "Colour representation", "anyOf": [ { "description": "Colour represented as RGB", @@ -1237,6 +1595,7 @@ ] }, "CrossBoundaryBehaviour": { + "description": "Behaviour when an action would cross a monitor boundary", "oneOf": [ { "description": "Attempt to perform actions across a workspace boundary", @@ -1251,20 +1610,57 @@ ] }, "DefaultLayout": { - "type": "string", - "enum": [ - "BSP", - "Columns", - "Rows", - "VerticalStack", - "HorizontalStack", - "UltrawideVerticalStack", - "Grid", - "RightMainVerticalStack", - "Scrolling" + "description": "A predefined komorebi layout", + "oneOf": [ + { + "description": "BSP Layout\n\n```\n+-------+-----+\n| | |\n| +--+--+\n| | |--|\n+-------+--+--+\n```", + "type": "string", + "const": "BSP" + }, + { + "description": "Columns Layout\n\n```\n+--+--+--+--+\n| | | | |\n| | | | |\n| | | | |\n+--+--+--+--+\n```", + "type": "string", + "const": "Columns" + }, + { + "description": "Rows Layout\n\n```\n+-----------+\n|-----------|\n|-----------|\n|-----------|\n+-----------+\n```", + "type": "string", + "const": "Rows" + }, + { + "description": "Vertical Stack Layout\n\n```\n+-------+-----+\n| | |\n| +-----+\n| | |\n+-------+-----+\n```", + "type": "string", + "const": "VerticalStack" + }, + { + "description": "Horizontal Stack Layout\n\n```\n+------+------+\n| |\n|------+------+\n| | |\n+------+------+\n```", + "type": "string", + "const": "HorizontalStack" + }, + { + "description": "Ultrawide Vertical Stack Layout\n\n```\n+-----+-----------+-----+\n| | | |\n| | +-----+\n| | | |\n| | +-----+\n| | | |\n+-----+-----------+-----+\n```", + "type": "string", + "const": "UltrawideVerticalStack" + }, + { + "description": "Grid Layout\n\n```\n+-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+\n| | | | | | | | | | | | | | |\n| | | | | | | | | | | | | +---+\n+-----+-----+ | +---+---+ +---+---+---+ +---+---| |\n| | | | | | | | | | | | | +---+\n| | | | | | | | | | | | | | |\n+-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+\n 4 windows 5 windows 6 windows 7 windows\n```", + "type": "string", + "const": "Grid" + }, + { + "description": "Right Main Vertical Stack Layout\n\n```\n+-----+-------+\n| | |\n+-----+ |\n| | |\n+-----+-------+\n```", + "type": "string", + "const": "RightMainVerticalStack" + }, + { + "description": "Scrolling Layout\n\n```\n+--+--+--+--+--+--+\n| | | |\n| | | |\n| | | |\n+--+--+--+--+--+--+\n```", + "type": "string", + "const": "Scrolling" + } ] }, "FloatingLayerBehaviour": { + "description": "Floating layer behaviour when a new window is opened", "oneOf": [ { "description": "Tile new windows (unless they match a float rule or float override is active)", @@ -1279,20 +1675,22 @@ ] }, "FocusFollowsMouseImplementation": { + "description": "Focus follows mouse implementation", "oneOf": [ { - "description": "A custom FFM implementation (slightly more CPU-intensive)", + "description": "Custom FFM implementation (slightly more CPU-intensive)", "type": "string", "const": "Komorebi" }, { - "description": "The native (legacy) Windows FFM implementation", + "description": "Native (legacy) Windows FFM implementation", "type": "string", "const": "Windows" } ] }, "GridLayoutOptions": { + "description": "Options for the Grid layout", "type": "object", "properties": { "rows": { @@ -1307,10 +1705,12 @@ ] }, "Hex": { + "description": "Colour represented as a Hex string", "type": "string", "format": "color-hex" }, "HidingBehaviour": { + "description": "Window hiding behaviour", "oneOf": [ { "description": "END OF LIFE FEATURE: Use the `SW_HIDE` flag to hide windows when switching workspaces (has issues with Electron apps)", @@ -1331,15 +1731,19 @@ ] }, "IdWithIdentifier": { + "description": "Rule for matching applications", "type": "object", "properties": { "id": { + "description": "Target identifier", "type": "string" }, "kind": { + "description": "Kind of identifier to target", "$ref": "#/$defs/ApplicationIdentifier" }, "matching_strategy": { + "description": "Matching strategy to use", "anyOf": [ { "$ref": "#/$defs/MatchingStrategy" @@ -1356,6 +1760,7 @@ ] }, "KomorebiTheme": { + "description": "Komorebi theme", "oneOf": [ { "description": "A theme from catppuccin-egui", @@ -1774,6 +2179,7 @@ ] }, "LayoutOptions": { + "description": "Options for specific layouts", "type": "object", "properties": { "grid": { @@ -1801,11 +2207,14 @@ } }, "MatchingRule": { + "description": "Rule for matching applications", "anyOf": [ { + "description": "Simple matching rule which must evaluate to true", "$ref": "#/$defs/IdWithIdentifier" }, { + "description": "Composite matching rule where all conditions must evaluate to true", "type": "array", "items": { "$ref": "#/$defs/IdWithIdentifier" @@ -1814,21 +2223,62 @@ ] }, "MatchingStrategy": { - "type": "string", - "enum": [ - "Legacy", - "Equals", - "StartsWith", - "EndsWith", - "Contains", - "Regex", - "DoesNotEndWith", - "DoesNotStartWith", - "DoesNotEqual", - "DoesNotContain" + "description": "Strategy for matching identifiers", + "oneOf": [ + { + "description": "Should not be used, only kept for backward compatibility", + "type": "string", + "const": "Legacy" + }, + { + "description": "Equals", + "type": "string", + "const": "Equals" + }, + { + "description": "Starts With", + "type": "string", + "const": "StartsWith" + }, + { + "description": "Ends With", + "type": "string", + "const": "EndsWith" + }, + { + "description": "Contains", + "type": "string", + "const": "Contains" + }, + { + "description": "Regex", + "type": "string", + "const": "Regex" + }, + { + "description": "Does not end with", + "type": "string", + "const": "DoesNotEndWith" + }, + { + "description": "Does not start with", + "type": "string", + "const": "DoesNotStartWith" + }, + { + "description": "Does not equal", + "type": "string", + "const": "DoesNotEqual" + }, + { + "description": "Does not contain", + "type": "string", + "const": "DoesNotContain" + } ] }, "MonitorConfig": { + "description": "Monitor configuration", "type": "object", "properties": { "container_padding": { @@ -1914,6 +2364,7 @@ ] }, "MoveBehaviour": { + "description": "Move behaviour when the operation works across a monitor boundary", "oneOf": [ { "description": "Swap the window container with the window container at the edge of the adjacent monitor", @@ -1933,14 +2384,15 @@ ] }, "OperationBehaviour": { + "description": "Operation behaviour for temporarily unmanaged and floating windows", "oneOf": [ { - "description": "Process komorebic commands on temporarily unmanaged/floated windows", + "description": "Process commands on temporarily unmanaged/floated windows", "type": "string", "const": "Op" }, { - "description": "Ignore komorebic commands on temporarily unmanaged/floated windows", + "description": "Ignore commands on temporarily unmanaged/floated windows", "type": "string", "const": "NoOp" } @@ -1950,21 +2402,26 @@ "type": "string" }, "PerAnimationPrefixConfig": { + "description": "Animation configuration\n\nThis can be either global:\n```json\n{\n \"enabled\": true,\n \"style\": \"EaseInSine\",\n \"fps\": 60,\n \"duration\": 250\n}\n```\n\nOr scoped by an animation kind prefix:\n```json\n{\n \"movement\": {\n \"enabled\": true,\n \"style\": \"EaseInSine\",\n \"fps\": 60,\n \"duration\": 250\n }\n}\n```", "anyOf": [ { + "description": "Animation configuration prefixed for a specific animation kind", "type": "object", "additionalProperties": { "type": "boolean" } }, { + "description": "Animation configuration for all animation kinds", "type": "boolean" } ] }, "PerAnimationPrefixConfig2": { + "description": "Animation configuration\n\nThis can be either global:\n```json\n{\n \"enabled\": true,\n \"style\": \"EaseInSine\",\n \"fps\": 60,\n \"duration\": 250\n}\n```\n\nOr scoped by an animation kind prefix:\n```json\n{\n \"movement\": {\n \"enabled\": true,\n \"style\": \"EaseInSine\",\n \"fps\": 60,\n \"duration\": 250\n }\n}\n```", "anyOf": [ { + "description": "Animation configuration prefixed for a specific animation kind", "type": "object", "additionalProperties": { "type": "integer", @@ -1973,6 +2430,7 @@ } }, { + "description": "Animation configuration for all animation kinds", "type": "integer", "format": "uint64", "minimum": 0 @@ -1980,19 +2438,23 @@ ] }, "PerAnimationPrefixConfig3": { + "description": "Animation configuration\n\nThis can be either global:\n```json\n{\n \"enabled\": true,\n \"style\": \"EaseInSine\",\n \"fps\": 60,\n \"duration\": 250\n}\n```\n\nOr scoped by an animation kind prefix:\n```json\n{\n \"movement\": {\n \"enabled\": true,\n \"style\": \"EaseInSine\",\n \"fps\": 60,\n \"duration\": 250\n }\n}\n```", "anyOf": [ { + "description": "Animation configuration prefixed for a specific animation kind", "type": "object", "additionalProperties": { "$ref": "#/$defs/AnimationStyle" } }, { + "description": "Animation configuration for all animation kinds", "$ref": "#/$defs/AnimationStyle" } ] }, "Placement": { + "description": "Placement behaviour for floating windows", "oneOf": [ { "description": "Does not change the size or position of the window", @@ -2012,6 +2474,7 @@ ] }, "PredefinedAspectRatio": { + "description": "Predefined aspect ratio", "oneOf": [ { "description": "21:9", @@ -2031,25 +2494,26 @@ ] }, "Rect": { + "description": "Rectangle dimensions", "type": "object", "properties": { "bottom": { - "description": "The bottom point in a Win32 Rect", + "description": "Height of the rectangle (from the top point)", "type": "integer", "format": "int32" }, "left": { - "description": "The left point in a Win32 Rect", + "description": "Left point of the rectangle", "type": "integer", "format": "int32" }, "right": { - "description": "The right point in a Win32 Rect", + "description": "Width of the recentangle (from the left point)", "type": "integer", "format": "int32" }, "top": { - "description": "The top point in a Win32 Rect", + "description": "Top point of the rectangle", "type": "integer", "format": "int32" } @@ -2062,6 +2526,7 @@ ] }, "Rgb": { + "description": "Colour represented as RGB", "type": "object", "properties": { "b": { @@ -2090,6 +2555,7 @@ ] }, "ScrollingLayoutOptions": { + "description": "Options for the Scrolling layout", "type": "object", "properties": { "center_focused_column": { @@ -2111,6 +2577,7 @@ ] }, "StackbarConfig": { + "description": "Stackbar configuration", "type": "object", "properties": { "height": { @@ -2158,21 +2625,42 @@ } }, "StackbarLabel": { - "type": "string", - "enum": [ - "Process", - "Title" + "description": "Starbar label", + "oneOf": [ + { + "description": "Process name", + "type": "string", + "const": "Process" + }, + { + "description": "Window title", + "type": "string", + "const": "Title" + } ] }, "StackbarMode": { - "type": "string", - "enum": [ - "Always", - "Never", - "OnStack" + "description": "Stackbar mode", + "oneOf": [ + { + "description": "Always show", + "type": "string", + "const": "Always" + }, + { + "description": "Never show", + "type": "string", + "const": "Never" + }, + { + "description": "Show on stack", + "type": "string", + "const": "OnStack" + } ] }, "TabsConfig": { + "description": "Stackbar tabs configuration", "type": "object", "properties": { "background": { @@ -2234,6 +2722,7 @@ } }, "ThemeOptions": { + "description": "Theme options", "type": "object", "properties": { "bar_accent": { @@ -2371,13 +2860,22 @@ } }, "ThemeVariant": { - "type": "string", - "enum": [ - "Dark", - "Light" + "description": "Theme variant", + "oneOf": [ + { + "description": "Dark variant", + "type": "string", + "const": "Dark" + }, + { + "description": "Light variant", + "type": "string", + "const": "Light" + } ] }, "Wallpaper": { + "description": "Wallpaper configuration", "type": "object", "properties": { "generate_theme": { @@ -2410,6 +2908,7 @@ ] }, "WindowContainerBehaviour": { + "description": "Window container behaviour when a new window is opened", "oneOf": [ { "description": "Create a new container for each new window", @@ -2424,13 +2923,22 @@ ] }, "WindowHandlingBehaviour": { - "type": "string", - "enum": [ - "Sync", - "Async" + "description": "Window handling behaviour", + "oneOf": [ + { + "description": "Synchronous", + "type": "string", + "const": "Sync" + }, + { + "description": "Asynchronous", + "type": "string", + "const": "Async" + } ] }, "WorkspaceConfig": { + "description": "Workspace configuration", "type": "object", "properties": { "apply_window_based_work_area_offset": { @@ -2635,12 +3143,28 @@ ] }, "ZOrder": { - "type": "string", - "enum": [ - "Top", - "NoTopMost", - "Bottom", - "TopMost" + "description": "Z Order (https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos)", + "oneOf": [ + { + "description": "HWND_TOP\n\nPlaces the window at the top of the Z order.", + "type": "string", + "const": "Top" + }, + { + "description": "HWND_NOTOPMOST\n\nPlaces the window above all non-topmost windows (that is, behind all topmost windows).\nThis flag has no effect if the window is already a non-topmost window.", + "type": "string", + "const": "NoTopMost" + }, + { + "description": "HWND_BOTTOM\n\nPlaces the window at the bottom of the Z order. If the hWnd parameter identifies a topmost window,\nthe window loses its topmost status and is placed at the bottom of all other windows.", + "type": "string", + "const": "Bottom" + }, + { + "description": "HWND_TOPMOST\n\nPlaces the window above all non-topmost windows.\nThe window maintains its topmost position even when it is deactivated.", + "type": "string", + "const": "TopMost" + } ] } }