Skip to content

feat: configurable touch gestures#1

Closed
julianjc84 wants to merge 5 commits into
Atan-D-RP4:feat/touch-gesturesfrom
julianjc84:feat/touch-gestures
Closed

feat: configurable touch gestures#1
julianjc84 wants to merge 5 commits into
Atan-D-RP4:feat/touch-gesturesfrom
julianjc84:feat/touch-gestures

Conversation

@julianjc84
Copy link
Copy Markdown

Really like the touch gesture implementation — great foundation to build on. I've made some
improvements based on a few of the suggestions:

  • Made gestures fully configurable (finger count, sensitivity, natural-scroll per gesture)
  • Added a recognition-threshold setting for gesture direction locking
  • Split the gesture logic into its own touch_gesture.rs module for clarity
  • Updated the wiki docs to cover all new options

Atan-D-RP4 and others added 5 commits March 9, 2026 23:17
- Brings the touchscreen gestures to parity with touchpad/trackpad
  gestures, as best I can tell
- Matches behavior of touchpad gestures closely
- Updated docs with `Since` annotation
- Added natural-scroll config option for touchscreen gestures
Adds configurable multi-finger touch gesture support with
per-gesture settings for finger count, sensitivity, and
natural scroll. A standalone GTK4/Libadwaita settings app
(niri-touch-settings) is available as a separate project.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Atan-D-RP4
Copy link
Copy Markdown
Owner

Have you taken a look at the discussions on the gesture bindings upstream?

There's a lot of things to consider for this. And one thing I really want is exposing the gesture progress state somehow so users can make their own custom animated gestures through scripts and stuff.

Right now, I want this PR to only match existing touchpad gestures.

I'm open to building on your work here on a separate PR branch, or something, where we can experiment with more designs to the interface.

@Atan-D-RP4
Copy link
Copy Markdown
Owner

I would actually suggest that you PR this work upstream, at least as a draft, so that it'll have more eyes on it.

@julianjc84
Copy link
Copy Markdown
Author

Thankyou, I will look upstream and take on recommended suggestions.

@julianjc84
Copy link
Copy Markdown
Author

niri-wm#3771

@Atan-D-RP4
Copy link
Copy Markdown
Owner

Nice. Also, sidenote; is it that easy to work with GTK4/libadwaita in Rust? You built a whole GUI settings app with it!

Also, have you considered adding any scaffolding/infra for screen-edge gestures (only top/bottom, since the discussion in niri-wm#372 mentions we should leave left/right for apps)?

@julianjc84
Copy link
Copy Markdown
Author

Ill be honest, ClaudeCode did all he heavy lifting in regards to building.

I have had a good read of the 372 discussion.
implementing features and having a GUI is problematic for corruption in how niri uses kdl configs.
I really like the work you did on LUA and will be looking at this and implementing.
from a GUI standpoint for easy config changes its the right way forward for having a corrupt free config UI editing.
It might not be the right way forward for the main niri project. but will make these custom developments way easier to expose / test / play.

@Atan-D-RP4
Copy link
Copy Markdown
Owner

I really like the work you did on LUA and will be looking at this and implementing. from a GUI standpoint for easy config changes its the right way forward for having a corrupt free config UI editing. It might not be the right way forward for the main niri project. but will make these custom developments way easier to expose / test / play.

Do you mean my lua or lua-stable branchs?

If so, then most of those I constructed with Opus 4.5 on the OpenCode harness back in December-January. When pricing on that was much more liberal through gh-copilot.

There's a ton of bloat, and over-engineering in them and I'm also exploring a better approach to doing with hooks into the core niri API using trampolines or something in a way that Hyprland does it. I was much less knowledgeable about the codebase and WL compositors and graphics in general back then.

Haven't gotten to cleaning that up yet.

@julianjc84
Copy link
Copy Markdown
Author

I'm trying to get a better understanding of the config files.

The niri kdl config file is good when you manually editing it manually but when you have a gui interface that wants to write to it that's where things got complicated for me.

I'm a big fan of the gui to save config settings. config settings are going to get pretty big pretty fast with
Touchscreen
Touchpad
Mouse
Cursor
Etc.
Gesture bindings,
The only way I was able to make the gui work with the config file kdl was to have an include and it writes to its own separate file. I was having all sorts of corruption issues otherwise.
This is what got me thinking of the lua format.

Also the structure of the manual kdl file seems open and no defined standards just some concepts?

@Atan-D-RP4 Atan-D-RP4 force-pushed the feat/touch-gestures branch from 0e4c279 to fc3b467 Compare April 8, 2026 20:30
@julianjc84 julianjc84 deleted the branch Atan-D-RP4:feat/touch-gestures April 11, 2026 14:15
@julianjc84 julianjc84 closed this Apr 11, 2026
@julianjc84 julianjc84 deleted the feat/touch-gestures branch April 11, 2026 14:15
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.

2 participants