mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-15 13:22:19 +01:00
A window that opens goes after the focused container. A workspace can now say
another place for its windows: the primary or the secondary tile, before or
after the focused container, the end of the list, or a place by number, counting
from 1. The place is for every window, or for the windows that match a rule on
their program, app id, title or path; the rules are the conditions the ignore
and manage rules are made of, and the first that matches in key order decides. A
place that does not exist, such as the secondary tile of a workspace with one
container, is the default place.
A place is read from a name, a number or text that is a number. The
documentation of the setting shows a number and a map's keys can only be text,
and komorebi for Windows (83c4e11d) reads only text, so the form its own page
shows is refused there.
A place that was reserved with preselect-direction is used before the rules are
asked, and a locked container keeps its index. A workspace whose
window_container_behaviour is Append puts a window in the focused container, and
the rules are not used.
A workspace takes the rules from the key initial_window_placement_rules of its
entry in komorebi.json. The key is in schema.json and so in the typed config
option of the module, and the page docs/initial-window-placement-rules.md says
how to write it. vm-placement opens windows in a headless KWin and checks where
they go, by program, app id and title.
The schema that schemars derives for a place is an object with a Placement or an
Index key, which is not what is read or written, so a check against it refuses a
file that the daemon reads. The schema of PlacementTarget is written by hand
instead: a name, a number, or text that is a number. A file with a place of each
form is checked against schema.json, and the module's config option takes them.
72 lines
3.0 KiB
Markdown
72 lines
3.0 KiB
Markdown
# Managing windows
|
|
|
|
komorebi tiles every normal application window that KWin reports, and leaves dialogs, splash
|
|
screens and other windows that are not for tiling alone, and the windows that [rules](rules.md)
|
|
say to ignore. The commands here act on the window
|
|
that has the focus in KWin, take a window out of the layout or back into it, and pause the
|
|
daemon.
|
|
|
|
## Minimizing and closing
|
|
|
|
[`komorebic minimize`](../cli/minimize.md) asks KWin to minimize the window that has the focus,
|
|
and [`komorebic close`](../cli/close.md) asks it to close the window, as the buttons of its title
|
|
bar do.
|
|
|
|
```sh
|
|
komorebic minimize
|
|
komorebic close
|
|
```
|
|
|
|
The window leaves the layout when KWin reports that it was minimized or closed, and the other
|
|
windows of the workspace share the work area. A minimized window comes back into the layout, in a
|
|
container of its own, when it is restored.
|
|
|
|
## Taking a window out of the layout
|
|
|
|
[`komorebic unmanage`](../cli/unmanage.md) takes the window that has the focus out of the layout.
|
|
It stays open, in the middle of the work area with the size it had, and komorebi leaves it alone
|
|
from then on: it does not tile it again, and it does not move it.
|
|
[`komorebic manage`](../cli/manage.md), with that window focused, puts it back in the layout,
|
|
after the focused window, or where the workspace's
|
|
[placement rules](../initial-window-placement-rules.md) say.
|
|
|
|
```sh
|
|
komorebic unmanage
|
|
komorebic manage
|
|
```
|
|
|
|
`komorebic manage` also takes in a window komorebi missed, such as one that opened while the
|
|
daemon was paused, but not a window an ignore rule covers. The daemon forgets an unmanaged window when it closes, and when the daemon
|
|
stops.
|
|
|
|
## Commands while the focused window is not tiled
|
|
|
|
By default, a command acts on the workspace whatever window has the focus. With
|
|
[`komorebic unmanaged-window-operation-behaviour no-op`](../cli/unmanaged-window-operation-behaviour.md),
|
|
the daemon ignores every command while the window that has the focus is not one of the windows it
|
|
tiles: a floating window, a window it does not manage, or one taken out with
|
|
`komorebic unmanage`. The daemon logs "ignoring commands while active window is not managed by
|
|
komorebi" for each.
|
|
|
|
```sh
|
|
komorebic unmanaged-window-operation-behaviour no-op
|
|
komorebic unmanaged-window-operation-behaviour op
|
|
```
|
|
|
|
The commands that are ignored include `komorebic state`, `komorebic stop` and the command that
|
|
sets the behavior back to `op`: give the focus to a tiled window first.
|
|
|
|
## Pausing
|
|
|
|
[`komorebic toggle-pause`](../cli/toggle-pause.md) pauses the daemon, and the same command
|
|
resumes it. While it is paused, komorebi does not act on what KWin reports, so it moves no
|
|
window, and of its commands it carries out only `toggle-pause`, `state`, `global-state` and
|
|
`stop`. The daemon's state says whether it is paused, as `is_paused`.
|
|
|
|
```sh
|
|
komorebic toggle-pause
|
|
```
|
|
|
|
What KWin reported while the daemon was paused is not acted on afterwards: a window that opened
|
|
in the meantime is not tiled until it is managed with `komorebic manage`.
|