#touchpad #libinput #linux #multi-touch #gesture #config-file

app gestures

Libinput based touchpad gestures program

8 releases (5 breaking)

0.6.0 Mar 12, 2023
0.5.2 Mar 5, 2023
0.5.1 Feb 21, 2023
0.4.0 Jan 30, 2023
0.1.0 Nov 26, 2022

#3 in #touchpad

MIT license

24KB
568 lines

Gestures

About

This is a program for intercepting touchpad gestures and executing commands based on them. Unlike some alternatives, it directly uses the libinput api rather than parsing the output of libinput debug-events.

Features

gestures is able to handle libinput swipe events; not only vertical and horizontal but diagonal as well.

  • Handle libinput events
    • Swipe events; vertical, horizontal and diagonal
    • Pinch events
    • Hold events
    • Rotate events
    • Continuous and one-shot events
  • Config file

Configuration

See config.md for configuration instructions.

Installation

Platforms

Linux. The testing workflow runs on Ubuntu and I test it myself on Artix Linux, but it should work on any distro if it uses the libinput touchpad driver rather than the older synaptics driver.
Note: If your DE/WM has its own touchpad gestures system, it will most likely need to be disabled to prevent conflicts.

Dependencies

You may need to install libudev and libinput, or their equivalant for your distro, and possibly the dev versions as well.

With Cargo

If you have cargo installed, simply use cargo install gestures

Manual installation

  • Clone the repo

    • git clone https://github.com/riley-martin/gestures && cd gestures
  • Build

    • cargo build --release
  • Copy ./target/release/gestures to a convenient place and execute it

Autostart

Compositor/WM

You can start gestures in your .xinitrc or other startup files (like sway config file, for example)

Systemd

Drop examples/gestures.service into ~/.config/systemd/user/gestures.service and modify it for your system (mainly the "$HOME" environment variable and the ExecStart will need changed). To have it start automatically, run systemctl --user enable --now gestures.service.

Other init systems

I haven't used any other init systems, but the service is quite simple so it should be easy to modify for other systems.

Alternatives

Here are some alternatives with similar features.

Dependencies

~12–19MB
~259K SLoC