-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(mkdocs): add common workflows section
- Loading branch information
Showing
13 changed files
with
379 additions
and
574 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Active Window Border | ||
|
||
If you would like to add a visual border around the currently focused window, | ||
ensure the following options are defined in the `komorebi.json` configuration | ||
file. | ||
|
||
```json | ||
{ | ||
"active_window_border": true, | ||
"active_window_border_colours": { | ||
"single": { | ||
"r": 66, | ||
"g": 165, | ||
"b": 245 | ||
}, | ||
"stack": { | ||
"r": 256, | ||
"g": 165, | ||
"b": 66 | ||
}, | ||
"monocle": { | ||
"r": 255, | ||
"g": 51, | ||
"b": 153 | ||
} | ||
} | ||
} | ||
|
||
``` | ||
|
||
It is important to note that the active window border will only apply to | ||
windows managed by `komorebi`. | ||
|
||
This feature is not considered stable and you may encounter visual artifacts | ||
from time to time. | ||
|
||
<!-- TODO: Record a new video --> | ||
|
||
[![Watch the tutorial | ||
video](https://img.youtube.com/vi/ywiAvoMV_gE/hqdefault.jpg)](https://www.youtube.com/watch?v=ywiAvoMV_gE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# AutoHotKey | ||
|
||
<!-- TODO: Update this completely --> | ||
|
||
If you would like to use Autohotkey, please make sure you have AutoHotKey v2 | ||
installed. | ||
|
||
Generally, users who opt for AHK will have specific needs that can only be | ||
addressed by the advanced functionality of AHK, and so they are assumed to be | ||
able to craft their own configuration files. | ||
|
||
If you would like to try out AHK, a simple sample configuration powered by | ||
`komorebic.lib.ahk` is provided as a starting point. This sample configuration | ||
does not take into account the use of a static configuration file; if you | ||
choose to use a static configuration file alongside AHK, you can remove all the | ||
configuration options from your `komorebi.ahk` and use it solely to handle | ||
hotkey bindings. | ||
|
||
|
||
```powershell | ||
# save the latest generated komorebic library to ~/komorebic.lib.ahk | ||
iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.19/komorebic.lib.ahk -OutFile $Env:USERPROFILE\komorebic.lib.ahk | ||
# save the latest generated app-specific config tweaks and fixes to ~/komorebi.generated.ahk | ||
iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.19/komorebi.generated.ahk -OutFile $Env:USERPROFILE\komorebi.generated.ahk | ||
# save the sample komorebi configuration file to ~/komorebi.ahk | ||
iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.19/komorebi.sample.ahk -OutFile $Env:USERPROFILE\komorebi.ahk | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Custom Layouts | ||
|
||
Particularly for users of ultrawide monitors, traditional tiling layouts may | ||
not seem like the most efficient use of screen space. If you feel this is the | ||
case with any of the default layouts, you are also welcome to create your own | ||
custom layouts and save them as JSON or YAML. | ||
|
||
If you're not comfortable writing the layouts directly in JSON or YAML, you can | ||
use the [komorebi Custom Layout | ||
Generator](https://lgug2z.github.io/komorebi-custom-layout-generator/) to | ||
interactively define a custom layout, and then copy the generated JSON content. | ||
|
||
Custom layouts can be loaded on the current workspace or configured for a | ||
specific workspace in the `komorebi.json` configuration file. | ||
|
||
```json | ||
{ | ||
"monitors": [ | ||
{ | ||
"workspaces": [ | ||
{ | ||
"name": "personal", | ||
"custom_layout": "C:/Users/LGUG2Z/my-custom-layout.json" | ||
}, | ||
] | ||
} | ||
] | ||
} | ||
``` | ||
|
||
The fundamental building block of a custom _komorebi_ layout is the Column. | ||
|
||
Columns come in three variants: | ||
|
||
- **Primary**: This is where your primary focus will be on the screen most of | ||
the time. There must be exactly one Primary Column in any custom layout. | ||
Optionally, you can specify the percentage of the screen width that you want | ||
the Primary Column to occupy. | ||
- **Secondary**: This is an optional column that can either be full height of | ||
split horizontally into a fixed number of maximum rows. There can be any | ||
number of Secondary Columns in a custom layout. | ||
- **Tertiary**: This is the final column where any remaining windows will be | ||
split horizontally into rows as they get added. | ||
|
||
If there is only one window on the screen when a custom layout is selected, | ||
that window will take up the full work area of the screen. | ||
|
||
If the number of windows is equal to or less than the total number of columns | ||
defined in a custom layout, the windows will be arranged in an equal-width | ||
columns. | ||
|
||
When the number of windows is greater than the number of columns defined in the | ||
custom layout, the windows will begin to be arranged according to the | ||
constraints set on the Primary and Secondary columns of the layout. | ||
|
||
Here is an example custom layout that can be used as a starting point for your | ||
own: | ||
|
||
```yaml | ||
- column: Secondary | ||
configuration: !Horizontal 2 # max number of rows | ||
- column: Primary | ||
configuration: !WidthPercentage 50 # percentage of screen | ||
- column: Tertiary | ||
configuration: Horizontal | ||
``` | ||
<!-- TODO: Record a new video --> | ||
[![Watch the tutorial video](https://img.youtube.com/vi/SgmBHKEOcQ4/hqdefault.jpg)](https://www.youtube.com/watch?v=SgmBHKEOcQ4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Dynamically Layout Switching | ||
|
||
With `komorebi` it is possible to define rules to automatically change the | ||
layout on a specified workspace when a threshold of window containers is met. | ||
|
||
```json | ||
{ | ||
"monitors": [ | ||
{ | ||
"workspaces": [ | ||
{ | ||
"name": "personal", | ||
"layout_rules": { | ||
"1": "BSP" | ||
} | ||
"custom_layout_rules": { | ||
"5": "C:/Users/LGUG2Z/my-custom-layout.json" | ||
} | ||
}, | ||
] | ||
} | ||
] | ||
} | ||
``` | ||
|
||
In this example, when there are one or more window containers visible on the | ||
screen, the BSP layout is used, and when there are five or more window | ||
containers visible, a custom layout is used. | ||
|
||
However, if you add workspace layout rules, you will not be able to manually | ||
change the layout of a workspace until all layout rules for that workspace have | ||
been cleared. | ||
|
||
```powershell | ||
# for example, to clear rules from monitor 0, workspace 0 | ||
komorebic clear-workspace-layout-rules 0 0 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Focus Follows Mouse | ||
|
||
`komorebi` supports two focus-follows-mouse implementations; the native Windows | ||
Xmouse implementation, which treats the desktop, the task bar, and the system | ||
tray as windows and switches focus to them eagerly, and a custom `komorebi` | ||
implementation, which only considers windows managed by `komorebi` as valid | ||
targets to switch focus to when moving the mouse. | ||
|
||
To enable the `komorebi` implementation you must start the process with the | ||
`--ffm` flag to explicitly enable the feature. This is because the mouse | ||
tracking required for this feature significantly increases the CPU usage of the | ||
process (on my machine, it jumps from <1% to ~4~), and this CPU increase | ||
persists regardless of whether focus-follows-mouse is enabled or disabled at | ||
any given time via `komorebic`'s configuration commands. | ||
|
||
If the `komorebi` process has been started with the `--ffm` flag, you can | ||
enable focus follows mouse behaviour in the `komorebi.json` configuration file. | ||
|
||
```json | ||
{ | ||
"focus_follows_mouse": "Komorebi" | ||
} | ||
``` | ||
|
||
When calling any of the `komorebic` commands related to focus-follows-mouse | ||
functionality, the `windows` implementation will be chosen as the default | ||
implementation. You can optionally specify the `komorebi` implementation by | ||
passing it as an argument to the `--implementation` flag: | ||
|
||
```powershell | ||
komorebic.exe toggle-focus-follows-mouse --implementation komorebi | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Force Manage Windows | ||
|
||
❗️**NOTE**: A significant number of force-manage window rules for the most | ||
common applications are [already generated for | ||
you](https://github.com/LGUG2Z/komorebi/#generating-common-application-specific-configurations) | ||
|
||
In some rare cases, a window may not automatically be registered to be managed | ||
by `komorebi`. You can add rules to enforce this behaviour in the | ||
`komorebi.json` configuration file. | ||
|
||
```json | ||
{ | ||
"manage_rules": [ | ||
{ | ||
"kind": "Title", | ||
"id": "Media Player", | ||
"matching_strategy": "Equals" | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Ignore Windows | ||
|
||
❗️**NOTE**: A significant number of ignored window rules for the most common | ||
applications are [already generated for | ||
you](https://github.com/LGUG2Z/komorebi/#generating-common-application-specific-configurations) | ||
|
||
Sometimes you will want a specific application to never be tiled, and instead | ||
float all the time. You can add rules to enforce this behaviour in the | ||
`komorebi.json` configuration file. | ||
|
||
```json | ||
{ | ||
"float_rules": [ | ||
{ | ||
"kind": "Title", | ||
"id": "Media Player", | ||
"matching_strategy": "Equals" | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# `KOMOREBI_CONFIG_HOME` | ||
|
||
If you do not want to keep _komorebi_-related files in your `$Env:USERPROFILE` | ||
directory, you can specify a custom directory by setting the | ||
`$Env:KOMOREBI_CONFIG_HOME` environment variable. | ||
|
||
For example, to use the `~/.config/komorebi` directory: | ||
|
||
```powershell | ||
# Run this command to make sure that the directory has been created | ||
mkdir -p ~/.config/komorebi | ||
# Run this command to open up your PowerShell profile configuration in Notepad | ||
notepad $PROFILE | ||
# Add this line (with your login user!) to the bottom of your PowerShell profile configuration | ||
$Env:KOMOREBI_CONFIG_HOME = 'C:\Users\LGUG2Z\.config\komorebi' | ||
# Save the changes and then reload the PowerShell profile | ||
. $PROFILE | ||
``` | ||
|
||
If you already have configuration files that you wish to keep, move them to the | ||
`~/.config/komorebi` directory. | ||
|
||
The next time you run `komorebic start`, any files created by or loaded by | ||
_komorebi_ will be placed or expected to exist in this folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Mouse Follows Focus | ||
|
||
By default, the mouse will move to the center of the window when the focus is | ||
changed in a given direction. This behaviour is know as 'mouse follows focus'. | ||
This behaviour can be disabled in the `komorebi.json` configuration file. | ||
|
||
```json | ||
{ | ||
"mouse_follows_focus": false, | ||
} | ||
``` | ||
|
||
<!-- TODO: Record a new video --> | ||
|
||
[![Watch the tutorial video](https://img.youtube.com/vi/LBoyXQiNINc/hqdefault.jpg)](https://www.youtube.com/watch?v=LBoyXQiNINc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Remove Gaps | ||
|
||
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. | ||
|
||
```json | ||
{ | ||
"default_workspace_padding": 0, | ||
"default_container_padding": 0 | ||
} | ||
``` | ||
|
||
<!-- TODO: Record a new video --> | ||
|
||
[![Watch the tutorial video](https://img.youtube.com/vi/eGr07mymgWE/hqdefault.jpg)](https://www.youtube.com/watch?v=eGr07mymgWE) |
23 changes: 23 additions & 0 deletions
23
docs/common-workflows/tray-and-multi-window-applications.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Tray and Multi-Window Applications | ||
|
||
❗️**NOTE**: A significant number of tray and multi-window application rules for | ||
the most common applications are [already generated for | ||
you](https://github.com/LGUG2Z/komorebi/#generating-common-application-specific-configurations) | ||
|
||
If you are experiencing behaviour where closing a window leaves a blank tile, | ||
but minimizing the same window does not, you have probably enabled a | ||
'close/minimize to tray' option for that application. You can tell `komorebi` | ||
to handle this application appropriately by identifying it via the executable | ||
name or the window class. | ||
|
||
```json | ||
{ | ||
"tray_and_multi_window_applications": [ | ||
{ | ||
"kind": "Class", | ||
"id": "SDL_app", | ||
"matching_strategy": "Equals" | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters