diff options
| author | Andreas Stührk <andy@hammerhartes.de> | 2023-12-02 23:57:01 +0100 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-01 12:29:46 +0400 |
| commit | e51268a39eeffd56d016a8d25dc98a40ff045a9c (patch) | |
| tree | 11bc485c8a413da4e8ea13e83b8bbe3611574cd7 /src/input.rs | |
| parent | 0a715ce1553ec528dbb61172450d2944db7edb70 (diff) | |
| download | niri-e51268a39eeffd56d016a8d25dc98a40ff045a9c.tar.gz niri-e51268a39eeffd56d016a8d25dc98a40ff045a9c.tar.bz2 niri-e51268a39eeffd56d016a8d25dc98a40ff045a9c.zip | |
Add actions to move the active workspace to another monitor
Diffstat (limited to 'src/input.rs')
| -rw-r--r-- | src/input.rs | 24 |
1 files changed, 24 insertions, 0 deletions
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); + } + } } } |
