Skip to content

Add default touchpad gestures - #16891

Merged
dhh merged 4 commits into
quattrofrom
touchpad-gestures
Oct 28, 2026
Merged

dhh merged 4 commits into
quattrofrom
touchpad-gestures

Conversation

@dhh

@dhh dhh commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Turns on a set of touchpad gestures by default. Until now gestures were only commented-out examples.

Gesture Action
3 fingers left / right Previous / next workspace, empty ones included (r±1)
3 fingers up Toggle the AI console (special:qconsole)
3 fingers down Open the Omarchy menu, through the shell's global shortcut so nothing is spawned
4 fingers left / right Move the active window to the previous / next workspace
4 fingers down Toggle fullscreen

Horizontal swipes dispatch a workspace change when the swipe ends instead of using Hyprland's tracked workspace gesture. Workspace switching isn't animated, and dragging the workspace under the fingers felt off next to that.

Overriding

Hyprland rejects a second gesture on the same fingers and direction ("Gesture will be overshadowed by a previous gesture"), and the first one registered wins. Since the defaults load before the user's config, there are two ways out:

  • hl.gesture({ fingers = 3, direction = "up", action = "unset" }) before binding a replacement (shown in config/hypr/input.lua and the manual).
  • omarchy_default_gestures = false in hyprland.lua turns them all off, like omarchy_default_bindings.

Migration

Anyone who already has an active hl.gesture( in ~/.config/hypr/*.lua (for example, the horizontal-workspace example the manual used to suggest) would start getting config errors. The migration inserts omarchy_default_gestures = false above require("default.hypr.omarchy") for those users only, so their gestures keep working as before. A blanket unset block wasn't an option: unsetting a gesture that isn't bound is itself a config error.

Testing

  • All the gesture lines were tried on a live Hyprland 0.56.2 session with no hyprctl configerrors, and behaviour (unset then rebind, duplicate shadowing, unsetting a missing gesture) was checked there too.
  • Ran the migration against temporary homes with gestures, with only commented examples, without the stock require line, without a config, and a second time over its own result.
  • test/shell.d/hyprland-default-config-test.sh passes.

🤖 Generated with Claude Code

dhh and others added 3 commits October 28, 2026 05:13
Three fingers swipe between workspaces (empty ones included), pull down
the AI console, open the Omarchy menu, and move the active window with
Super held. Four fingers carry the active window to the neighbouring
workspace or toggle fullscreen.

Hyprland rejects a second gesture on the same fingers and direction, so
omarchy_default_gestures = false turns them off, and a migration sets it
for anyone who already has gestures of their own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are addressed.

Summary

Adds default touchpad gestures for workspaces, window movement, the AI console, the menu, and fullscreen.

  • Trackpad swipes now switch workspaces, open desktop tools, and control windows.
  • Existing gesture setups keep control after the new defaults arrive.

Reviews (2) · Last reviewed commit: "Find gestures anywhere in the hypr confi..." · Reviewed by Greptile

Comment thread migrations/1793179949.sh Resolved
Comment thread migrations/1793179949.sh Resolved
…gration

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dhh
dhh merged commit 1e452a0 into quattro Oct 28, 2026
2 checks passed
@dhh
dhh deleted the touchpad-gestures branch October 28, 2026 10:24
@keylimesoda

Copy link
Copy Markdown

@dhh Great change! Been putting the three-finger swipe on every laptop I've installed Omarchy on, first-thing. Perfect mapping for workspace swap.

Just one vote, but in my experience, a finger-tracked/direct-manipulation gesture animation here feels much better than a hard swap, given that you're using touch. hyprland supports this kind of 1:1 animation control for the workspace change: https://wiki.hypr.land/0.56.0/Configuring/Advanced-and-Cool/Gestures/

@emirb emirb added this to the 4.6.0 milestone Nov 5, 2026
chrisohearn added a commit to chrisohearn/omarchy-m5p-oled that referenced this pull request Nov 16, 2026
Omarchy's default gestures (omacom/omarchy#16891) send a three-finger
swipe left to the previous workspace, on purpose. The owner wants the
macOS direction, where the desktop follows the fingers.

linux/input/k114s-mac-swipes adds a marked block (mac-swipes.lua) to
~/.config/hypr/input.lua, which loads after the defaults: it unsets the
3- and 4-finger left/right gestures and sets them reversed. Install,
--check and --undo work like k114s-dcp-colour; install refuses while an
unmarked line sets one of those gestures (Hyprland rejects duplicates).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chrisohearn added a commit to chrisohearn/omarchy-m5p-oled that referenced this pull request Nov 16, 2026
…e) (#155)

* Input: Mac-style workspace swipes as a managed block (owner preference)

Omarchy's default gestures (omacom/omarchy#16891) send a three-finger
swipe left to the previous workspace, on purpose. The owner wants the
macOS direction, where the desktop follows the fingers.

linux/input/k114s-mac-swipes adds a marked block (mac-swipes.lua) to
~/.config/hypr/input.lua, which loads after the defaults: it unsets the
3- and 4-finger left/right gestures and sets them reversed. Install,
--check and --undo work like k114s-dcp-colour; install refuses while an
unmarked line sets one of those gestures (Hyprland rejects duplicates).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* k114s-mac-swipes: refuse unbalanced markers, find clashing gestures in any form, keep a symlinked input.lua a link

Review of #155:
- a begin line without its end line made strip() drop every line below
  it, and install or undo then wrote the truncated file; any unmatched
  or repeated marker now stops every action with nothing changed
- the clash check needed fingers before direction on one line; it now
  reads each active hl.gesture call whole, in any field order and over
  several lines, and counts direction = "horizontal" too
- mv replaced a symlinked input.lua with a plain file; the script now
  edits the link's target

Each new test fails on the previous script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants