diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-27 09:31:32 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-30 20:12:37 +0300 |
| commit | fc99724aba1c0043eda3ad1b9829da8ae802d310 (patch) | |
| tree | 2a0face72bccbbf86da931bd92a7a5885b58e040 /wiki/Configuration:-Window-Rules.md | |
| parent | 88fbc62b1d3cb245453b9ac5a8faae2b9159866a (diff) | |
| download | niri-fc99724aba1c0043eda3ad1b9829da8ae802d310.tar.gz niri-fc99724aba1c0043eda3ad1b9829da8ae802d310.tar.bz2 niri-fc99724aba1c0043eda3ad1b9829da8ae802d310.zip | |
Add open-focused window rule
Diffstat (limited to 'wiki/Configuration:-Window-Rules.md')
| -rw-r--r-- | wiki/Configuration:-Window-Rules.md | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/wiki/Configuration:-Window-Rules.md b/wiki/Configuration:-Window-Rules.md index ccf5bb84..84e4d694 100644 --- a/wiki/Configuration:-Window-Rules.md +++ b/wiki/Configuration:-Window-Rules.md @@ -42,6 +42,7 @@ window-rule { open-maximized true open-fullscreen true open-floating true + open-focused false // Properties that apply continuously. draw-border-with-background false @@ -338,6 +339,35 @@ window-rule { } ``` +#### `open-focused` + +<sup>Since: next release</sup> + +Set this to `false` to prevent this window from being automatically focused upon opening. + +```kdl +// Don't give focus to the GIMP startup splash screen. +window-rule { + match app-id="^gimp" title="^GIMP Startup$" + + open-focused false +} +``` + +You can also set this to `true` to focus the window, even if normally it wouldn't get auto-focused. + +```kdl +// Always focus the KeePassXC-Browser unlock dialog. +// +// This dialog opens parented to the KeePassXC window rather than the browser, +// so it doesn't get auto-focused by default. +window-rule { + match app-id=r#"^org\.keepassxc\.KeePassXC$"# title="^Unlock Database - KeePassXC$" + + open-focused true +} +``` + ### Dynamic Properties These properties apply continuously to open windows. |
