mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Implement focus-monitor to focus a specific monitor by output.
This commit is contained in:
committed by
Ivan Molodetskikh
parent
47dd338340
commit
993c5ce8af
@@ -1386,6 +1386,15 @@ impl State {
|
||||
self.niri.layer_shell_on_demand_focus = None;
|
||||
}
|
||||
}
|
||||
Action::FocusMonitor(output) => {
|
||||
if let Some(output) = self.niri.output_by_name_match(&output).cloned() {
|
||||
self.niri.layout.focus_output(&output);
|
||||
if !self.maybe_warp_cursor_to_focus_centered() {
|
||||
self.move_cursor_to_output(&output);
|
||||
}
|
||||
self.niri.layer_shell_on_demand_focus = None;
|
||||
}
|
||||
}
|
||||
Action::MoveWindowToMonitorLeft => {
|
||||
if let Some(output) = self.niri.output_left() {
|
||||
self.niri.layout.move_to_output(None, &output, None);
|
||||
|
||||
Reference in New Issue
Block a user