The KDE docs were moved from komorebi-for-kde/ to docs/linux/ and the sources, nix files, scripts and schemas to komorebi-linux/, nix/linux/, scripts/linux/ and schemas/linux/, so every relative link that left docs/ (to sources, nix files, scripts, schemas, .envrc, rust-toolchain.toml, the old CI file) was broken, and the text named the old paths. Links were rewritten mechanically by resolving each broken target against the old location and mapping it to the new one; link texts and code-span paths were updated to the new paths (komorebi/src -> komorebi-linux/src, nix/ -> nix/linux/, scripts/ -> scripts/linux/, docs/ -> docs/linux/, schema.json -> schemas/linux/schema.json). The crate list of the README names komorebi-linux, komorebi-daemon and komorebi-version; `cargo install --path komorebi` becomes komorebi-daemon; the comparison paragraph of CONTRIBUTING.md says compare-gen.py is stale (it looks for the old sibling trees). URLs of the old GitHub repositories are left as they are (a release decision). COMPARE.md is left as it is (already marked stale). Verified: a link checker over every markdown file (outside cli/, nix/, tools/, old-ci) reports no broken link in docs/linux. Nothing was built.
2.9 KiB
Application specific configuration
Some applications need to be told how to behave under a tiling window manager: a calculator that
should float instead of taking a tile, a launcher that should never be tiled. The
rules that say so can be put in komorebi.json, or in a file of their own,
applications.json, that the configuration names. The file can be shared, or kept apart from
the settings, and a list of files can be put together from several sources.
The file
applications.json is an object with one entry for each application. The name of the entry is
only for the reader. Each entry has lists of rules, as komorebi.json has them:
{
"KDE Plasma": {
"floating": [
{ "kind": "Class", "id": "org.kde.kcalc", "matching_strategy": "Equals" },
{ "kind": "Class", "id": "org.kde.spectacle", "matching_strategy": "Equals" }
]
},
"Steam": {
"ignore": [{ "kind": "Exe", "id": "steam", "matching_strategy": "Equals" }]
}
}
| List | What it does | In komorebi.json |
|---|---|---|
ignore |
komorebi leaves the windows alone | ignore_rules |
manage |
komorebi tiles the windows, whatever the ignore rules say | manage_rules |
floating |
the windows open floating | floating_applications |
titleless, tabbed |
nothing: they work around how another platform exposes windows, and a KWin window is always a window | titleless_applications, tabbed_applications |
An entry named $schema has the address of a schema as its value, as an editor wants it, and
is ignored.
Naming the file
app_specific_configuration_path in komorebi.json is the path of one file, or a list of paths:
{
"app_specific_configuration_path": "$HOME/.config/komorebi/applications.json"
}
{
"app_specific_configuration_path": [
"$HOME/.config/komorebi/applications.json",
"$HOME/.config/komorebi/mine.json"
]
}
Environment variables in a path, such as $HOME, are replaced. The files are read when
komorebi.json is: when the daemon starts, and again when the configuration changes. Their rules
are added to the ones the daemon has, after the rules of komorebi.json itself, which
Configuration explains.
A path with no file behind it is skipped, and the daemon logs a warning: one komorebi.json can
serve every platform, even if it names a file that only another platform has. A file that is
there and is not an applications.json, or has a rule that is not valid, is an error: the daemon
does not start with it, and a reload with it fails and logs the error. Only a file with the
extension .json is read.
The file komorebi ships
komorebic/applications.json in the repository has an
entry for KDE Plasma, which floats the calculators of KDE and GNOME, the screenshot tool, the
authentication dialog of Plasma and System Settings. A test loads it, and opens the windows it
names.