Repository navigation
Swipe into empty workspaces on Macs - #633
Merged
Merged
Conversation
Hyprland's workspace swipe steps only through workspaces that exist and never out of an empty one into a new one, so on a fresh desktop the Mac swipe did nothing. Stepping by number reaches empty workspaces as Spaces do in macOS. Set before the user's files, so input.lua can turn it back.
The Mac gesture is moving into omarchy-mac's own package, and the runtime keeps no Mac code, so the stepping travels with the gesture. It is set only when Omarchy registers its gesture; a user's own gesture keeps Hyprland's.
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.
Owner check on #629: the three-finger swipe worked with a window open but did nothing between empty workspaces. Hyprland 0.56 has no gesture option for this. Its default steps through existing workspaces only (
m±1), andUnifiedWorkspaceSwipeGesture.cpp:74-75refuses to swipe out of an empty workspace into a new one.gestures:workspace_swipe_use_rsteps by number (r±1), so the swipe reaches empty and new workspaces, as Spaces do in macOS.apple-gestures.luasetsworkspace_swipe_use_r = truewhen it registers Omarchy's Mac gesture, and only then. A user's own gesture, oromarchy_workspace_gesture = false, keeps Hyprland's stepping. It lives in the module so it moves with it into omarchy-mac's package (Hand the Apple desktop leaves to omarchy-mac's setup #631), and the runtime keeps no Mac code. The trade-off is that a user'suse_r = falsenext to Omarchy's gesture is overridden; their own gesture is the way out.Tests:
hyprland-apple-workspace-gesture-test.shchecks that Macs getuse_r, that a user's own gesture or the opt-out doesn't, and that other platforms don't. It fails without the change. The related hyprland/touchpad suites pass.Hardware, with a synthetic uinput 3-finger touchpad and the deployed config (no eval), starting from an empty workspace: the M2 went 5→6→7 (new, empty) and back 7→6→5→4 (with
use_rset before or after the user files), and the M1 went 5→6→7→6→5→4 with this exact module. Swipes do nothing while the screen is locked (WorkspaceSwipeGesture.cpp:15), which explains some earlier "no movement" runs.hyprctl configerrorsis empty on both.Design debate: the numbering is sound (it skips other monitors' and bound workspaces, excludes specials, and
r-1from workspace 1 stays put). It suggested setting the value before the user files. That was adopted first, then moved into the module so the runtime stays free of Mac code under #631.Second review (of the earlier placement): no blocking findings. It confirmed the
r±1semantics, thatend()creates the missing workspace, and no regression on x86.Update after #631 merged: I merged quattro-upstream into this branch. The four lines now sit in
packages/omarchy-mac/share/omarchy/default/hypr/platform/apple-gestures.lua, and git carried them through the rename with no conflict. The #631 layout plus this change is deployed on both Macs:use_rtrue, gesture active, no config errors. On the unlocked M1, a synthetic swipe starting from an empty workspace went 5→6→7→6→5→3; workspace 4 was skipped, which fitsr±1jumping over a workspace held by its other monitor.