Add SwitchWorkspace action to change workspace without moving focus #3356
+27
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a new
SwitchWorkspaceaction that switches to a workspace on its monitor without changing the currently focused monitor. This differs from the existingFocusWorkspaceaction, which moves keyboard focus to the target workspace's monitor.Motivation
The current
FocusWorkspaceaction is useful when you want to immediately start working on another workspace. However, there are valid workflows where you want to change a workspace on another monitor while keeping your current focus position:Multi-monitor workflow with parallel tasks: On the primary work monitor, users often run multiple parallel tasks across different workspaces, each requiring auxiliary content from other workspaces on secondary displays. For example:
With
SwitchWorkspace, the secondary monitor can automatically follow the primary monitor's workspace changes, keeping relevant auxiliary content in sync without requiring the user to manually switch and refocus.Preparing a workspace on another monitor for an upcoming window move, such as organizing windows before a presentation or screen sharing session.
Previewing content on another monitor without interrupting current work, allowing quick glances at reference material or monitoring dashboards.
Setting up workspaces across multiple monitors before starting a complex task that requires specific window arrangements.
Usage
Via IPC socket:
Via Rust:
Implementation Details
Testing
Backward Compatibility
This change is fully backward compatible. It adds a new optional action without modifying any existing behavior.
Related
Related to the discussion in #3351 about workspace switching behavior.