diff --git a/docs/cli/check.md b/docs/cli/check.md index 54d3cbbeb..f10b2cb38 100644 --- a/docs/cli/check.md +++ b/docs/cli/check.md @@ -3,9 +3,12 @@ ``` Check komorebi configuration and related files for common errors -Usage: komorebic.exe check +Usage: komorebic.exe check [OPTIONS] Options: + -k, --komorebi-config + Path to a static configuration JSON file + -h, --help Print help diff --git a/docs/cli/stackbar-mode.md b/docs/cli/stackbar-mode.md new file mode 100644 index 000000000..cb8801792 --- /dev/null +++ b/docs/cli/stackbar-mode.md @@ -0,0 +1,18 @@ +# stackbar-mode + +``` +Set the stackbar mode + +Usage: komorebic.exe stackbar-mode + +Arguments: + + Desired stackbar mode + + [possible values: always, never, on-stack] + +Options: + -h, --help + Print help + +``` diff --git a/komorebi/src/core/mod.rs b/komorebi/src/core/mod.rs index 68025d514..d9bd230c2 100644 --- a/komorebi/src/core/mod.rs +++ b/komorebi/src/core/mod.rs @@ -238,7 +238,9 @@ pub struct SubscribeOptions { pub filter_state_changes: bool, } -#[derive(Debug, Copy, Clone, Eq, PartialEq, Display, Serialize, Deserialize, JsonSchema)] +#[derive( + Debug, Copy, Clone, Eq, PartialEq, Display, Serialize, Deserialize, JsonSchema, ValueEnum, +)] pub enum StackbarMode { Always, Never, diff --git a/komorebi/src/process_command.rs b/komorebi/src/process_command.rs index 7053127a6..fc42105e0 100644 --- a/komorebi/src/process_command.rs +++ b/komorebi/src/process_command.rs @@ -1662,6 +1662,7 @@ impl WindowManager { } SocketMessage::StackbarMode(mode) => { STACKBAR_MODE.store(mode); + self.retile_all(true)?; } SocketMessage::StackbarLabel(label) => { STACKBAR_LABEL.store(label); diff --git a/komorebic/src/main.rs b/komorebic/src/main.rs index eec27bf3f..dcc641ef9 100644 --- a/komorebic/src/main.rs +++ b/komorebic/src/main.rs @@ -721,6 +721,13 @@ struct BorderImplementation { style: komorebi_client::BorderImplementation, } +#[derive(Parser)] +struct StackbarMode { + /// Desired stackbar mode + #[clap(value_enum)] + mode: komorebi_client::StackbarMode, +} + #[derive(Parser)] struct Animation { #[clap(value_enum)] @@ -1368,6 +1375,9 @@ enum SubCommand { /// Set the border implementation #[clap(arg_required_else_help = true)] BorderImplementation(BorderImplementation), + /// Set the stackbar mode + #[clap(arg_required_else_help = true)] + StackbarMode(StackbarMode), /// Enable or disable transparency for unfocused windows #[clap(arg_required_else_help = true)] Transparency(Transparency), @@ -2785,6 +2795,9 @@ if (Get-Command Get-CimInstance -ErrorAction SilentlyContinue) { SubCommand::BorderImplementation(arg) => { send_message(&SocketMessage::BorderImplementation(arg.style))?; } + SubCommand::StackbarMode(arg) => { + send_message(&SocketMessage::StackbarMode(arg.mode))?; + } SubCommand::Transparency(arg) => { send_message(&SocketMessage::Transparency(arg.boolean_state.into()))?; } diff --git a/mkdocs.yml b/mkdocs.yml index 4b8c1b72b..8988e36ab 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -212,6 +212,7 @@ nav: - cli/border-offset.md - cli/border-style.md - cli/border-implementation.md + - cli/stackbar-mode.md - cli/transparency.md - cli/transparency-alpha.md - cli/toggle-transparency.md diff --git a/schema.bar.json b/schema.bar.json index 1404dbe5d..a8663130e 100644 --- a/schema.bar.json +++ b/schema.bar.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "title": "KomobarConfig", - "description": "The `komorebi.bar.json` configuration file reference for `v0.1.32`", + "description": "The `komorebi.bar.json` configuration file reference for `v0.1.33`", "type": "object", "required": [ "left_widgets", diff --git a/schema.json b/schema.json index 80bd8a645..adecf401d 100644 --- a/schema.json +++ b/schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "title": "StaticConfig", - "description": "The `komorebi.json` static configuration file reference for `v0.1.32`", + "description": "The `komorebi.json` static configuration file reference for `v0.1.33`", "type": "object", "properties": { "animation": { @@ -1227,6 +1227,15 @@ "RightMainVerticalStack" ] }, + "layout_flip": { + "description": "Specify an axis on which to flip the selected layout (default: None)", + "type": "string", + "enum": [ + "Horizontal", + "Vertical", + "HorizontalAndVertical" + ] + }, "layout_rules": { "description": "Layout rules (default: None)", "type": "object",