diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-05-12 14:11:38 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-05-12 14:13:51 +0300 |
| commit | defd4c5c4db8b22b2a5db468c0618c37b30e95dd (patch) | |
| tree | d1c52a2799c9e79b703ef5c8568b31edd836999a /src/layout/mod.rs | |
| parent | 7227e641496b7b25ba007371f69757153af13f75 (diff) | |
| download | niri-defd4c5c4db8b22b2a5db468c0618c37b30e95dd.tar.gz niri-defd4c5c4db8b22b2a5db468c0618c37b30e95dd.tar.bz2 niri-defd4c5c4db8b22b2a5db468c0618c37b30e95dd.zip | |
Add center-visible-columns action
Diffstat (limited to 'src/layout/mod.rs')
| -rw-r--r-- | src/layout/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index b2726bef..6a497c81 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -2332,6 +2332,13 @@ impl<W: LayoutElement> Layout<W> { workspace.center_window(id); } + pub fn center_visible_columns(&mut self) { + let Some(workspace) = self.active_workspace_mut() else { + return; + }; + workspace.center_visible_columns(); + } + pub fn focus(&self) -> Option<&W> { self.focus_with_output().map(|(win, _out)| win) } |
