From fc99724aba1c0043eda3ad1b9829da8ae802d310 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Fri, 27 Dec 2024 09:31:32 +0300 Subject: Add open-focused window rule --- wiki/Configuration:-Window-Rules.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'wiki') 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` + +Since: next release + +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. -- cgit