Switch to a workspace on the focused monitor - #9780
Open
hsyl20 wants to merge 1 commit into
Open
Conversation
SUPER+[1-9,0] used the plain workspace focus, which follows a workspace to whichever monitor already holds it. On a multi-monitor setup, pressing SUPER+1 from the second screen silently moved focus to the other monitor, so the screen you were looking at appeared to do nothing. Pass on_current_monitor so the target workspace is brought to the monitor that has focus instead, leaving focus where it is. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ioK67NLii7JC9snL2X3Js
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.
Implements the proposal in discussion #5407.
Problem
SUPER+[1-9,0]binds tohl.dsp.focus({ workspace = N }), which follows a workspace to whichever monitor already holds it. On a multi-monitor setup, pressingSUPER+1while focused on the second screen silently moves focus to the other monitor — so the screen you are looking at appears to do nothing. It is a confusing default, particularly for users coming from macOS or from tiling WMs where workspaces are per-monitor.This has come up repeatedly: #1317, #2200, and discussions #1316, #1351, #3780 — which so far have all settled on the third-party
split-monitor-workspacesplugin.Change
One line in
default/hypr/bindings/tiling.lua— passon_current_monitor = true:This is Hyprland's native
focusworkspaceoncurrentmonitordispatcher (available since 0.41.0) — no plugin needed. The target workspace is brought to the focused monitor, and focus stays where it is.Deliberately scoped to the numbered bindings only.
SUPER+TAB/SUPER+SHIFT+TAB/SUPER+CTRL+TABand theSUPER+scrollbindings use relative targets (e+1,e-1,previous) and do not exhibit the jump, so they are untouched.Verification
Tested live on a dual-monitor setup (two 1920x1080, DP-1 + DP-2), dispatching from DP-2 at a workspace living on DP-1:
hl.dsp.focus({ workspace = "3" })(before)+ on_current_monitor = true(after)./test/allreports 4 pre-existing failures on my machine, all unrelated to this change and all reproducing on a cleanupstream/quattrocheckout without this commit:config-test,snapper-testandunowned-system-paths-testrequire anomarchy-pkgscheckout that is not present, andruntime-smoke-testfails on the duplicateomarchy.monitorIPC handler registration (saw 3 for 2 screen(s)) on a two-screen setup.Note on behavior change
This changes a long-standing default. Single-monitor users see no difference whatsoever — the dispatcher is only distinguishable when a second monitor exists. Multi-monitor users who prefer the old follow-the-workspace behavior can restore it in
~/.config/hypr/bindings.luawithhl.unbindplus a plainhl.dsp.focus({ workspace = ... })rebind.🤖 Generated with Claude Code
https://claude.ai/code/session_013ioK67NLii7JC9snL2X3Js