Gestures
Trackpad gestures for Omarchy/Hyprland: maximize a
window with a tap, swipe between workspaces, and see which one you landed
on. Ships as an Omarchy shell plugin so it's
discoverable via omarchy plugin list, with its actual gesture logic living
in Hyprland's own Lua config (see How it works).
Features
- Maximize width —
SUPER+SHIFT+ trackpad two-finger tap toggles the focused window between floating and full-width "maximized" mode. A real toggle: press again to restore the exact prior floating size/position. - Workspace swipe — trackpad 3-finger swipe left/right moves to the previous/next workspace by number, creating it if it doesn't exist yet. Each swipe flashes the landed-on workspace number in a small auto-dismissing popup.
Planned
- 2-finger pinch to zoom the screen (phone-style magnifier). Registration
is confirmed to work; the actual zoom logic isn't wired up yet — see the
comments in
hypr-bindings.lua.
Tried and dropped
A couple of ideas didn't survive real-world testing. Left in
hypr-bindings.lua as comments so they aren't re-attempted blind:
- Cycle windows while maximized via 2-finger scroll — this touchpad's
scroll method claims 2 fingers for scrolling, so a 2-finger swipe never
reaches Hyprland as a gesture. The horizontal-scroll bind targets
(
mouse_left/mouse_right) exist but don't fire for touchpad horizontal scroll on this setup either. - 3-finger swipe up/down for menu/minimize — worked in isolation, but real 3-finger left/right swipes aren't perfectly axis-aligned, so occasional imprecise swipes got misclassified as "down" and silently minimized whatever window was focused. Dropped rather than chase a stricter angle threshold.
Requirements
- Omarchy on Hyprland with the Lua config layer
(
hl.*/o.*— the Hyprland version this was built against is 0.56.2). - No external packages or dependencies. Everything here uses Hyprland's
built-in Lua API and Omarchy's own
o.bindhelper.
Installation
-
Clone this repo into Omarchy's user plugin directory:
git clone https://github.com/anelcelik/TrackpadGestureOmarchy ~/.config/omarchy/plugins/anel.gestures -
Enable the plugin:
omarchy plugin enable anel.gestures -
Load the gesture bindings. This plugin does not touch your Hyprland config automatically — add this line yourself to
~/.config/hypr/bindings.lua:dofile(os.getenv("HOME") .. "/.config/omarchy/plugins/anel.gestures/hypr-bindings.lua") -
Reload Hyprland:
hyprctl reloadThen check
hyprctl configerrorscomes back empty.
Removal
-
Remove the
dofile(...)line you added to~/.config/hypr/bindings.lua, thenhyprctl reload. -
Disable and remove the plugin:
omarchy plugin disable anel.gestures omarchy plugin remove anel.gestures
Customizing
- Flip the swipe direction: in
hypr-bindings.lua, swap the twohl.gesture({ fingers = 3, direction = "left"/"right", ... })bodies. - Change the maximize gesture's key combo: edit the
o.bind(...)call at the top ofhypr-bindings.lua— see the Hyprland wiki for bind syntax. - Change the popup style/timeout: edit the
hl.notification.create({...})call inswipe_to_workspace.
How it works
Hyprland keybindings and gestures are owned by Hyprland's own Lua config,
not the Omarchy shell — so the actual logic lives in hypr-bindings.lua,
loaded via dofile(...) from ~/.config/hypr/bindings.lua (step 3 of
Installation). manifest.json + Service.qml register this as a proper
Omarchy shell plugin (visible in omarchy plugin list) and are the home
for any future shell-side feature (an OSD toast, a bar widget, etc.) — a
shell-side feature would get its own entry point in manifest.json
alongside "service".