Skip to content

Add support for using a different amount of fingers for swiping.#315

Open
MagneFire wants to merge 1 commit intoniri-wm:mainfrom
MagneFire:f/gesture-swipe-finger
Open

Add support for using a different amount of fingers for swiping.#315
MagneFire wants to merge 1 commit intoniri-wm:mainfrom
MagneFire:f/gesture-swipe-finger

Conversation

@MagneFire
Copy link
Copy Markdown

This removes the hardcoded prerequisite of using three fingers to use the swipe gesture. Instead one can configure it by setting gesture-swipe-fingers in the input section.

A working example is:

input {
    gesture-swipe-fingers 4
}

This removes the hardcoded prerequisite of using three fingers to use the swipe gesture.
Instead one can configure it by setting `gesture-swipe-fingers` in the `input` section.

A working example is:
```
input {
    gesture-swipe-fingers 4
}
```

Signed-off-by: Darrel Griët <dgriet@gmail.com>
@YaLTeR
Copy link
Copy Markdown
Member

YaLTeR commented May 3, 2024

Sorry for taking a while to respond. The reason is that I was thinking of different ways to configure this that don't impact future extensibility. For example, I'm thinking of possibly adding a different swipe gesture that will use 4 fingers, in addition to the current gestures using 3.

What's your use case for this, why do you want to change it?

@MagneFire
Copy link
Copy Markdown
Author

Sorry for taking a while to respond. The reason is that I was thinking of different ways to configure this that don't impact future extensibility. For example, I'm thinking of possibly adding a different swipe gesture that will use 4 fingers, in addition to the current gestures using 3.

Hehe, no worries. I'm thankful for you giving the time to respond 😄

I thought about this too, as in creating a Gesture struct to store all gesture related configuration (not too dissimilar to Hyprland https://wiki.hyprland.org/Configuring/Variables/#gestures).

But as this struct would only contain one option decided to keep it simple and perhaps discuss this in this PR 😉

What's your use case for this, why do you want to change it?

I'm currently using fusuma to have the three finger horizontal gesture setup for previous and next actions (alt+Right and alt+Left). The vertical gesture is used for volume control. The four fingers gesture is setup for workspace related gestures.

This works well for me with GNOME and Hyprland, which is why I wanted the same thing for niri.

@YaLTeR YaLTeR mentioned this pull request May 21, 2024
@Sempyos Sempyos added area:input Keyboard, mouse, touchpad, tablet, gestures, pointer area:config Config parsing, default config, new settings pr kind:feature New features and functionality labels Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:config Config parsing, default config, new settings area:input Keyboard, mouse, touchpad, tablet, gestures, pointer pr kind:feature New features and functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants