mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-08-31 07:57:16 +02:00
feat(cli): add cycle-move-workspace-to-monitor cmd
This commit adds a new cli command, cycle-move-workspace-to-monitor. After the introduction of the monitor reconciliator module in combination with display_index_preferences, this command should never really be necessary, however it is worth having as a backup. resolve #718
This commit is contained in:
@@ -465,6 +465,15 @@ impl WindowManager {
|
||||
SocketMessage::MoveWorkspaceToMonitorNumber(monitor_idx) => {
|
||||
self.move_workspace_to_monitor(monitor_idx)?;
|
||||
}
|
||||
SocketMessage::CycleMoveWorkspaceToMonitor(direction) => {
|
||||
let monitor_idx = direction.next_idx(
|
||||
self.focused_monitor_idx(),
|
||||
NonZeroUsize::new(self.monitors().len())
|
||||
.ok_or_else(|| anyhow!("there must be at least one monitor"))?,
|
||||
);
|
||||
|
||||
self.move_workspace_to_monitor(monitor_idx)?;
|
||||
}
|
||||
SocketMessage::TogglePause => {
|
||||
if self.is_paused {
|
||||
tracing::info!("resuming");
|
||||
|
||||
Reference in New Issue
Block a user