diff --git a/docs/cli/alt-focus-hack.md b/docs/cli/alt-focus-hack.md index 01d08ba4..8d2867bd 100644 --- a/docs/cli/alt-focus-hack.md +++ b/docs/cli/alt-focus-hack.md @@ -1,7 +1,7 @@ # alt-focus-hack ``` -Enable or disable a hack simulating ALT key presses to ensure focus changes succeed +DEPRECATED since v0.1.22 Usage: komorebic.exe alt-focus-hack diff --git a/docs/cli/change-layout.md b/docs/cli/change-layout.md index 0d79d194..e4e08239 100644 --- a/docs/cli/change-layout.md +++ b/docs/cli/change-layout.md @@ -7,7 +7,7 @@ Usage: komorebic.exe change-layout Arguments: - [possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack] + [possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack, grid] Options: -h, --help diff --git a/docs/cli/check.md b/docs/cli/check.md index bfb9947f..54d3cbbe 100644 --- a/docs/cli/check.md +++ b/docs/cli/check.md @@ -1,7 +1,7 @@ # check ``` -Output various important komorebi-related environment values +Check komorebi configuration and related files for common errors Usage: komorebic.exe check diff --git a/docs/cli/configuration.md b/docs/cli/configuration.md new file mode 100644 index 00000000..2f92c73c --- /dev/null +++ b/docs/cli/configuration.md @@ -0,0 +1,12 @@ +# configuration + +``` +Show the path to komorebi.json + +Usage: komorebic.exe configuration + +Options: + -h, --help + Print help + +``` diff --git a/docs/cli/docgen.md b/docs/cli/docgen.md deleted file mode 100644 index 0333d8b2..00000000 --- a/docs/cli/docgen.md +++ /dev/null @@ -1,10 +0,0 @@ -# docgen - -``` -Usage: komorebic.exe docgen - -Options: - -h, --help - Print help - -``` diff --git a/docs/cli/named-workspace-layout-rule.md b/docs/cli/named-workspace-layout-rule.md index 407f70cd..d374640d 100644 --- a/docs/cli/named-workspace-layout-rule.md +++ b/docs/cli/named-workspace-layout-rule.md @@ -13,7 +13,7 @@ Arguments: The number of window containers on-screen required to trigger this layout rule - [possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack] + [possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack, grid] Options: -h, --help diff --git a/docs/cli/named-workspace-layout.md b/docs/cli/named-workspace-layout.md index aad5b396..cdef4111 100644 --- a/docs/cli/named-workspace-layout.md +++ b/docs/cli/named-workspace-layout.md @@ -10,7 +10,7 @@ Arguments: Target workspace name - [possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack] + [possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack, grid] Options: -h, --help diff --git a/docs/cli/subscribe.md b/docs/cli/subscribe-pipe.md similarity index 60% rename from docs/cli/subscribe.md rename to docs/cli/subscribe-pipe.md index 04eccac4..1319626f 100644 --- a/docs/cli/subscribe.md +++ b/docs/cli/subscribe-pipe.md @@ -1,9 +1,9 @@ -# subscribe +# subscribe-pipe ``` -Subscribe to komorebi events +Subscribe to komorebi events using a Named Pipe -Usage: komorebic.exe subscribe +Usage: komorebic.exe subscribe-pipe Arguments: diff --git a/docs/cli/subscribe-socket.md b/docs/cli/subscribe-socket.md new file mode 100644 index 00000000..7a06d542 --- /dev/null +++ b/docs/cli/subscribe-socket.md @@ -0,0 +1,16 @@ +# subscribe-socket + +``` +Subscribe to komorebi events using a Unix Domain Socket + +Usage: komorebic.exe subscribe-socket + +Arguments: + + Name of the socket to send event notifications to + +Options: + -h, --help + Print help + +``` diff --git a/docs/cli/unsubscribe.md b/docs/cli/unsubscribe-pipe.md similarity index 75% rename from docs/cli/unsubscribe.md rename to docs/cli/unsubscribe-pipe.md index a10b1e90..da3be64f 100644 --- a/docs/cli/unsubscribe.md +++ b/docs/cli/unsubscribe-pipe.md @@ -1,9 +1,9 @@ -# unsubscribe +# unsubscribe-pipe ``` Unsubscribe from komorebi events -Usage: komorebic.exe unsubscribe +Usage: komorebic.exe unsubscribe-pipe Arguments: diff --git a/docs/cli/unsubscribe-socket.md b/docs/cli/unsubscribe-socket.md new file mode 100644 index 00000000..e1d04024 --- /dev/null +++ b/docs/cli/unsubscribe-socket.md @@ -0,0 +1,16 @@ +# unsubscribe-socket + +``` +Unsubscribe from komorebi events + +Usage: komorebic.exe unsubscribe-socket + +Arguments: + + Name of the socket to stop sending event notifications to + +Options: + -h, --help + Print help + +``` diff --git a/docs/cli/whkdrc.md b/docs/cli/whkdrc.md new file mode 100644 index 00000000..fd7c1946 --- /dev/null +++ b/docs/cli/whkdrc.md @@ -0,0 +1,12 @@ +# whkdrc + +``` +Show the path to whkdrc + +Usage: komorebic.exe whkdrc + +Options: + -h, --help + Print help + +``` diff --git a/docs/cli/workspace-layout-rule.md b/docs/cli/workspace-layout-rule.md index 7fe7b7a8..2917fc5c 100644 --- a/docs/cli/workspace-layout-rule.md +++ b/docs/cli/workspace-layout-rule.md @@ -16,7 +16,7 @@ Arguments: The number of window containers on-screen required to trigger this layout rule - [possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack] + [possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack, grid] Options: -h, --help diff --git a/docs/cli/workspace-layout.md b/docs/cli/workspace-layout.md index a5d05cd8..4c5e7858 100644 --- a/docs/cli/workspace-layout.md +++ b/docs/cli/workspace-layout.md @@ -13,7 +13,7 @@ Arguments: Workspace index on the specified monitor (zero-indexed) - [possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack] + [possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack, grid] Options: -h, --help diff --git a/docs/common-workflows/remove-gaps.md b/docs/common-workflows/remove-gaps.md index d8a1ad54..2169377f 100644 --- a/docs/common-workflows/remove-gaps.md +++ b/docs/common-workflows/remove-gaps.md @@ -2,13 +2,15 @@ If you would like to remove all gaps by default, both between windows themselves, and between the monitor edges and the windows, you can set the -following two configuration options to `0` in the `komorebi.json` configuration -file. +following configuration options to `0` and `-1` in the `komorebi.json` +configuration file. ```json { "default_workspace_padding": 0, - "default_container_padding": 0 + "default_container_padding": 0, + "border_width": 0, + "border_offset": -1 } ``` diff --git a/docs/example-configurations.md b/docs/example-configurations.md index cc007e9f..725f0302 100644 --- a/docs/example-configurations.md +++ b/docs/example-configurations.md @@ -16,6 +16,12 @@ the example files have been downloaded. For most new users this will be in the komorebic quickstart ``` +With the example configurations downloaded, you can now start `komorebi` and `whkd. + +```powershell +komorebic start --whkd +``` + ## komorebi.json The example window manager configuration sets some sane defaults and provides @@ -139,6 +145,19 @@ If you have an ultrawide monitor, I recommend using this layout. +-----+-----------+-----+ ``` +### Grid +If you like the `grid` layout in [LeftWM](https://github.com/leftwm/leftwm-layouts) this is almost exactly the same! + +``` ++-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+ +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | +---+ ++-----+-----+ | +---+---+ +---+---+---+ +---+---| | +| | | | | | | | | | | | | +---+ +| | | | | | | | | | | | | | | ++-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+ + 4 windows 5 windows 6 windows 7 windows +``` ## whkdrc diff --git a/docs/release/v0-1-22.md b/docs/release/v0-1-22.md new file mode 100644 index 00000000..873b0d63 --- /dev/null +++ b/docs/release/v0-1-22.md @@ -0,0 +1,56 @@ +In addition to the [changelog](https://github.com/LGUG2Z/komorebi/releases/tag/v0.1.21) of new features and fixes, +please note the following changes from `v0.1.21` to adjust your configuration files accordingly. + +## tl;dr + +The way windows are sized and drawn has been improved to remove the need to manually specify and remove invisible +borders for applications that overflow them. If you use the active window border, the first time you launch `v0.1.22` +you may end up with a _huge_ border due to these changes. + +`active_window_border_width` and `active_window_border_offset` have been renamed to `border_width` and `border_offset` +as they now also apply outside the context of the active window border. + +```json +{ + "active_window_border": true, + "border_width": 8, + "border_offset": -1 +} +``` + +Users of the active window border should start from these settings and read the notes below before making further +adjustments. + +## Changes to `active_window_border`, and window sizing: + +- The border no longer creates a second drop-shadow around the active window +- Windows are now sized to fill the layout region entirely, ignoring window decorations such as drop shadows +- Border offset now starts exactly at the paint edge of the window on all sides +- Windows are sized such that the border offset and border width are taken into account + +## Recommended patterns + +### Gapless + +- Disable "transparency effects" Personalization > Colors +- Set the following settings in `komorebi.json`: +```json +{ + "default_workspace_padding": 0, + "default_container_padding": 0, + "border_offset": -1, + "border_width": 0 +} +``` + +### 1px border + +A 1px border is drawn around the window edge. Users may see a gap for a single pixel, if the system theme has a +transparent edge - this is the windows themed edge, and is not present for all applications. + +```json + { + "border_offset": 0, + "border_width": 1 +} +``` \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 643b12a0..df4aa484 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -62,17 +62,23 @@ nav: - common-workflows/custom-layouts.md - common-workflows/dynamic-layout-switching.md # - common-workflows/autohotkey.md + - Release notes: + - release/v0-1-22.md - Configuration reference: https://komorebi.lgug2z.com/schema - CLI reference: - cli/quickstart.md - cli/start.md - cli/stop.md - cli/check.md + - cli/configuration.md + - cli/whkdrc.md - cli/state.md - cli/visible-windows.md - cli/query.md - - cli/subscribe.md - - cli/unsubscribe.md + - cli/subscribe-socket.md + - cli/unsubscribe-socket.md + - cli/subscribe-pipe.md + - cli/unsubscribe-pipe.md - cli/log.md - cli/quick-save-resize.md - cli/quick-load-resize.md @@ -160,7 +166,6 @@ nav: - cli/reload-configuration.md - cli/watch-configuration.md - cli/complete-configuration.md - - cli/alt-focus-hack.md - cli/window-hiding-behaviour.md - cli/cross-monitor-move-behaviour.md - cli/toggle-cross-monitor-move-behaviour.md diff --git a/schema.json b/schema.json index 54b492e5..d448507c 100644 --- a/schema.json +++ b/schema.json @@ -133,20 +133,15 @@ } } }, - "active_window_border_offset": { - "description": "Offset of the active window border (default: -1)", - "type": "integer", - "format": "int32" - }, - "active_window_border_width": { - "description": "Width of the active window border (default: 8)", - "type": "integer", - "format": "int32" - }, "app_specific_configuration_path": { "description": "Path to applications.yaml from komorebi-application-specific-configurations (default: None)", "type": "string" }, + "border_offset": { + "description": "Offset of the window border (default: -1)", + "type": "integer", + "format": "int32" + }, "border_overflow_applications": { "description": "Identify border overflow applications", "type": "array", @@ -163,10 +158,10 @@ "kind": { "type": "string", "enum": [ - "Path", "Exe", "Class", - "Title" + "Title", + "Path" ] }, "matching_strategy": { @@ -183,6 +178,11 @@ } } }, + "border_width": { + "description": "Width of the window border (default: 8)", + "type": "integer", + "format": "int32" + }, "cross_monitor_move_behaviour": { "description": "Determine what happens when a window is moved across a monitor boundary (default: Swap)", "oneOf": [ @@ -235,10 +235,10 @@ "kind": { "type": "string", "enum": [ - "Path", "Exe", "Class", - "Title" + "Title", + "Path" ] }, "matching_strategy": { @@ -307,7 +307,7 @@ } }, "invisible_borders": { - "description": "Dimensions of Windows' own invisible borders; don't set these yourself unless you are told to", + "description": "DEPRECATED from v0.1.22: no longer required", "type": "object", "required": [ "bottom", @@ -354,10 +354,10 @@ "kind": { "type": "string", "enum": [ - "Path", "Exe", "Class", - "Title" + "Title", + "Path" ] }, "matching_strategy": { @@ -390,10 +390,10 @@ "kind": { "type": "string", "enum": [ - "Path", "Exe", "Class", - "Title" + "Title", + "Path" ] }, "matching_strategy": { @@ -527,10 +527,10 @@ "kind": { "type": "string", "enum": [ - "Path", "Exe", "Class", - "Title" + "Title", + "Path" ] }, "matching_strategy": { @@ -556,7 +556,8 @@ "Rows", "VerticalStack", "HorizontalStack", - "UltrawideVerticalStack" + "UltrawideVerticalStack", + "Grid" ] }, "layout_rules": { @@ -570,7 +571,8 @@ "Rows", "VerticalStack", "HorizontalStack", - "UltrawideVerticalStack" + "UltrawideVerticalStack", + "Grid" ] } }, @@ -599,10 +601,10 @@ "kind": { "type": "string", "enum": [ - "Path", "Exe", "Class", - "Title" + "Title", + "Path" ] }, "matching_strategy": { @@ -645,10 +647,10 @@ "kind": { "type": "string", "enum": [ - "Path", "Exe", "Class", - "Title" + "Title", + "Path" ] }, "matching_strategy": { @@ -670,6 +672,143 @@ "type": "integer", "format": "int32" }, + "stackbar": { + "type": "object", + "properties": { + "height": { + "type": "integer", + "format": "int32" + }, + "mode": { + "type": "string", + "enum": [ + "Always", + "Never", + "OnStack" + ] + }, + "tabs": { + "type": "object", + "properties": { + "background": { + "anyOf": [ + { + "description": "Colour represented as RGB", + "type": "object", + "required": [ + "b", + "g", + "r" + ], + "properties": { + "b": { + "description": "Blue", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "g": { + "description": "Green", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "r": { + "description": "Red", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + }, + { + "description": "Colour represented as Hex", + "type": "string" + } + ] + }, + "focused_text": { + "anyOf": [ + { + "description": "Colour represented as RGB", + "type": "object", + "required": [ + "b", + "g", + "r" + ], + "properties": { + "b": { + "description": "Blue", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "g": { + "description": "Green", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "r": { + "description": "Red", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + }, + { + "description": "Colour represented as Hex", + "type": "string" + } + ] + }, + "unfocused_text": { + "anyOf": [ + { + "description": "Colour represented as RGB", + "type": "object", + "required": [ + "b", + "g", + "r" + ], + "properties": { + "b": { + "description": "Blue", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "g": { + "description": "Green", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "r": { + "description": "Red", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + }, + { + "description": "Colour represented as Hex", + "type": "string" + } + ] + }, + "width": { + "type": "integer", + "format": "int32" + } + } + } + } + }, "tray_and_multi_window_applications": { "description": "Identify tray and multi-window applications", "type": "array", @@ -688,7 +827,8 @@ "enum": [ "Exe", "Class", - "Title" + "Title", + "Path" ] }, "matching_strategy": {