百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

fusuma

> 编程语言
开源

在 Linux 上使用 libinput 驱动的多点触控手势

3.9K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

在 Linux 上使用 libinput 驱动的多点触控手势

Fusuma

Fusuma is a powerful tool designed to enable multitouch gesture recognition on Linux, providing intuitive operations for users. By utilizing gestures like swipes and pinches on laptops and devices with touchpads, you can create a more efficient working environment.

襖(Fusuma) means sliding door used to partition off rooms in a Japanese house.

Features

  • Easy Installation: Easy to install via RubyGems.
  • Flexible Configuration: Customize gestures and actions freely in YAML file format.
  • Sensitivity Settings: Fine-tune gesture recognition with adjustable thresholds and intervals to suit your preferences and enhance precision.
  • Extension through Plugins: A plugin system allows for additional functionality as needed.

Enhance your Linux experience by evolving your interaction with Fusuma!

Installation

Grant permission to read the touchpad device

IMPORTANT: You MUST be a member of the INPUT group to read touchpad by Fusuma.

sudo gpasswd -a $USER input

Then, You apply the change with no logout or reboot.

newgrp input

IMPORTANT: This makes /dev/input/ readable, so if that's an issue for you for some reason (like for privacy- or security concerns etc. or if it causes other parts of your OS to misbehave), consider this your heads-up.

For Debian Based Distros (Ubuntu, Debian, Mint, Pop!_OS)

For Debian Based Distros (Ubuntu, Debian, Mint, Pop!_OS)

1. Install libinput-tools

You need libinput release 1.0 or later.

sudo apt-get install libinput-tools

2. Install Ruby

Fusuma runs in Ruby, so you must install it first.

sudo apt-get install ruby

3. Install Fusuma

sudo gem install fusuma

4. Install xdotool (optional)

For sending shortcuts:

sudo apt-get install xdotool
For Arch Based Distros (Manjaro, Arch)

For Arch Based Distros (Manjaro, Arch)

1. Install libinput.

You need libinput release 1.0 or later. This is most probably installed by default on Manjaro

sudo pacman -Syu libinput-tools

2. Install Ruby

Fusuma runs in Ruby, so you must install it first.

sudo pacman -Syu ruby

3. Install Fusuma

Note: By default in Arch Linux, when running gem, gems are installed per-user (into ~/.gem/ruby/), instead of system-wide (into /usr/lib/ruby/gems/). This is considered the best way to manage gems on Arch, because otherwise they might interfere with gems installed by Pacman. (From Arch Wiki)

To install gems system-wide, see any of the methods listed on Arch Wiki

sudo gem install fusuma

4. Install xdotool (optional)

For sending shortcuts:

sudo pacman -Syu xdotool

For the truly lazy people: As with pretty much anything else available as Open-Source-Software, you can install Fusuma via a package from the AUR. The package you would want is called ruby-fusuma.

Please keep in mind that this community-built package is NOT officially supported here and while it might do the job, it is not the intended way to install. Installing Fusuma this way means that if things do not work as intended during or after the installation, you are on your own. So please do not bombard the Issues-Page here on Github if Fusuma isn't working correctly after installing it via the AUR. Fusuma's plugins as listed below here in this Readme can be installed as optional dependencies also via the AUR, namescheme being ruby-fusuma-replacewithnameofplugin.

For Fedora

For Fedora

1. Install libinput-tools

You need libinput release 1.0 or later.

sudo dnf install libinput

2. Install Ruby

Fusuma runs in Ruby, so you must install it first.

sudo dnf install ruby

3. Install Fusuma

sudo gem install fusuma

4. Install xdotool (optional)

For sending shortcuts:

sudo dnf install xdotool

Touchpad not working in GNOME

Ensure the touchpad events are being sent to the GNOME desktop by running the following command:

gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled

Usage

fusuma

Update

sudo gem update fusuma

Customize Gesture Mapping

You can customize the settings for gestures to put and edit ~/.config/fusuma/config.yml. NOTE: You will need to create the ~/.config/fusuma directory if it doesn't exist yet.

mkdir -p ~/.config/fusuma        # create config directory
nano ~/.config/fusuma/config.yml # edit config file.

Available gestures

swipe:

  • support 3:, 4: fingers
  • support left:, right:, up:, down: directions
  • support begin:, update:, end: events

pinch:

  • support 2:, 3:, 4: fingers
  • support in:, out: directions
  • support begin:, update:, end: events

rotate:

  • support 2:, 3:, 4: fingers
  • support clockwise:,counterclockwise: directions
  • support begin:, update:, end: events

hold:

  • require libinput version 1.19.0 or later
  • support 1:, 2:, 3:, 4: fingers
  • support begin:, end:, cancelled: events

About YAML Basic Syntax

  • Comments in YAML begins with the # character.
  • Comments must be separated from other tokens by whitespaces.
  • Indentation of whitespace is used to denote structure.
  • Tabs are not included as indentation for YAML files.

Example: Gesture Mapping for Ubuntu

https://github.com/iberianpig/fusuma/wiki/Ubuntu

…

More Example of config.yml

The following wiki pages can be edited by everyone.

  • Ubuntu
  • elementary OS
  • i3
  • KDE to mimic MacOS
  • Pop!_OS with Cinnamon
  • Pop!_OS Default Gnome
  • Ubuntu OS to mimic Mac a little
  • 3 fingers Drag (OS X Style)
  • 3 fingers Alt Tab Switcher(Windows Style)

If you have a nice configuration, please share ~/.config/fusuma/config.yml with everyone.

Threshold and Interval

if command: properties are blank, the swipe/pinch/hold doesn't execute command.

threshold: is sensitivity to swipe/pinch/hold. Default value is 1. If the swipe's threshold is 0.5, shorten swipe-length by half.

interval: is delay between swipes/pinches/hold. Default value is 1. If the swipe's interval is 0.5, shorten swipe-interval by half to recognize a next swipe.

Example of threshold: / interval: settings

…

There are three priorities of threshold: and interval:. The individual threshold: and interval: settings (under "direction") have a higher priority than the global one (under "root")

  1. child elements in the direction (left/right/down/up → threshold/interval)
  2. root child elements (threshold/interval → swipe/pinch/hold)
  3. default value (= 1)

command: property for assigning commands

On fusuma version 0.4 command: property is available! You can assign any command each gestures.

shortcut: property is deprecated, it was removed on fusuma version 1.0. You need to replace to command: property.

swipe:
  3:
    left:
-      shortcut: 'alt+Left'
+      command: 'xdotool key alt+Left'
    right:
-      shortcut: 'alt+Right'
+      command: 'xdotool key alt+Right'

About xdotool

  • xdotool manual (https://github.com/jordansissel/xdotool/blob/master/xdotool.pod)
  • Available keys' hint (https://github.com/jordansissel/xdotool/issues/212#issuecomment-406156157)

NOTE: xdotool has some issues

  • Gestures take a few seconds to react(https://github.com/iberianpig/fusuma/issues/113)

Alternatives to xdotool

  • fusuma-plugin-sendkey

    • Emulates keyboard events
    • Low latency
    • Wayland compatible
  • xte

    • xte(1) - Linux man page
    • install with sudo apt install xautomation
  • ydotool

    • Wayland compatible
    • Needs more maintainers.

Options

  • -c, --config=path/to/file : Use an alternative config file
  • -d, --daemon : Daemonize process
  • -l, --list-devices : List available devices
  • -v, --verbose : Show details about the results of running fusuma
  • --version : Show fusuma version
  • --log-file=path/to/file : Set path of log file

Specify touchpads by device name

Set the following options to recognize multi-touch gestures only for the specified touchpad device.

plugin:
  filters:
    libinput_device_filter:
      keep_device_names:
        - "BUILT-IN TOUCHPAD NAME"
        - "EXTERNAL TOUCHPAD NAME"

Autostart

Method 1: Using gnome-session-properties

  1. Check the path where you installed fusuma with which fusuma
  2. Open gnome-session-properties
  3. Add Fusuma and enter the location where the above path was checked in the command input field
  4. Add the -d option at the end of the command input field

Method 2: Creating a Desktop Entry Manually

  1. Check the path where you installed fusuma with which fusuma
  2. Create a new file named fusuma.desktop in the ~/.config/autostart/ directory.
  3. Add the following content to the fusuma.desktop file:
[Desktop Entry]
Name=fusuma
Comment=run fusuma
Exec={path_to_fusuma} -d --log=/tmp/fusuma.log
Icon=input-touchpad
X-GNOME-Autostart-enabled=true
Type=Application

Replace {path_to_fusuma} with the path obtained from which fusuma. 4. Save the file and ensure its permissions are correctly set to be executable. 5. Restart your system or session to verify that fusuma starts automatically.

Method 3: systemd user service

Useful when you want fusuma to be supervised by systemd (auto-restart on failure, journal-based logs, start/stop with systemctl --user).

  1. Check the path where you installed fusuma with which fusuma
  2. Create ~/.config/systemd/user/fusuma.service with the following content. Replace {path_to_fusuma} with the path from step 1.
[Unit]
Description=Fusuma (multitouch gesture recognizer)
Documentation=https://github.com/iberianpig/fusuma
PartOf=graphical-session.target
After=graphical-session.target

[Service]
Type=simple
ExecStart={path_to_fusuma}
Restart=on-failure
RestartSec=3
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=graphical-session.target
  1. Reload, enable, and start the service:
systemctl --user daemon-reload
systemctl --user enable --now fusuma.service
  1. Verify it is running and inspect logs:
systemctl --user status fusuma.service
journalctl --user -u fusuma.service -f

Notes:

  • Do not pass -d / --daemon; systemd manages the process itself, so fusuma should run in the foreground (Type=simple).
  • Make sure your user is in the input group (see Grant permission to read the touchpad device).
  • graphical-session.target is started by your desktop session manager. If the service does not start at login, your session may not pull the target in — replace both graphical-session.target lines with default.target, or start the service manually with systemctl --user start fusuma.service.
  • If you i

GitHub Issues· 24 开放

在 GitHub 查看全部
  • #361

    fusuma exits with code 1 on SIGTERM

    更新于 2026年5月28日
  • #267

    Update to 2.3.0, strange behaviour on Wayland

    更新于 2025年12月1日
  • #306

    hold threshold not working

    enhancement更新于 2025年11月6日
  • #348

    Limit begin: and end: to swiping in specific directions

    更新于 2025年10月24日
  • #293

    [Question]is it usable for touchscreen?

    更新于 2025年7月8日
  • #340

    Mouse Left & Right click hold not usable with hold:1 enabled

    更新于 2025年3月5日
  • #337

    hold-drag gesture

    enhancement更新于 2025年2月17日
  • #335

    Can fusuma use flatpak: `device=input|all` permission instead of requiring `input` group?

    更新于 2025年2月17日
  • #320

    Tap & Drag (Retain Tap Threshold When Finger Lifted)

    enhancement更新于 2024年6月22日
  • #310

    [Feature request] Slant(diagonal) swiping gestures

    更新于 2024年2月11日

核心特点

  • •Easy Installation: Easy to install via RubyGems.
  • •Flexible Configuration: Customize gestures and actions freely in YAML file format.
  • •Sensitivity Settings: Fine-tune gesture recognition with adjustable thresholds and intervals to suit your preferences and enhance precision.
  • •Extension through Plugins: A plugin system allows for additional functionality as needed.
  • •support 3:, 4: fingers
  • •support left:, right:, up:, down: directions
  • •support begin:, update:, end: events
  • •support 2:, 3:, 4: fingers
  • •support in:, out: directions
  • •support begin:, update:, end: events

> 标签

Rubygesturegesture-recognitionlibinputlinux

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言