feat: add follow option to app rules for auto workspace switching#351
Open
qeude wants to merge 2 commits into
Open
feat: add follow option to app rules for auto workspace switching#351qeude wants to merge 2 commits into
qeude wants to merge 2 commits into
Conversation
Adds a per-rule follow flag that, when true, automatically switches to the assigned workspace when a matching window opens and the app is frontmost. This allows users to open an app and land directly on the workspace it was assigned to, rather than staying on the current workspace.
Adds integration tests for the reactor-level follow behavior and updates the default config documentation with the new follow option.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Adds a
followoption toapp_rulesthat, whentrue, automatically switches the user to the assigned workspace when a matching window opens and the app is frontmost.Problem
Before this change, if you had an app rule like:
and opened Xcode while on workspace 2, the window would be created on workspace 0 but you'd stay on workspace 2. You had to manually switch to see it.
Solution
Add a
followboolean field toAppWorkspaceRule:When
follow = trueand the app is frontmost on open, the reactor triggers the existinghandle_app_activation_workspace_switchpath to switch to the target workspace.Changes
followfield toAppWorkspaceRulefollowthroughAppRuleAssignmenthandle_application_launched: switch workspace when app opens frontmost and rule hasfollow = truehandle_window_created: switch workspace when new window opens and app is frontmost withfollow = trueprocess_windows_for_app_rules: returns whether a follow is neededemit_layout_events/on_windows_discovered_with_app_info: propagate follow flagrift.default.tomlwith the new option and an example