diff --git a/justfile b/justfile index 95a29fd1..dbcb3e0a 100644 --- a/justfile +++ b/justfile @@ -44,9 +44,11 @@ trace target $RUST_LOG="komorebi=trace": deadlock $RUST_LOG="trace": cargo run --bin komorebi --locked --no-default-features --features deadlock_detection -docgen: - cargo run --package komorebic -- docgen - find docs/cli -type f -exec sed -i.bak 's/Usage: /Usage: komorebic /g' {} \; && find docs/cli -name "*.bak" -delete +docgen starlight: + rm {{starlight}}/src/data/cli/macos/*.md + cargo run --package komorebic -- docgen --output {{starlight}}/src/data/cli/macos + schemars-docgen ./schema.json --output {{starlight}}/src/content/docs/reference/komorebi-macos.mdx --format mdx --title "komorebi.json (macOS)" --description "komorebi for Mac configuration schema reference" + schemars-docgen ./schema.bar.json --output {{starlight}}/src/content/docs/reference/bar-macos.mdx --format mdx --title "komorebi.bar.json (macOS)" --description "komorebi-bar for Mac configuration schema reference" jsonschema: cargo run --package komorebic -- static-config-schema > schema.json diff --git a/komorebi/src/static_config.rs b/komorebi/src/static_config.rs index 9ed40607..64d3595d 100644 --- a/komorebi/src/static_config.rs +++ b/komorebi/src/static_config.rs @@ -489,21 +489,21 @@ pub struct StaticConfig { /// Identify applications which should be managed as floating windows #[serde(skip_serializing_if = "Option::is_none")] pub floating_applications: Option>, - /// Identify border overflow applications - #[serde(skip_serializing_if = "Option::is_none")] - pub border_overflow_applications: Option>, - /// Identify tray and multi-window applications - #[serde(skip_serializing_if = "Option::is_none")] - pub tray_and_multi_window_applications: Option>, - /// Identify applications that have the WS_EX_LAYERED extended window style - #[serde(skip_serializing_if = "Option::is_none")] - pub layered_applications: Option>, - /// Identify applications that send EVENT_OBJECT_NAMECHANGE on launch (very rare) - #[serde(skip_serializing_if = "Option::is_none")] - pub object_name_change_applications: Option>, - /// Do not process EVENT_OBJECT_NAMECHANGE events as Show events for identified applications matching these title regexes - #[serde(skip_serializing_if = "Option::is_none")] - pub object_name_change_title_ignore_list: Option>, + // /// Identify border overflow applications + // #[serde(skip_serializing_if = "Option::is_none")] + // pub border_overflow_applications: Option>, + // /// Identify tray and multi-window applications + // #[serde(skip_serializing_if = "Option::is_none")] + // pub tray_and_multi_window_applications: Option>, + // /// Identify applications that have the WS_EX_LAYERED extended window style + // #[serde(skip_serializing_if = "Option::is_none")] + // pub layered_applications: Option>, + // /// Identify applications that send EVENT_OBJECT_NAMECHANGE on launch (very rare) + // #[serde(skip_serializing_if = "Option::is_none")] + // pub object_name_change_applications: Option>, + // /// Do not process EVENT_OBJECT_NAMECHANGE events as Show events for identified applications matching these title regexes + // #[serde(skip_serializing_if = "Option::is_none")] + // pub object_name_change_title_ignore_list: Option>, // /// Set monitor index preferences // #[serde(skip_serializing_if = "Option::is_none")] // pub monitor_index_preferences: Option>, @@ -794,11 +794,11 @@ impl From<&WindowManager> for StaticConfig { ignore_rules: None, floating_applications: None, manage_rules: None, - border_overflow_applications: None, - tray_and_multi_window_applications: None, - layered_applications: None, - object_name_change_applications: None, - object_name_change_title_ignore_list: None, + // border_overflow_applications: None, + // tray_and_multi_window_applications: None, + // layered_applications: None, + // object_name_change_applications: None, + // object_name_change_title_ignore_list: None, // monitor_index_preferences: Option::from(MONITOR_INDEX_PREFERENCES.lock().clone()), display_index_preferences: Option::from(DISPLAY_INDEX_PREFERENCES.read().clone()), // stackbar: None, diff --git a/komorebic/src/main.rs b/komorebic/src/main.rs index 3958e141..b19882da 100644 --- a/komorebic/src/main.rs +++ b/komorebic/src/main.rs @@ -327,11 +327,11 @@ macro_rules! gen_application_target_subcommand_args { gen_application_target_subcommand_args! { IgnoreRule, ManageRule, - IdentifyTrayApplication, - IdentifyLayeredApplication, - IdentifyObjectNameChangeApplication, - IdentifyBorderOverflowApplication, - RemoveTitleBar, + // IdentifyTrayApplication, + // IdentifyLayeredApplication, + // IdentifyObjectNameChangeApplication, + // IdentifyBorderOverflowApplication, + // RemoveTitleBar, } #[derive(Parser)] diff --git a/nix/komorebi-bar-options.nix b/nix/komorebi-bar-options.nix index 1a18c75f..6322ae9f 100644 --- a/nix/komorebi-bar-options.nix +++ b/nix/komorebi-bar-options.nix @@ -935,87 +935,6 @@ in ] ); }; - colours = lib.mkOption { - type = ( - lib.types.nullOr ( - lib.types.submodule { - options = { - base_00 = lib.mkOption { - type = colour; - }; - base_01 = lib.mkOption { - type = colour; - }; - base_02 = lib.mkOption { - type = colour; - }; - base_03 = lib.mkOption { - type = colour; - }; - base_04 = lib.mkOption { - type = colour; - }; - base_05 = lib.mkOption { - type = colour; - }; - base_06 = lib.mkOption { - type = colour; - }; - base_07 = lib.mkOption { - type = colour; - }; - base_08 = lib.mkOption { - type = colour; - }; - base_09 = lib.mkOption { - type = colour; - }; - base_0a = lib.mkOption { - type = colour; - }; - base_0b = lib.mkOption { - type = colour; - }; - base_0c = lib.mkOption { - type = colour; - }; - base_0d = lib.mkOption { - type = colour; - }; - base_0e = lib.mkOption { - type = colour; - }; - base_0f = lib.mkOption { - type = colour; - }; - }; - } - ) - ); - default = null; - }; - auto_select_text = lib.mkOption { - type = ( - lib.types.nullOr ( - lib.types.oneOf [ - (lib.types.nullOr catppuccinValue) - (lib.types.nullOr base16Value) - ] - ) - ); - default = null; - }; - accent = lib.mkOption { - type = ( - lib.types.nullOr ( - lib.types.oneOf [ - (lib.types.nullOr catppuccinValue) - (lib.types.nullOr base16Value) - ] - ) - ); - default = null; - }; auto_select_fill = lib.mkOption { type = ( lib.types.nullOr ( @@ -1313,6 +1232,87 @@ in ); default = null; }; + accent = lib.mkOption { + type = ( + lib.types.nullOr ( + lib.types.oneOf [ + (lib.types.nullOr catppuccinValue) + (lib.types.nullOr base16Value) + ] + ) + ); + default = null; + }; + colours = lib.mkOption { + type = ( + lib.types.nullOr ( + lib.types.submodule { + options = { + base_00 = lib.mkOption { + type = colour; + }; + base_01 = lib.mkOption { + type = colour; + }; + base_02 = lib.mkOption { + type = colour; + }; + base_03 = lib.mkOption { + type = colour; + }; + base_04 = lib.mkOption { + type = colour; + }; + base_05 = lib.mkOption { + type = colour; + }; + base_06 = lib.mkOption { + type = colour; + }; + base_07 = lib.mkOption { + type = colour; + }; + base_08 = lib.mkOption { + type = colour; + }; + base_09 = lib.mkOption { + type = colour; + }; + base_0a = lib.mkOption { + type = colour; + }; + base_0b = lib.mkOption { + type = colour; + }; + base_0c = lib.mkOption { + type = colour; + }; + base_0d = lib.mkOption { + type = colour; + }; + base_0e = lib.mkOption { + type = colour; + }; + base_0f = lib.mkOption { + type = colour; + }; + }; + } + ) + ); + default = null; + }; + auto_select_text = lib.mkOption { + type = ( + lib.types.nullOr ( + lib.types.oneOf [ + (lib.types.nullOr catppuccinValue) + (lib.types.nullOr base16Value) + ] + ) + ); + default = null; + }; }; } ) diff --git a/nix/komorebi-options.nix b/nix/komorebi-options.nix index 79f4f1ed..09597a53 100644 --- a/nix/komorebi-options.nix +++ b/nix/komorebi-options.nix @@ -404,11 +404,6 @@ in default = null; description = "Offset of window borders (default: 5)"; }; - border_overflow_applications = lib.mkOption { - type = (lib.types.nullOr (lib.types.listOf matchingRule)); - default = null; - description = "Identify border overflow applications"; - }; border_radius = lib.mkOption { type = (lib.types.nullOr lib.types.int); default = null; @@ -515,11 +510,6 @@ in default = null; description = "Individual window floating rules"; }; - layered_applications = lib.mkOption { - type = (lib.types.nullOr (lib.types.listOf matchingRule)); - default = null; - description = "Identify applications that have the WS_EX_LAYERED extended window style"; - }; manage_rules = lib.mkOption { type = (lib.types.nullOr (lib.types.listOf matchingRule)); default = null; @@ -738,16 +728,6 @@ in default = null; description = "Enable or disable mouse follows focus (default: true)"; }; - object_name_change_applications = lib.mkOption { - type = (lib.types.nullOr (lib.types.listOf matchingRule)); - default = null; - description = "Identify applications that send EVENT_OBJECT_NAMECHANGE on launch (very rare)"; - }; - object_name_change_title_ignore_list = lib.mkOption { - type = (lib.types.nullOr (lib.types.listOf lib.types.str)); - default = null; - description = "Do not process EVENT_OBJECT_NAMECHANGE events as Show events for identified applications matching these title regexes"; - }; resize_delta = lib.mkOption { type = (lib.types.nullOr lib.types.int); default = null; @@ -767,17 +747,6 @@ in ] ); }; - unfocused_locked_border = lib.mkOption { - type = ( - lib.types.nullOr ( - lib.types.oneOf [ - (lib.types.nullOr catppuccinValue) - (lib.types.nullOr base16Value) - ] - ) - ); - default = null; - }; colours = lib.mkOption { type = ( lib.types.nullOr ( @@ -848,17 +817,6 @@ in ); default = null; }; - unfocused_border = lib.mkOption { - type = ( - lib.types.nullOr ( - lib.types.oneOf [ - (lib.types.nullOr catppuccinValue) - (lib.types.nullOr base16Value) - ] - ) - ); - default = null; - }; stack_border = lib.mkOption { type = ( lib.types.nullOr ( @@ -870,7 +828,29 @@ in ); default = null; }; - single_border = lib.mkOption { + monocle_border = lib.mkOption { + type = ( + lib.types.nullOr ( + lib.types.oneOf [ + (lib.types.nullOr catppuccinValue) + (lib.types.nullOr base16Value) + ] + ) + ); + default = null; + }; + unfocused_border = lib.mkOption { + type = ( + lib.types.nullOr ( + lib.types.oneOf [ + (lib.types.nullOr catppuccinValue) + (lib.types.nullOr base16Value) + ] + ) + ); + default = null; + }; + unfocused_locked_border = lib.mkOption { type = ( lib.types.nullOr ( lib.types.oneOf [ @@ -892,6 +872,17 @@ in ); default = null; }; + single_border = lib.mkOption { + type = ( + lib.types.nullOr ( + lib.types.oneOf [ + (lib.types.nullOr catppuccinValue) + (lib.types.nullOr base16Value) + ] + ) + ); + default = null; + }; name = lib.mkOption { type = ( lib.types.nullOr ( @@ -1178,17 +1169,6 @@ in ); default = null; }; - monocle_border = lib.mkOption { - type = ( - lib.types.nullOr ( - lib.types.oneOf [ - (lib.types.nullOr catppuccinValue) - (lib.types.nullOr base16Value) - ] - ) - ); - default = null; - }; }; } ) @@ -1201,11 +1181,6 @@ in default = null; description = "Determines the placement of a new window when toggling to float (default: CenterAndResize)"; }; - tray_and_multi_window_applications = lib.mkOption { - type = (lib.types.nullOr (lib.types.listOf matchingRule)); - default = null; - description = "Identify tray and multi-window applications"; - }; unmanaged_window_operation_behaviour = lib.mkOption { type = ( lib.types.nullOr ( diff --git a/schema.json b/schema.json index 03c8b77c..bc09baef 100644 --- a/schema.json +++ b/schema.json @@ -52,16 +52,6 @@ ], "format": "int32" }, - "border_overflow_applications": { - "description": "Identify border overflow applications", - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/$defs/MatchingRule" - } - }, "border_radius": { "description": "Radius of window borders (default: 10)", "type": [ @@ -222,16 +212,6 @@ "$ref": "#/$defs/MatchingRule" } }, - "layered_applications": { - "description": "Identify applications that have the WS_EX_LAYERED extended window style", - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/$defs/MatchingRule" - } - }, "manage_rules": { "description": "Individual window force-manage rules", "type": [ @@ -259,26 +239,6 @@ "null" ] }, - "object_name_change_applications": { - "description": "Identify applications that send EVENT_OBJECT_NAMECHANGE on launch (very rare)", - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/$defs/MatchingRule" - } - }, - "object_name_change_title_ignore_list": { - "description": "Do not process EVENT_OBJECT_NAMECHANGE events as Show events for identified applications matching these title regexes", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, "resize_delta": { "description": "Delta to resize windows by (default 50)", "type": [ @@ -309,16 +269,6 @@ } ] }, - "tray_and_multi_window_applications": { - "description": "Identify tray and multi-window applications", - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/$defs/MatchingRule" - } - }, "unmanaged_window_operation_behaviour": { "description": "Determine what happens when commands are sent while an unmanaged window is in the foreground (default: Op)", "anyOf": [