From e51268a39eeffd56d016a8d25dc98a40ff045a9c Mon Sep 17 00:00:00 2001 From: Andreas Stührk Date: Sat, 2 Dec 2023 23:57:01 +0100 Subject: Add actions to move the active workspace to another monitor --- src/input.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/input.rs') diff --git a/src/input.rs b/src/input.rs index 0b671b4d..a357eac1 100644 --- a/src/input.rs +++ b/src/input.rs @@ -609,6 +609,30 @@ impl State { self.niri.queue_redraw_all(); } } + Action::MoveWorkspaceToMonitorLeft => { + if let Some(output) = self.niri.output_left() { + self.niri.layout.move_workspace_to_output(&output); + self.move_cursor_to_output(&output); + } + } + Action::MoveWorkspaceToMonitorRight => { + if let Some(output) = self.niri.output_right() { + self.niri.layout.move_workspace_to_output(&output); + self.move_cursor_to_output(&output); + } + } + Action::MoveWorkspaceToMonitorDown => { + if let Some(output) = self.niri.output_down() { + self.niri.layout.move_workspace_to_output(&output); + self.move_cursor_to_output(&output); + } + } + Action::MoveWorkspaceToMonitorUp => { + if let Some(output) = self.niri.output_up() { + self.niri.layout.move_workspace_to_output(&output); + self.move_cursor_to_output(&output); + } + } } } -- cgit