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 /src/window/mod.rs | |
| parent | 88fbc62b1d3cb245453b9ac5a8faae2b9159866a (diff) | |
| download | niri-fc99724aba1c0043eda3ad1b9829da8ae802d310.tar.gz niri-fc99724aba1c0043eda3ad1b9829da8ae802d310.tar.bz2 niri-fc99724aba1c0043eda3ad1b9829da8ae802d310.zip | |
Add open-focused window rule
Diffstat (limited to 'src/window/mod.rs')
| -rw-r--r-- | src/window/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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<bool>, + /// Whether the window should open focused. + pub open_focused: Option<bool>, + /// Extra bound on the minimum window width. pub min_width: Option<u16>, /// 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); } |
