shell: Add keybindings to migrate workspaces
This commit is contained in:
parent
1a2d9159d7
commit
3dee249558
3 changed files with 115 additions and 5 deletions
|
|
@ -1633,6 +1633,56 @@ impl State {
|
|||
}
|
||||
}
|
||||
}
|
||||
Action::MigrateWorkspaceToNextOutput => {
|
||||
let current_output = seat.active_output();
|
||||
let active = self.common.shell.active_space(¤t_output).handle;
|
||||
let next_output = self
|
||||
.common
|
||||
.shell
|
||||
.outputs()
|
||||
.skip_while(|o| *o != ¤t_output)
|
||||
.skip(1)
|
||||
.next()
|
||||
.cloned();
|
||||
if let Some(next_output) = next_output {
|
||||
self.common
|
||||
.shell
|
||||
.migrate_workspace(¤t_output, &next_output, &active);
|
||||
}
|
||||
}
|
||||
Action::MigrateWorkspaceToPreviousOutput => {
|
||||
let current_output = seat.active_output();
|
||||
let active = self.common.shell.active_space(¤t_output).handle;
|
||||
let prev_output = self
|
||||
.common
|
||||
.shell
|
||||
.outputs()
|
||||
.rev()
|
||||
.skip_while(|o| *o != ¤t_output)
|
||||
.skip(1)
|
||||
.next()
|
||||
.cloned();
|
||||
if let Some(prev_output) = prev_output {
|
||||
self.common
|
||||
.shell
|
||||
.migrate_workspace(¤t_output, &prev_output, &active);
|
||||
}
|
||||
}
|
||||
Action::MigrateWorkspaceToOutput(direction) => {
|
||||
let current_output = seat.active_output();
|
||||
let active = self.common.shell.active_space(¤t_output).handle;
|
||||
let next_output = self
|
||||
.common
|
||||
.shell
|
||||
.next_output(¤t_output, direction)
|
||||
.cloned();
|
||||
|
||||
if let Some(next_output) = next_output {
|
||||
self.common
|
||||
.shell
|
||||
.migrate_workspace(¤t_output, &next_output, &active);
|
||||
}
|
||||
}
|
||||
Action::Focus(focus) => {
|
||||
let current_output = seat.active_output();
|
||||
let overview = self.common.shell.overview_mode().0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue