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 --- src/window/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/window') diff --git a/src/window/mod.rs b/src/window/mod.rs index 9a44319a..0b0b5f1e 100644 --- a/src/window/mod.rs +++ b/src/window/mod.rs @@ -49,6 +49,9 @@ pub struct ResolvedWindowRules { /// Whether the window should open floating. pub open_floating: Option, + /// Whether the window should open focused. + pub open_focused: Option, + /// Extra bound on the minimum window width. pub min_width: Option, /// Extra bound on the minimum window height. @@ -116,6 +119,7 @@ impl ResolvedWindowRules { open_maximized: None, open_fullscreen: None, open_floating: None, + open_focused: None, min_width: None, min_height: None, max_width: None, @@ -208,6 +212,10 @@ impl ResolvedWindowRules { resolved.open_floating = Some(x); } + if let Some(x) = rule.open_focused { + resolved.open_focused = Some(x); + } + if let Some(x) = rule.min_width { resolved.min_width = Some(x); } -- cgit