Skip to content

Swipe into empty workspaces on Macs - #633

Merged
maralcbr merged 3 commits into
quattro-upstreamfrom
mac/apple-swipe-empty-workspaces
Sep 27, 2026
Merged

maralcbr merged 3 commits into
quattro-upstreamfrom
mac/apple-swipe-empty-workspaces

Conversation

@maralcbr

@maralcbr maralcbr commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

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), and UnifiedWorkspaceSwipeGesture.cpp:74-75 refuses to swipe out of an empty workspace into a new one. gestures:workspace_swipe_use_r steps by number (r±1), so the swipe reaches empty and new workspaces, as Spaces do in macOS.

  • apple-gestures.lua sets workspace_swipe_use_r = true when it registers Omarchy's Mac gesture, and only then. A user's own gesture, or omarchy_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's use_r = false next to Omarchy's gesture is overridden; their own gesture is the way out.
  • The Mac manual says the swipe reaches empty workspaces.
  • x86 and Snapdragon are unchanged.

Tests: hyprland-apple-workspace-gesture-test.sh checks that Macs get use_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_r set 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 configerrors is empty on both.

Design debate: the numbering is sound (it skips other monitors' and bound workspaces, excludes specials, and r-1 from 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±1 semantics, that end() 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_r true, 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 fits r±1 jumping over a workspace held by its other monitor.

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.
@maralcbr
maralcbr merged commit 5d9c688 into quattro-upstream Sep 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant