From 6a194f7e6c79993d6e5e76513d3c55ac296fdeb0 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 26 Sep 2025 16:41:38 -0700 Subject: [PATCH] docs(mkdocs): initial outline of documentation website --- docs/cli/data-directory.md | 2 +- docs/cli/eager-focus.md | 2 +- docs/cli/log.md | 2 +- docs/cli/start.md | 2 +- docs/cli/stop.md | 2 +- docs/cli/toggle-workspace-float-override.md | 3 +- docs/design.md | 42 ++++ docs/example-configurations.md | 166 +++++++++++++++ docs/index.md | 76 +++++++ docs/installation.md | 60 ++++++ docs/known-issues.md | 8 + docs/usage/focusing-windows.md | 46 ++++ docs/usage/focusing-workspaces.md | 59 +++++ .../usage/moving-windows-across-workspaces.md | 59 +++++ docs/usage/moving-windows.md | 50 +++++ docs/usage/stacking-windows.md | 52 +++++ komorebic/src/main.rs | 10 +- mkdocs.yml | 201 ++++++++++++++++++ shell.nix | 19 +- 19 files changed, 842 insertions(+), 19 deletions(-) create mode 100644 docs/design.md create mode 100644 docs/example-configurations.md create mode 100644 docs/index.md create mode 100644 docs/installation.md create mode 100644 docs/known-issues.md create mode 100644 docs/usage/focusing-windows.md create mode 100644 docs/usage/focusing-workspaces.md create mode 100644 docs/usage/moving-windows-across-workspaces.md create mode 100644 docs/usage/moving-windows.md create mode 100644 docs/usage/stacking-windows.md create mode 100644 mkdocs.yml diff --git a/docs/cli/data-directory.md b/docs/cli/data-directory.md index fc9d9336..9a1303f8 100644 --- a/docs/cli/data-directory.md +++ b/docs/cli/data-directory.md @@ -1,7 +1,7 @@ # data-directory ``` -Show the path to komorebi's data directory in %LOCALAPPDATA% +Show the path to komorebi's data directory in $HOME/Library/Application Support Usage: komorebic data-directory diff --git a/docs/cli/eager-focus.md b/docs/cli/eager-focus.md index 271a0ac5..77cdf664 100644 --- a/docs/cli/eager-focus.md +++ b/docs/cli/eager-focus.md @@ -1,7 +1,7 @@ # eager-focus ``` -Focus the first managed window matching the given exe +Focus the first managed window matching the given executable Usage: komorebic eager-focus diff --git a/docs/cli/log.md b/docs/cli/log.md index 522aa763..bb66ab70 100644 --- a/docs/cli/log.md +++ b/docs/cli/log.md @@ -1,7 +1,7 @@ # log ``` -Tail komorebi.exe's process logs (cancel with Ctrl-C) +Tail komorebi's process logs (cancel with Ctrl-C) Usage: komorebic log diff --git a/docs/cli/start.md b/docs/cli/start.md index 28714e45..144873d1 100644 --- a/docs/cli/start.md +++ b/docs/cli/start.md @@ -1,7 +1,7 @@ # start ``` -Start komorebi.exe as a background process +Start komorebi as a background process Usage: komorebic start [OPTIONS] diff --git a/docs/cli/stop.md b/docs/cli/stop.md index e35f982c..29a02cd4 100644 --- a/docs/cli/stop.md +++ b/docs/cli/stop.md @@ -1,7 +1,7 @@ # stop ``` -Stop the komorebi.exe process and restore all hidden windows +Stop the komorebi process and restore all hidden windows Usage: komorebic stop diff --git a/docs/cli/toggle-workspace-float-override.md b/docs/cli/toggle-workspace-float-override.md index 497630a9..a1a5b9ff 100644 --- a/docs/cli/toggle-workspace-float-override.md +++ b/docs/cli/toggle-workspace-float-override.md @@ -1,8 +1,7 @@ # toggle-workspace-float-override ``` -Enable or disable float override, which makes it so every new window opens in floating mode, for the currently focused workspace. If there was no override value set for the workspace previously it takes the opposite of the -global value +Enable or disable float override, which makes it so every new window opens in floating mode, for the currently focused workspace. If there was no override value set for the workspace previously it takes the opposite of the global value Usage: komorebic toggle-workspace-float-override diff --git a/docs/design.md b/docs/design.md new file mode 100644 index 00000000..f8ede5a9 --- /dev/null +++ b/docs/design.md @@ -0,0 +1,42 @@ +--- +hide: + - toc +--- + +## Description + +_komorebi_ only responds to operating system events and the messages it receives +on a dedicated socket. + +_komorebic_ is a CLI that writes messages on _komorebi_'s socket. + +_komorebi_ doesn't handle any keyboard or mouse inputs; a third party program ( +e.g. +[skhd](https://github.com/koekeishiya/skhd)) is needed in order to translate +keyboard and mouse events to _komorebic_ commands. + +This architecture, popularised by [_bspwm_](https://github.com/baskerville/bspwm) on Linux and +[_yabai_](https://github.com/koekeishiya/yabai) on macOS, is outlined as follows: + + +``` + PROCESS SOCKET +skhd --------> komorebic <------> komorebi +``` + +## Data Model + +_komorebi_ holds a list of physical monitors. + +A monitor is just a rectangle of the available work area which contains one or more virtual workspaces. + +A workspace holds a list of containers. + +A container is just a rectangle where one or more application windows can be displayed. + +This means that: + +- Every monitor has its own collection of virtual workspaces +- Workspaces only know about containers and their dimensions, not about individual application windows +- Every application window must belong to a container, even if that container only contains one application window +- Many application windows can be stacked and cycled through in the same container within a workspace diff --git a/docs/example-configurations.md b/docs/example-configurations.md new file mode 100644 index 00000000..f1562ac8 --- /dev/null +++ b/docs/example-configurations.md @@ -0,0 +1,166 @@ +`komorebi`, and tiling window managers in general, are very complex pieces of +software. + +In an attempt to reduce some of the initial configuration burden for users who +are looking to try out the software for the first time, example configurations +are provided and updated whenever appropriate. + +## Downloading example configurations + +Run the following command to download example configuration files for +`komorebi` and `skhd`. Pay attention to the output of the command to see where +the example files have been downloaded. For most new users this will be in the +`$HOME/.config/komorebi` directory. + +```bash +komorebic quickstart +``` + +With the example configurations downloaded, you can now start `komorebi` + +```powershell +komorebic start +``` + +## komorebi.json + +The example window manager configuration sets some sane defaults and provides +seven preconfigured workspaces on the primary monitor each with a different +layout. + +```json +{% include "./komorebi.example.json" %} +``` + +### Application-specific configuration + +There is a [community-maintained +repository](https://github.com/LGUG2Z/komorebi-application-specific-configuration) +of "apps behaving badly" that do not conform to macOS application development +guidelines and behave erratically when used with `komorebi` without additional +configuration. + +You can always download the latest version of these configurations by running +`komorebic fetch-asc`. The output of this command will also provide a line that +you can paste into `komorebi.json` to ensure that the window manager looks for +the file in the correction location. + +When installing and running `komorebi` for the first time, the `komorebic +quickstart` command will usually download this file to the `$HOME/.config/komorebi` +directory. + +### Padding + +While you can set the workspace padding (the space between the outer edges of +the windows and the bezel of your monitor) and the container padding (the space +between each of the tiled windows) for each workspace independently, you can +also set a default for both of these values that will apply to all workspaces +using `default_workspace_padding` and `default_container_padding`. + +### Layouts + +#### BSP + +``` ++-------+-----+ +| | | +| +--+--+ +| | |--| ++-------+--+--+ +``` + +#### Vertical Stack + +``` ++-------+-----+ +| | | +| +-----+ +| | | ++-------+-----+ +``` + +#### RightMainVerticalStack + +``` ++-----+-------+ +| | | ++-----+ | +| | | ++-----+-------+ +``` + +#### Horizontal Stack + +``` ++------+------+ +| | +|------+------+ +| | | ++------+------+ +``` + +#### Columns + +``` ++--+--+--+--+ +| | | | | +| | | | | +| | | | | ++--+--+--+--+ +``` + +#### Rows + +If you have a vertical monitor, I recommend using this layout. + +``` ++-----------+ +|-----------| +|-----------| +|-----------| ++-----------+ +``` + +#### Ultrawide Vertical Stack + +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! + +The `grid` layout does not support resizing windows tiles. + +``` ++-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+ +| | | | | | | | | | | | | | | +| | | | | | | | | | | | | +---+ ++-----+-----+ | +---+---+ +---+---+---+ +---+---| | +| | | | | | | | | | | | | +---+ +| | | | | | | | | | | | | | | ++-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+ + 4 windows 5 windows 6 windows 7 windows +``` + +## skhdrc + +`skhd` is a fairly basic piece of software with a simple configuration format: +key bindings go to the left of the colon, and shell commands go to the right of the +colon. + +``` +{% include "./skhdrc.sample" %} +``` + +You can try the example komorebi configuration by running +`skhd --config ~/.config/komorebi/skhdrc`. \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..9992b799 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,76 @@ +![screenshot](https://user-images.githubusercontent.com/13164844/184027064-f5a6cec2-2865-4d65-a549-a1f1da589abf.png) + +## Overview + +`komorebi` is a tiling window manager that works as an extension to macOS. + +`komorebi` allows you to control application windows, virtual workspaces and +display monitors with a CLI which can be used with third-party software such as +[skhd](https://github.com/koekeishiya/skhd) to set user-defined +keyboard shortcuts. + +`komorebi` aims to make _as few modifications as possible_ to the operating +system and desktop environment by default. Users are free to make such +modifications in their own configuration files for `komorebi`, but these will +always remain opt-in and off-by-default. + +## Community + +There is a [Discord server](https://discord.gg/mGkn66PHkx) available for +`komorebi`-related discussion, help, troubleshooting etc. + +There is a [YouTube +channel](https://www.youtube.com/channel/UCeai3-do-9O4MNy9_xjO6mg) where I post +`komorebi` development videos, feature previews and release overviews. Subscribing +to the channel (which is monetized as part of the YouTube Partner Program) and +watching videos is a really simple and passive way to contribute financially to +the development and maintenance of `komorebi`. + +There is an [Awesome List](https://github.com/LGUG2Z/awesome-komorebi) which +showcases the many awesome projects that exist in the `komorebi` ecosystem. + +## Licensing for Personal Use + +`komorebi` is licensed under the [Komorebi 2.0.0 license](https://github.com/LGUG2Z/komorebi-license), which is a fork +of the [PolyForm Strict 1.0.0 license](https://polyformproject.org/licenses/strict/1.0.0). On a high level this means +that you are free to do whatever you want with `komorebi` for personal use other than redistribution, or distribution of +new works (i.e. hard-forks) based on the software. + +Anyone is free to make their own fork of `komorebi` with changes intended either for personal use or for integration +back upstream via pull requests. + +The [Komorebi 2.0.0 License](https://github.com/LGUG2Z/komorebi-license) does not permit any kind of commercial use ( +i.e. using `komorebi` at work). + +## Sponsorship for Personal Use + +`komorebi` is a free and educational source project, and one that encourages you +to make charitable donations if you find the software to be useful and have the +financial means. + +I encourage you to make a charitable donation to the [Palestine Children's +Relief Fund](https://pcrf1.app.neoncrm.com/forms/gaza-recovery) or to contribute +to a [Gaza Funds campaign](https://gazafunds.com) before you consider sponsoring +me on GitHub. + +[GitHub Sponsors is enabled for this +project](https://github.com/sponsors/LGUG2Z). Sponsors can claim custom roles on +the Discord server, get shout-outs at the end of _komorebi_-related videos on +YouTube, and gain the ability to submit feature requests on the issue tracker. + +If you would like to tip or sponsor the project but are unable to use GitHub +Sponsors, you may also sponsor through [Ko-fi](https://ko-fi.com/lgug2z), or +make an anonymous Bitcoin donation to `bc1qv73wzspc77k46uty4vp85x8sdp24mphvm58f6q`. + +## Licensing for Commercial Use + +A dedicated Individual Commercial Use License is available for those who want to +use `komorebi` at work. + +The Individual Commerical Use License adds “Commercial Use” as a “Permitted Use” +for the licensed individual only, for the duration of a valid paid license +subscription only. All provisions and restrictions enumerated in the [Komorebi +License](https://github.com/LGUG2Z/komorebi-license) continue to apply. + +More information, pricing and purchase links for Individual Commercial Use +Licenses [can be found here](https://lgug2z.com/software/komorebi). diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 00000000..14075266 --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,60 @@ +# Getting started + +`komorebi` is a tiling window manager for macOS that is comprised of two +main binaries, `komorebi`, which contains the window manager itself, +and `komorebic`, which is the main way to send commands to the tiling +window manager. + +It is important to note that neither `komorebi` nor `komorebic` handle +key bindings, because `komorebi` is a tiling window manager and not a hotkey +daemon. + +This getting started guide suggests the installation of +[`skhd`](https://github.com/koekeishiya/skhd) to allow you to bind `komorebic` +commands to hotkeys to allow you to communicate with the tiling window manager +using keyboard shortcuts. + +## Installation + +At this time users must compile `komorebi` from source. + +## Building from source + +Make sure you have installed [`rustup`](https://rustup.rs), and a stable `rust` +compiler toolchain. + +Clone the git repository, enter the directory, and build the following binaries: + +```powershell +cargo +stable install --path komorebi --locked --target-dir ~/.cargo/bin +cargo +stable install --path komorebic --locked --target-dir ~/.cargo/bin +``` + +If the binaries have been built and added to your `$PATH` correctly, you should +see some output when running `komorebi --help` and `komorebic --help` + +## Granting Permissions + +Users will need to manually add `~/.cargo/bin/komorebi` to: + +* Settings -> Privacy & Security -> Accessibility +* Settings -> Privacy & Security -> Screen & System Audio Recording + +Once komorebi is installed, and these permissions have been granted, proceed to +get the [example +configurations](example-configurations.md). + +## Uninstallation + +Before uninstalling, first run `komorebic stop` to make sure that +the `komorebi` processes have been stopped. + +Finally, you can run the following commands to clean up files created by the +`quickstart` command and any other runtime files: + +```powershell +rm -rf ~/.cargo/bin/komorebi +rm -rf ~/.cargo/bin/komorebic +rm -rf ~/.config/komorebi +rm -rf "~/Library/Application Support/komorebi" +``` diff --git a/docs/known-issues.md b/docs/known-issues.md new file mode 100644 index 00000000..fc89afcc --- /dev/null +++ b/docs/known-issues.md @@ -0,0 +1,8 @@ +* The flow for manually adding Accessibility and Screen Recording permissions + sucks +* Mouse resizing is not implemented +* Swapping window containers via mouse dragging is not implemented +* Fullscreen windows aren't supported (and probably won't be) and break the + state (probably shouldn't) +* Application hiding isn't supported (and probably won't be) and breaks the + state (probably shouldn't) diff --git a/docs/usage/focusing-windows.md b/docs/usage/focusing-windows.md new file mode 100644 index 00000000..f16d9cf8 --- /dev/null +++ b/docs/usage/focusing-windows.md @@ -0,0 +1,46 @@ +# Focusing Windows + +Windows can be focused in a direction (left, down, up, right) using the [`komorebic focus`](../cli/focus.md) command. + +``` +# example showing how you might bind this command + +alt + h : komorebic focus left +alt + j : komorebic focus down +alt + k : komorebic focus up +alt + l : komorebic focus right +``` + +Windows can be focused in a cycle direction (previous, next) using the [`komorebic cycle-focus`](../cli/cycle-focus.md) +command. + +``` +# example showing you might bind this command + +alt + shift + oem_4 : komorebic cycle-focus previous # oem_4 is [ +alt + shift + oem_6 : komorebic cycle-focus next # oem_6 is ] +``` + +It is possible to attempt to focus the first window, on any workspace, matching an exe using the [ +`komorebic eager-focus`](../cli/eager-focus.md) command. + +``` +# example showing how you might bind this command + +win + 1 : komorebic eager-focus firefox.exe +``` + +The window at the largest tile can be focused using the [`komorebic promote-focus`](../cli/promote-focus.md) command. + +``` +# example showing how you might bind this command + +alt + return : komorebic promote-focus +``` + +The behaviour when attempting to call `komorebic focus` when at the left or right edge of a monitor is determined by +the [`cross_boundary_behaviour`](https://komorebi.lgug2z.com/schema#cross_boundary_behaviour) configuration option. + +When set to `Workspace`, the next workspace on the same monitor will be focused. + +When set to `Monitor`, the focused workspace on the next monitor in the given direction will be focused. \ No newline at end of file diff --git a/docs/usage/focusing-workspaces.md b/docs/usage/focusing-workspaces.md new file mode 100644 index 00000000..26bceaef --- /dev/null +++ b/docs/usage/focusing-workspaces.md @@ -0,0 +1,59 @@ +# Focusing Workspaces + +Workspaces on the focused monitor can be focused by their index using the [ +`komorebic focus-workspace`](../cli/focus-workspace.md) command. + +If this command is called with an index for a workspace which does not exist, that workspace, and all workspace indexes +required to get to that workspace, will be created. + +``` +# example showing how you might bind this command + +alt + 1 : komorebic focus-workspace 0 +alt + 2 : komorebic focus-workspace 1 +alt + 3 : komorebic focus-workspace 2 +``` + +Workspaces on the focused monitor can be focused in a cycle direction (previous, next) using the [ +`komorebic cycle-workspace`](../cli/cycle-workspace.md) command. + +``` +# example showing how you might bind this command + +alt + shift + oem_4 : komorebic cycle-workspace previous # oem_4 is [ +alt + shift + oem_6 : komorebic cycle-workspace next # oem_6 is ] +``` + +Workspaces on other monitors can be focused by both the monitor index and the workspace index using the [ +`komorebic focus-monitor-workspace`](../cli/focus-monitor-workspace.md) command. + +``` +# example showing how you might bind this command + +alt + 1 : komorebic focus-monitor-workspace 0 0 +alt + 2 : komorebic focus-monitor-workspace 0 1 +alt + 3 : komorebic focus-monitor-workspace 1 0 +``` + +Workspaces on any monitor can be focused by their name (given that all workspace names across all monitors are unique) +using the [`komorebic focus-named-workspace`](../cli/focus-named-workspace.md) command. + +``` +# example showing how you might bind this command + +alt + c : komorebic focus-named-workspace coding +``` + +Workspaces on all monitors can be set to the same index (emulating single workspaces which span across all monitors) +using the [`komorebic focus-workspaces`](../cli/focus-workspaces.md) command. + +``` +# example showing how you might bind this command + +alt + 1 : komorebic focus-workspaces 0 +alt + 2 : komorebic focus-workspaces 1 +alt + 3 : komorebic focus-workspaces 2 +``` + +The last focused workspace on the focused monitor can be re-focused using the [ +`komorebic focus-last-workspace`](../cli/focus-last-workspace.md) command. diff --git a/docs/usage/moving-windows-across-workspaces.md b/docs/usage/moving-windows-across-workspaces.md new file mode 100644 index 00000000..31249517 --- /dev/null +++ b/docs/usage/moving-windows-across-workspaces.md @@ -0,0 +1,59 @@ +# Moving Windows Across Workspaces + +Windows can be moved to another workspace on the focused monitor using the [ +`komorebic move-to-workspace`](../cli/move-to-workspace.md) command. This command will also move your focus to the +target workspace. + +``` +# example showing how you might bind this command + +alt + shift + 1 : komorebic move-to-workspace 0 +alt + shift + 2 : komorebic move-to-workspace 1 +alt + shift + 3 : komorebic move-to-workspace 2 +``` + +Windows can be sent to another workspace on the focused monitor using the [ +`komorebic send-to-workspace`](../cli/send-to-workspace.md) command. This command will keep your focus on the origin +workspace. + +``` +# example showing how you might bind this command + +alt + shift + 1 : komorebic send-to-workspace 0 +alt + shift + 2 : komorebic send-to-workspace 1 +alt + shift + 3 : komorebic send-to-workspace 2 +``` + +Windows can be moved to another workspace on the focused monitor in a cycle direction (previous, next) using the [ +`komorebic cycle-move-to-workspace`](../cli/cycle-move-to-workspace.md) command. This command will also move your focus +to the target workspace. + +``` +# example showing how you might bind this command + +alt + shift + oem_4 : komorebic cycle-move-to-workspace previous # oem_4 is [ +alt + shift + oem_6 : komorebic cycle-move-to-workspace next # oem_6 is ] +``` + +Windows can be sent to another workspace on the focused monitor in a cycle direction (previous, next) using the [ +`komorebic cycle-move-to-workspace`](../cli/cycle-move-to-workspace.md) command. This command will keep your focus on +the origin workspace. + +``` +# example showing how you might bind this command + +alt + shift + oem_4 : komorebic cycle-send-to-workspace previous # oem_4 is [ +alt + shift + oem_6 : komorebic cycle-send-to-workspace next # oem_6 is ] +``` + +Windows can be moved or sent to the focused workspace on a another monitor using the [ +`komorebic move-to-monitor`](../cli/move-to-monitor.md) and [`komorebic send-to-monitor`](../cli/send-to-monitor.md) +commands. + +Windows can be moved or sent to the focused workspace on a monitor in a cycle direction (previous, next) using the [ +`komorebic cycle-move-to-monitor`](../cli/cycle-move-to-monitor.md) and [ +`komorebic cycle-send-to-monitor`](../cli/cycle-send-to-monitor.md) commands. + +Windows can be moved or sent to a named workspace on any monitor (given that all workspace names across all monitors are +unique) using the [`komorebic move-to-named-workspace`](../cli/move-to-named-workspace.md) and [ +`komorebic send-to-named-workspace`](../cli/send-to-named-workspace.md) commands diff --git a/docs/usage/moving-windows.md b/docs/usage/moving-windows.md new file mode 100644 index 00000000..1ca5e816 --- /dev/null +++ b/docs/usage/moving-windows.md @@ -0,0 +1,50 @@ +# Moving Windows + +Windows can be moved in a direction (left, down, up, right) using the [`komorebic move`](../cli/move.md) command. + +``` +# example showing how you might bind this command + +alt + shift + h : komorebic move left +alt + shift + j : komorebic move down +alt + shift + k : komorebic move up +alt + shift + l : komorebic move right +``` + +Windows can be moved in a cycle direction (previous, next) using the [`komorebic cycle-move`](../cli/cycle-move.md) +command. + +``` +# example showing how you might bind this command + +alt + shift + oem_4 : komorebic cycle-move previous # oem_4 is [ +alt + shift + oem_6 : komorebic cycle-move next # oem_6 is ] +``` + +The focused window can be moved to the largest tile using the [`komorebic promote`](../cli/promote.md) command. + +``` +# example showing how you might bind this command + +alt + shift + return : komorebic promote +``` + +The behaviour when attempting to call `komorebic move` when at the left or right edge of a monitor is determined by +the [`cross_boundary_behaviour`](https://komorebi.lgug2z.com/schema#cross_boundary_behaviour) configuration option. + +When set to `Workspace`, the focused window will be moved to the next workspace on the focused monitor in the given +direction + +When set to `Monitor`, the focused window will be moved to the focused workspace on the next monitor in the given +direction. + +The behaviour when calling `komorebic move` with `cross_boundary_behaviour` set to `Monitor` can be further refined with +the [`cross_monitor_move_behaviour`](https://komorebi.lgug2z.com/schema#cross_monitor_move_behaviour) configuration +option. + +When set to `Swap`, the focused window will be swapped with the window at the corresponding edge of the adjacent monitor + +When set to `Insert`, the focused window will be inserted into the focused workspace on the adjacent monitor. + +When set to `NoOp`, the focused window will not be moved across a monitor boundary, though focusing across monitor +boundaries will continue to function. \ No newline at end of file diff --git a/docs/usage/stacking-windows.md b/docs/usage/stacking-windows.md new file mode 100644 index 00000000..7d689981 --- /dev/null +++ b/docs/usage/stacking-windows.md @@ -0,0 +1,52 @@ +# Stacking Windows + +Windows can be stacked in a direction (left, down, up, right) using the [`komorebic stack`](../cli/stack.md) command. + +``` +# example showing how you might bind this command + +alt + left : komorebic stack left +alt + down : komorebic stack down +alt + up : komorebic stack up +alt + right : komorebic stack right +``` + +Windows can be popped from a stack using the [`komorebic unstack`](../cli/unstack.md) command. + +``` +# example showing how you might bind this command + +alt + oem_1 : komorebic unstack # oem_1 is ; +``` + +Windows in a stack can be focused in a cycle direction (previous, next) using the [ +`komorebic cycle-stack`](../cli/cycle-stack.md) command. + +``` +# example showing how you might bind this command + +alt + oem_4 : komorebic cycle-stack previous # oem_4 is [ +alt + oem_6 : komorebic cycle-stack next # oem_6 is ] +``` + +Windows in a stack can have their positions in the stack moved in a cycle direction (previous, next) using the [ +`komorebic cycle-stack-index`](../cli/cycle-stack-index.md) command. + +``` +# example showing how you might bind this command + +alt + shift + oem_4 : komorebic cycle-stack-index previous # oem_4 is [ +alt + shift + oem_6 : komorebic cycle-stack-index next # oem_6 is ] +``` + +Windows in a stack can be focused by their index in the stack using the [ +`komorebic focus-stack-window`](../cli/focus-stack-window.md) command. + +All windows on the focused workspace can be combined into a single stack using the [ +`komorebic stack-all`](../cli/stack-all.md) command. + +All windows in a focused stack can be popped using the [`komorebic unstack-all`](../cli/unstack-all.md) command. + +It is possible to tell the window manager to stack the next opened window on top of the currently focused window by +using the [ +`komorebic toggle-workspace-window-container-behaviour`](../cli/toggle-workspace-window-container-behaviour.md) command. diff --git a/komorebic/src/main.rs b/komorebic/src/main.rs index 57bd0e70..5e219889 100644 --- a/komorebic/src/main.rs +++ b/komorebic/src/main.rs @@ -623,9 +623,9 @@ enum SubCommand { Docgen, /// Gather example configurations for a new-user quickstart Quickstart, - /// Start komorebi.exe as a background process + /// Start komorebi as a background process Start(Start), - /// Stop the komorebi.exe process and restore all hidden windows + /// Stop the komorebi process and restore all hidden windows Stop(Stop), // /// Kill background processes started by komorebic // Kill(Kill), @@ -641,7 +641,7 @@ enum SubCommand { // /// Show the path to whkdrc // #[clap(alias = "whkd")] // Whkdrc, - /// Show the path to komorebi's data directory in %LOCALAPPDATA% + /// Show the path to komorebi's data directory in $HOME/Library/Application Support #[clap(alias = "datadir")] DataDirectory, /// Show a JSON representation of the current window manager state @@ -674,7 +674,7 @@ enum SubCommand { // #[clap(arg_required_else_help = true)] // #[clap(alias = "unsubscribe")] // UnsubscribePipe(UnsubscribePipe), - /// Tail komorebi.exe's process logs (cancel with Ctrl-C) + /// Tail komorebi's process logs (cancel with Ctrl-C) Log, /// Quicksave the current resize layout dimensions #[clap(alias = "quick-save")] @@ -708,7 +708,7 @@ enum SubCommand { /// Move the focused window in the specified cycle direction #[clap(arg_required_else_help = true)] CycleMove(CycleMove), - /// Focus the first managed window matching the given exe + /// Focus the first managed window matching the given executable #[clap(arg_required_else_help = true)] EagerFocus(EagerFocus), /// Stack the focused window in the specified direction diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..5c01fb8e --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,201 @@ +copyright: Copyright © 2020-Present LGUG2Z +use_directory_urls: false +site_name: Komorebi for macOS +site_description: The Tiling Window Manager for macOS +repo_url: https://github.com/LGUG2Z/komorebi-for-mac +repo_name: LGUG2Z/komorebi-for-mac +docs_dir: docs +theme: + name: material + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + primary: deep purple + accent: deep purple + toggle: + icon: material/weather-sunny + name: Switch to dark mode + + # Palette toggle for dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: deep purple + accent: purple + toggle: + icon: material/weather-night + name: Switch to light mode + features: + - content.action.edit + - content.action.view + - content.code.copy + - content.tabs.link + - navigation.footer + - navigation.indexes + - navigation.sections + - navigation.tabs + - navigation.top + - navigation.tracking + - search.highlight + - search.share + - search.suggest + - toc.follow +markdown_extensions: + - admonition + - pymdownx.highlight + - pymdownx.superfences +plugins: + - macros + - search + +nav: + - Komorebi: + - About: + - index.md + - design.md + - Getting started: + - Installation: installation.md + - Example configurations: example-configurations.md + - Known issues: known-issues.md + - Usage: + - usage/focusing-windows.md + - usage/moving-windows.md + - usage/stacking-windows.md + - usage/focusing-workspaces.md + - usage/moving-windows-across-workspaces.md + - Komorebi Configuration: + - Schema: https://komorebi.lgug2z.com/schema + - CLI reference: + - cli/quickstart.md + - cli/start.md + - cli/stop.md + - cli/configuration.md + - cli/data-directory.md + - cli/state.md + - cli/global-state.md + - cli/visible-windows.md + - cli/monitor-information.md + - cli/query.md + - cli/subscribe-socket.md + - cli/unsubscribe-socket.md + - cli/log.md + - cli/quick-save-resize.md + - cli/quick-load-resize.md + - cli/save-resize.md + - cli/load-resize.md + - cli/focus.md + - cli/move.md + - cli/minimize.md + - cli/close.md + - cli/cycle-focus.md + - cli/cycle-move.md + - cli/eager-focus.md + - cli/stack.md + - cli/unstack.md + - cli/cycle-stack.md + - cli/cycle-stack-index.md + - cli/focus-stack-window.md + - cli/stack-all.md + - cli/unstack-all.md + - cli/resize-edge.md + - cli/resize-axis.md + - cli/move-to-monitor.md + - cli/cycle-move-to-monitor.md + - cli/move-to-workspace.md + - cli/move-to-named-workspace.md + - cli/cycle-move-to-workspace.md + - cli/send-to-monitor.md + - cli/cycle-send-to-monitor.md + - cli/send-to-workspace.md + - cli/send-to-named-workspace.md + - cli/cycle-send-to-workspace.md + - cli/send-to-monitor-workspace.md + - cli/move-to-monitor-workspace.md + - cli/send-to-last-workspace.md + - cli/move-to-last-workspace.md + - cli/focus-monitor.md + - cli/focus-monitor-at-cursor.md + - cli/focus-last-workspace.md + - cli/focus-workspace.md + - cli/focus-workspaces.md + - cli/focus-monitor-workspace.md + - cli/focus-named-workspace.md + - cli/close-workspace.md + - cli/cycle-monitor.md + - cli/cycle-workspace.md + - cli/cycle-empty-workspace.md + - cli/move-workspace-to-monitor.md + - cli/cycle-move-workspace-to-monitor.md + - cli/swap-workspaces-with-monitor.md + - cli/new-workspace.md + - cli/resize-delta.md + - cli/global-work-area-offset.md + - cli/monitor-work-area-offset.md + - cli/workspace-work-area-offset.md + - cli/toggle-window-based-work-area-offset.md + - cli/focused-workspace-container-padding.md + - cli/focused-workspace-padding.md + - cli/adjust-container-padding.md + - cli/adjust-workspace-padding.md + - cli/change-layout.md + - cli/cycle-layout.md + - cli/scrolling-layout-columns.md + - cli/flip-layout.md + - cli/promote.md + - cli/promote-focus.md + - cli/promote-window.md + - cli/retile.md + - cli/display-index-preference.md + - cli/ensure-workspaces.md + - cli/ensure-named-workspaces.md + - cli/container-padding.md + - cli/named-workspace-container-padding.md + - cli/workspace-padding.md + - cli/named-workspace-padding.md + - cli/workspace-layout.md + - cli/named-workspace-layout.md + - cli/workspace-layout-rule.md + - cli/named-workspace-layout-rule.md + - cli/clear-workspace-layout-rules.md + - cli/clear-named-workspace-layout-rules.md + - cli/workspace-tiling.md + - cli/named-workspace-tiling.md + - cli/workspace-name.md + - cli/toggle-window-container-behaviour.md + - cli/toggle-float-override.md + - cli/toggle-workspace-window-container-behaviour.md + - cli/toggle-workspace-float-override.md + - cli/toggle-workspace-layer.md + - cli/toggle-pause.md + - cli/toggle-tiling.md + - cli/toggle-float.md + - cli/toggle-monocle.md + - cli/toggle-lock.md + - cli/manage.md + - cli/unmanage.md + - cli/replace-configuration.md + - cli/cross-monitor-move-behaviour.md + - cli/toggle-cross-monitor-move-behaviour.md + - cli/unmanaged-window-operation-behaviour.md + - cli/session-float-rule.md + - cli/session-float-rules.md + - cli/clear-session-float-rules.md + - cli/ignore-rule.md + - cli/manage-rule.md + - cli/initial-workspace-rule.md + - cli/initial-named-workspace-rule.md + - cli/workspace-rule.md + - cli/named-workspace-rule.md + - cli/clear-workspace-rules.md + - cli/clear-named-workspace-rules.md + - cli/clear-all-workspace-rules.md + - cli/enforce-workspace-rules.md + - cli/mouse-follows-focus.md + - cli/toggle-mouse-follows-focus.md + - cli/fetch-app-specific-configuration.md + - cli/application-specific-configuration-schema.md + - cli/notification-schema.md + - cli/socket-schema.md + - cli/static-config-schema.md + - cli/generate-static-config.md + - cli/enable-autostart.md + - cli/disable-autostart.md \ No newline at end of file diff --git a/shell.nix b/shell.nix index 110aaf91..f0cd3500 100644 --- a/shell.nix +++ b/shell.nix @@ -6,13 +6,18 @@ with pkgs; RUST_BACKTRACE = "full"; buildInputs = [ - just - gcc - libiconv - cargo-deny - jq - prettier - cargo-udeps alejandra + cargo-deny + cargo-udeps + gcc + jq + just + libiconv + prettier + + python311Packages.mkdocs-material + python311Packages.mkdocs-macros + python311Packages.setuptools + python311Packages.json-schema-for-humans ]; }