{"id":13593273,"url":"https://github.com/iberianpig/fusuma","last_synced_at":"2025-05-13T20:07:04.628Z","repository":{"id":40694137,"uuid":"69813387","full_name":"iberianpig/fusuma","owner":"iberianpig","description":"Multitouch gestures with libinput driver on Linux","archived":false,"fork":false,"pushed_at":"2025-04-12T18:57:19.000Z","size":783,"stargazers_count":3767,"open_issues_count":19,"forks_count":150,"subscribers_count":38,"default_branch":"main","last_synced_at":"2025-05-06T01:59:14.146Z","etag":null,"topics":["gesture","gesture-recognition","libinput","linux","swipe","touchpad"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iberianpig.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["iberianpig"]}},"created_at":"2016-10-02T18:13:48.000Z","updated_at":"2025-05-04T14:52:45.000Z","dependencies_parsed_at":"2023-09-24T07:04:07.780Z","dependency_job_id":"cefcd458-a785-4f4b-8f5b-f51907c8aadf","html_url":"https://github.com/iberianpig/fusuma","commit_stats":{"total_commits":548,"total_committers":21,"mean_commits":"26.095238095238095","dds":0.09671532846715325,"last_synced_commit":"d4bbcce2d6e2e152b84cf0d3a9d9ecbca2c3f947"},"previous_names":[],"tags_count":86,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iberianpig%2Ffusuma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iberianpig%2Ffusuma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iberianpig%2Ffusuma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iberianpig%2Ffusuma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iberianpig","download_url":"https://codeload.github.com/iberianpig/fusuma/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252606930,"owners_count":21775413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gesture","gesture-recognition","libinput","linux","swipe","touchpad"],"created_at":"2024-08-01T16:01:18.663Z","updated_at":"2025-05-06T01:59:20.420Z","avatar_url":"https://github.com/iberianpig.png","language":"Ruby","funding_links":["https://github.com/sponsors/iberianpig"],"categories":["Ruby","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# Fusuma\n![Gem](https://img.shields.io/gem/v/fusuma?color=brightgreen) [![Build Status](https://github.com/iberianpig/fusuma/actions/workflows/main.yml/badge.svg)](https://github.com/iberianpig/fusuma/actions/workflows/main.yml)\n\nFusuma 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.\n\n![fusuma_image](https://repository-images.githubusercontent.com/69813387/60879a00-166c-11ea-9875-3bf0818c62ec)\n\n襖(Fusuma) means sliding door used to partition off rooms in a Japanese house.\n\n## Features\n\n- **Easy Installation**: Quick setup via RubyGems.\n- **Flexible Configuration**: Customize gestures and actions freely in YAML file format.\n- **Sensitivity Settings**: Fine-tune gesture recognition with adjustable thresholds and intervals to suit your preferences and enhance precision.\n- **Extension through Plugins**: A [plugin system](https://github.com/iberianpig/fusuma/#fusuma-plugins) allows for additional functionality as needed.\n\nEnhance your Linux experience by evolving your interaction with Fusuma!\n\n## Installation\n\n### Grant permission to read the touchpad device\n\n**IMPORTANT**: You **MUST** be a member of the **INPUT** group to read touchpad by Fusuma.\n\n```sh\nsudo gpasswd -a $USER input\n```\n\nThen, You apply the change with no logout or reboot.\n\n```sh\nnewgrp input\n```\n\n**IMPORTANT**: This makes `/dev/input/` readable, so if that's an issue for you for some reason (like for privacy- or securityconcerns etc. or if it causes other parts of your OS to misbehave), **consider this your heads-up.** \n\n\u003cdetails\u003e\n\u003csummary\u003eFor Debian Based Distros (Ubuntu, Debian, Mint, Pop!_OS)\u003c/summary\u003e\n\n### For Debian Based Distros (Ubuntu, Debian, Mint, Pop!_OS)\n\n#### 1. Install libinput-tools\n\nYou need `libinput` release 1.0 or later.\n\n```sh\nsudo apt-get install libinput-tools\n```\n\n#### 2. Install Ruby\n\nFusuma runs in Ruby, so you must install it first.\n\n```sh\nsudo apt-get install ruby\n```\n\n#### 3. Install Fusuma\n\n```sh\nsudo gem install fusuma\n```\n\n#### 4. Install xdotool (optional)\n\nFor sending shortcuts:\n\n```sh\nsudo apt-get install xdotool\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e For Arch Based Distros (Manjaro, Arch) \u003c/summary\u003e\n\n### For Arch Based Distros (Manjaro, Arch)\n\n#### 1. Install libinput.\n\nYou need `libinput` release 1.0 or later. This is most probably installed by default on Manjaro\n\n```sh\nsudo pacman -Syu libinput\n```\n\n#### 2. Install Ruby\n\nFusuma runs in Ruby, so you must install it first.\n\n```sh\nsudo pacman -Syu ruby\n```\n\n#### 3. Install Fusuma\n\n**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)\n\nTo install gems system-wide, see any of the methods listed on [Arch Wiki](https://wiki.archlinux.org/index.php/ruby#Installing_gems_system-wide)\n\n```sh\nsudo gem install fusuma\n```\n\n#### 4. Install xdotool (optional)\n\nFor sending shortcuts:\n\n```sh\nsudo pacman -Syu xdotool\n```\n**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. As off time of writing (March 2023), the package you would want is called `ruby-fusuma`.\n\nPlease 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.\nInstalling Fusuma this way means that if things do not work as intended during or after the installation, you are on your own.\nSo please do not bombard the Issues-Page here on Github if Fusuma isn't working correctly after installing it via the AUR.\nFusuma's plugins as listed below here in this Readme can be installed as optional dependencies also via the AUR, namescheme being `ruby-fusuma-replacewithnameofplugin`.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eFor Fedora\u003c/summary\u003e\n\n### For Fedora\n\n#### 1. Install libinput-tools\n\nYou need `libinput` release 1.0 or later.\n\n```sh\nsudo dnf install libinput\n```\n\n#### 2. Install Ruby\n\nFusuma runs in Ruby, so you must install it first.\n\n```sh\nsudo dnf install ruby\n```\n\n#### 3. Install Fusuma\n\n```sh\nsudo gem install fusuma\n```\n\n#### 4. Install xdotool (optional)\n\nFor sending shortcuts:\n\n```sh\nsudo dnf install xdotool\n```\n\u003c/details\u003e\n\n### Touchpad not working in GNOME\n\nEnsure the touchpad events are being sent to the GNOME desktop by running the following command:\n\n```sh\ngsettings set org.gnome.desktop.peripherals.touchpad send-events enabled\n```\n\n## Usage\n\n```sh\nfusuma\n```\n\n## Update\n\n```sh\nsudo gem update fusuma\n```\n\n## Customize Gesture Mapping\n\nYou can customize the settings for gestures to put and edit `~/.config/fusuma/config.yml`.\n**NOTE: You will need to create the `~/.config/fusuma` directory if it doesn't exist yet.**\n\n```sh\nmkdir -p ~/.config/fusuma        # create config directory\nnano ~/.config/fusuma/config.yml # edit config file.\n```\n\n\n### Available gestures\n\n#### swipe:\n\n * support `3:`, `4:` fingers\n * support `left:`, `right:`, `up:`, `down:` directions\n * support `begin:`, `update:`, `end:` events\n\n#### pinch:\n\n * support `2:`, `3:`, `4:` fingers\n * support `in:`, `out:` directions\n * support `begin:`, `update:`, `end:` events\n\n#### rotate:\n\n * support `2:`, `3:`, `4:` fingers\n * support `clockwise:`,`counterclockwise:` directions\n * support `begin:`, `update:`, `end:` events\n\n#### hold:\n * require libinput version 1.19.0 or later\n * support `1:`, `2:`, `3:`, `4:` fingers\n * support `begin:`, `end:`, `cancelled:` events\n\n### About YAML Basic Syntax\n\n- Comments in YAML begins with the `#` character.\n- Comments must be separated from other tokens by whitespaces.\n- Indentation of whitespace is used to denote structure.\n- Tabs are not included as indentation for YAML files.\n\n### Example: Gesture Mapping for Ubuntu\n\nhttps://github.com/iberianpig/fusuma/wiki/Ubuntu\n\n```yaml\nswipe:\n  3:\n    left:\n      command: \"xdotool key alt+Right\" # History forward\n    right:\n      command: \"xdotool key alt+Left\" # History back\n    up:\n      command: \"xdotool key super\" # Activity\n    down:\n      command: \"xdotool key super\" # Activity\n  4:\n    left:\n      command: \"xdotool key ctrl+alt+Down\" # Switch to next workspace\n    right:\n      command: \"xdotool key ctrl+alt+Up\" # Switch to previous workspace\n    up:\n      command: \"xdotool key ctrl+alt+Down\" # Switch to next workspace\n    down:\n      command: \"xdotool key ctrl+alt+Up\" # Switch to previous workspace\npinch:\n  in:\n    command: \"xdotool keydown ctrl click 4 keyup ctrl\" # Zoom in\n  out:\n    command: \"xdotool keydown ctrl click 5 keyup ctrl\" # Zoom out\nhold:\n  4:\n    command: \"xdotool key super\" # Activity\n```\n\n### More Example of config.yml\n\nThe following wiki pages can be edited by everyone.\n\n- [Ubuntu](https://github.com/iberianpig/fusuma/wiki/Ubuntu)\n- [elementary OS](https://github.com/iberianpig/fusuma/wiki/elementary-OS)\n- [i3](https://github.com/iberianpig/fusuma/wiki/i3)\n- [KDE to mimic MacOS](https://github.com/iberianpig/fusuma/wiki/KDE-to-mimic-MacOS)\n- [Pop!_OS with Cinnamon](https://github.com/iberianpig/fusuma/wiki/POP-OS-with-Cinnamon)\n- [Pop!_OS Default Gnome](https://github.com/iberianpig/fusuma/wiki/PopOS-Default-Gnome)\n- [Ubuntu OS to mimic Mac a little](https://github.com/iberianpig/fusuma/wiki/Ubuntu-OS-to-mimic-Mac-a-little)\n- [3 fingers Drag (OS X Style)](https://github.com/iberianpig/fusuma/wiki/3-fingers-Drag-(OS-X-Style))\n- [3 fingers Alt Tab Switcher(Windows Style)](https://github.com/iberianpig/fusuma/wiki/3-fingers-Alt-Tab-Switcher(Windows-Style))\n\nIf you have a nice configuration, please share `~/.config/fusuma/config.yml` with everyone.\n\n### Threshold and Interval\n\nif `command:` properties are blank, the swipe/pinch/hold doesn't execute command.\n\n`threshold:` is sensitivity to swipe/pinch/hold. Default value is 1.\nIf the swipe's threshold is `0.5`, shorten swipe-length by half.\n\n`interval:` is delay between swipes/pinches/hold. Default value is 1.\nIf the swipe's interval is `0.5`, shorten swipe-interval by half to recognize a next swipe.\n\n### Example of `threshold:` / `interval:` settings\n\n```yaml\nswipe:\n  3:\n    left:\n      command: 'xdotool key alt+Right' # threshold: 0.5, interval: 0.75\n      threshold: 0.5\n    right:\n      command: 'xdotool key alt+Left' # threshold: 0.5, interval: 0.75\n      threshold: 0.5\n    up:\n      command: 'xdotool key super' # threshold: 1, interval: 0.75\n    down:\n      command: 'xdotool key super' # threshold: 1, interval: 0.75\npinch:\n  2:\n    in:\n      command: \"xdotool keydown ctrl click 4 keyup ctrl\" # threshold: 0.5, interval: 0.5\n    out:\n      command: \"xdotool keydown ctrl click 5 keyup ctrl\" # threshold: 0.5, interval: 0.5\n\nthreshold:\n  pinch: 0.5\n\ninterval:\n  swipe: 0.75\n  pinch: 0.5\n```\n\nThere are three priorities of `threshold:` and `interval:`.\nThe individual `threshold:` and `interval:` settings (under \"direction\") have a higher priority than the global one (under \"root\")\n\n1. child elements in the direction (left/right/down/up → threshold/interval)\n1. root child elements (threshold/interval → swipe/pinch/hold)\n1. default value (= 1)\n\n### `command:` property for assigning commands\n\nOn fusuma version 0.4 `command:` property is available!\nYou can assign any command each gestures.\n\n**`shortcut:` property is deprecated**, **it was removed on fusuma version 1.0**.\nYou need to replace to `command:` property.\n\n```diff\nswipe:\n  3:\n    left:\n-      shortcut: 'alt+Left'\n+      command: 'xdotool key alt+Left'\n    right:\n-      shortcut: 'alt+Right'\n+      command: 'xdotool key alt+Right'\n```\n\n### About xdotool\n\n- xdotool manual (https://github.com/jordansissel/xdotool/blob/master/xdotool.pod)\n- Available keys' hint (https://github.com/jordansissel/xdotool/issues/212#issuecomment-406156157)\n\n**NOTE: xdotool has some issues**\n\n- Gestures take a few seconds to react(https://github.com/iberianpig/fusuma/issues/113)\n\n#### Alternatives to xdotool\n\n- [fusuma-plugin-sendkey](https://github.com/iberianpig/fusuma-plugin-sendkey)\n  - Emulates keyboard events\n  - Low latency\n  - Wayland compatible\n\n- `xte`\n  - [xte(1) - Linux man page](https://linux.die.net/man/1/xte)\n  - install with `sudo apt install xautomation`\n\n- [ydotool](https://github.com/ReimuNotMoe/ydotool)\n  - Wayland compatible\n  - Needs more maintainers.\n\n\n\n## Options\n\n- `-c`, `--config=path/to/file` : Use an alternative config file\n- `-d`, `--daemon` : Daemonize process\n- `-l`, `--list-devices` : List available devices\n- `-v`, `--verbose` : Show details about the results of running fusuma\n- `--version` : Show fusuma version\n- `--log-file=path/to/file` : Set path of log file\n\n### Specify touchpads by device name\nSet the following options to recognize multi-touch gestures only for the specified touchpad device.\n\n```yaml\nplugin:\n  filters:\n    libinput_device_filter:\n      keep_device_names:\n        - \"BUILT-IN TOUCHPAD NAME\"\n        - \"EXTERNAL TOUCHPAD NAME\"\n```\n\n## Autostart\n\n### Method 1: Using gnome-session-properties\n\n1. Check the path where you installed fusuma with `which fusuma`\n2. Open `gnome-session-properties`\n3. Add Fusuma and enter the location where the above path was checked in the command input field\n4. Add the `-d` option at the end of the command input field\n\n### Method 2: Creating a Desktop Entry Manually\n\n1. Check the path where you installed fusuma with `which fusuma`\n2. Create a new file named `fusuma.desktop` in the `~/.config/autostart/` directory.\n3. Add the following content to the `fusuma.desktop` file:\n\n```ini\n[Desktop Entry]\nName=fusuma\nComment=run fusuma\nExec={path_to_fusuma} -d --log=/tmp/fusuma.log\nIcon=input-touchpad\nX-GNOME-Autostart-enabled=true\nType=Application\n```\n\n   Replace `{path_to_fusuma}` with the path obtained from `which fusuma`.\n4. Save the file and ensure its permissions are correctly set to be executable.\n5. Restart your system or session to verify that fusuma starts automatically.\n\n## Fusuma Plugins\n\nFusuma's functionality can be extended with a variety of plugins. Below is a list of available plugins along with their purposes:\n\n### Available Plugins\n\nFusuma plugins are provided with the `fusuma-plugin-XXXXX` naming convention and hosted on [RubyGems](https://rubygems.org/search?utf8=%E2%9C%93\u0026query=fusuma-plugins).\n\n| Name                                                                               | Version                                                                         | About                                                        |\n| ---                                                                                | ---                                                                             | ---                                                          |\n| [fusuma-plugin-sendkey](https://github.com/iberianpig/fusuma-plugin-sendkey)       | ![Gem](https://img.shields.io/gem/v/fusuma-plugin-sendkey?color=brightgreen)    | Emulates keyboard events(Wayland compatible)                 |\n| [fusuma-plugin-wmctrl](https://github.com/iberianpig/fusuma-plugin-wmctrl)         | ![Gem](https://img.shields.io/gem/v/fusuma-plugin-wmctrl?color=brightgreen)     | Manages Window and Workspace                                 |\n| [fusuma-plugin-keypress](https://github.com/iberianpig/fusuma-plugin-keypress)     | ![Gem](https://img.shields.io/gem/v/fusuma-plugin-keypress?color=brightgreen)   | Detecting a combination of key presses and touchpad gestures |\n| [fusuma-plugin-appmatcher](https://github.com/iberianpig/fusuma-plugin-appmatcher) | ![Gem](https://img.shields.io/gem/v/fusuma-plugin-appmatcher?color=brightgreen) | Configure app-specific gestures                              |\n| [fusuma-plugin-thumbsense](https://github.com/iberianpig/fusuma-plugin-thumbsense) | ![Gem](https://img.shields.io/gem/v/fusuma-plugin-thumbsense?color=brightgreen) | Remapper from key to click only while tapping                |\n\n\n### Installation of Fusuma plugins\n\n```sh\n# install fusuma-plugin-XXXX\nsudo gem install fusuma-plugin-XXXXX`\n```\n```sh\n# update\nsudo gem list fusuma-plugin- | cut -d' ' -f1 | xargs --no-run-if-empty sudo gem update\n```\n\n## Tutorial Video\n\n[![Multitouch Touchpad Gestures in Linux with Fusuma](http://img.youtube.com/vi/bn11Iwvf29I/0.jpg)](http://www.youtube.com/watch?v=bn11Iwvf29I \"Multitouch Touchpad Gestures in Linux with Fusuma\")  \n[Multitouch Touchpad Gestures in Linux with Fusuma](http://www.youtube.com/watch?v=bn11Iwvf29I) by [Eric Adams](https://www.youtube.com/user/igster75)\n\n### Support and Sponsorship\n\nIf you enjoy working on Fusuma or find it beneficial, consider supporting the developer through [GitHub Sponsors](https://github.com/sponsors/iberianpig).\n\nI'm a Freelance Engineer in Japan and working on these products after finishing my regular work or on my holidays.\nCurrently, my open-source contribution times is not enough.\nIf you like my work and want to contribute and become a sponsor, I will be able to focus on my projects.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/iberianpig/fusuma. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiberianpig%2Ffusuma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiberianpig%2Ffusuma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiberianpig%2Ffusuma/lists"}