Repository navigation
Add default touchpad gestures #16891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
98c837b
Add default touchpad gestures
dhh afcab82
Put the AI console on three fingers up and the menu on down
dhh 9a61321
Drop the Super + three-finger window move gesture
dhh 1d24255
Find gestures anywhere in the hypr config and keep symlinks in the mi…
dhh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| -- Touchpad gestures. See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Gestures/ | ||
| -- | ||
| -- Hyprland rejects a second gesture on the same fingers and direction, so | ||
| -- overriding one of these means unsetting it first: | ||
| -- hl.gesture({ fingers = 3, direction = "up", action = "unset" }) | ||
| -- Or turn them all off with omarchy_default_gestures = false in hyprland.lua. | ||
|
|
||
| -- Swipe through workspaces, empty ones included. Workspace switches aren't | ||
| -- animated, so the switch lands when the swipe ends rather than dragging the | ||
| -- workspace along under the fingers. | ||
| hl.gesture({ fingers = 3, direction = "left", action = function() hl.dispatch(hl.dsp.focus({ workspace = "r-1" })) end }) | ||
| hl.gesture({ fingers = 3, direction = "right", action = function() hl.dispatch(hl.dsp.focus({ workspace = "r+1" })) end }) | ||
|
|
||
| -- Push up for the AI console, and pull down for the Omarchy menu. | ||
| hl.gesture({ fingers = 3, direction = "up", action = "special", workspace_name = "qconsole" }) | ||
| hl.gesture({ fingers = 3, direction = "down", action = function() hl.dispatch(hl.dsp.global("omarchy:menu.root")) end }) | ||
|
|
||
| -- Four fingers take the active window along to the neighbouring workspace. | ||
| hl.gesture({ fingers = 4, direction = "left", action = function() hl.dispatch(hl.dsp.window.move({ workspace = "r-1" })) end }) | ||
| hl.gesture({ fingers = 4, direction = "right", action = function() hl.dispatch(hl.dsp.window.move({ workspace = "r+1" })) end }) | ||
| hl.gesture({ fingers = 4, direction = "down", action = "fullscreen" }) |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| echo "Keep your own touchpad gestures instead of Omarchy's new defaults" | ||
|
|
||
| # Hyprland rejects a second gesture on the same fingers and direction, so | ||
| # gestures already set up in ~/.config/hypr would now fail against the defaults. | ||
| # Leave those setups as they were by turning the defaults off for them. | ||
| hypr_dir="$HOME/.config/hypr" | ||
| hyprland="$hypr_dir/hyprland.lua" | ||
|
|
||
| [[ -f $hyprland ]] || exit 0 | ||
| grep -qE '^[[:space:]]*omarchy_default_gestures[[:space:]]*=' "$hyprland" && exit 0 | ||
| grep -qE '^[[:space:]]*hl\.gesture[[:space:]]*\(' "$hypr_dir"/*.lua 2>/dev/null || exit 0 | ||
| grep -q '^require("default.hypr.omarchy")' "$hyprland" || exit 0 | ||
|
|
||
| sed -i 's/^require("default.hypr.omarchy")/-- Your own gestures replace Omarchy'"'"'s defaults.\nomarchy_default_gestures = false\n\n&/' "$hyprland" | ||
|
greptile-apps[bot] marked this conversation as resolved.
Resolved
|
||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.