-
-
Notifications
You must be signed in to change notification settings - Fork 209
/
Copy pathexample-configurations.md
215 lines (162 loc) Β· 6.38 KB
/
example-configurations.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
`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 `whkd`. 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
`$Env:USERPROFILE` directory.
```powershell
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
five 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 Windows 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 `$Env:USERPROFILE`
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`.
### Active window border
You may have seen videos and screenshots of people using `komorebi` with a
thick, colourful active window border. You can also enable this by setting
`active_window_border` to `true`. However, please be warned that this feature
is a crude hack trying to compensate for the insistence of Microsoft Windows
design teams to make custom borders with widths that are actually visible to
the user a thing of the past and removing this capability from the Win32 API.
I know it's buggy, and I know that most of the it sucks, but this is something
you should be bring up with the billion dollar company and not with me, the
solo developer.
### Border colours
If you choose to use the active window border, you can set different colours to
give you visual queues when you are focused on a single window, a stack of
windows, or a window that is in monocole mode.
The example colours given are blue single, green for stack and pink for
monocle.
### 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!
```
+-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | +---+
+-----+-----+ | +---+---+ +---+---+---+ +---+---| |
| | | | | | | | | | | | | +---+
| | | | | | | | | | | | | | |
+-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+
4 windows 5 windows 6 windows 7 windows
```
## whkdrc
`whkd` 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. By default, the `whkdrc` file should be located in the `$Env:USERPROFILE/.config/` directory.
Please remember that `whkd` does not support overriding Microsoft's limitations
on hotkey bindings that include the `Windows` key. If this is important to you,
I recommend using [AutoHotKey](https://autohotkey.com) to set up your key
bindings for `komorebic` commands instead.
```
{% include "./whkdrc.sample" %}
```
### Setting .shell
There is one special directive at the top of the file, `.shell` which can be
set to either `powershell`, `pwsh` or `cmd`. Which one you use will depend on
which shell you use in your terminal.
* `powershell` - set this if you are using the version of PowerShell that comes
installed with Windows 10+ (the executable file for this is `powershell.exe`)
* `pwsh` - set this if you are using PowerShell 7+, which you have installed yourself either through the Windows Store
or WinGet (the executable file for this is `pwsh.exe`)
* `cmd` - set this if you don't want to use PowerShell at all and instead you
want to call commands through the shell used by the old-school Command
Prompt (the executable file for this is `cmd.exe`)
### Key codes
Key codes for alphanumeric and arrow keys are just what you would expect. For
punctuation and other keys, please refer to the [Virtual Key
Codes](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes)
reference.
If you want to use one of those key codes, put them into lower case and remove
the `VK_` prefix. For example, the keycode `VK_OEM_PLUS` becomes `oem_plus` in
the sample configuration above.