aboutsummaryrefslogtreecommitdiff
path: root/wiki
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-12-27 09:31:32 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-12-30 20:12:37 +0300
commitfc99724aba1c0043eda3ad1b9829da8ae802d310 (patch)
tree2a0face72bccbbf86da931bd92a7a5885b58e040 /wiki
parent88fbc62b1d3cb245453b9ac5a8faae2b9159866a (diff)
downloadniri-fc99724aba1c0043eda3ad1b9829da8ae802d310.tar.gz
niri-fc99724aba1c0043eda3ad1b9829da8ae802d310.tar.bz2
niri-fc99724aba1c0043eda3ad1b9829da8ae802d310.zip
Add open-focused window rule
Diffstat (limited to 'wiki')
-rw-r--r--wiki/Configuration:-Window-Rules.md30
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.