I published "Fusuma" to RubyGems that recognize swipe or pinch gesture on Linux touchpad.
You can add touchpad gestures to run commands or common tasks, such as changing workspaces, back or forward on a browser, etc.
This my first post is how to use and customize Fusuma.
If you use Debian-based OS (using apt for package management), you can use the following commands like "apt install" as they are.
I'm using fusuma on elementary OS Loki on Dell XPS 13(9360).
You can use libinput that depends on Fusuma for Ubuntu 15.04 and above, but you should try xswipe to use the Synaptics driver for older versions' Ubuntu.
Please confirm at first whether you have ruby installed.
You can use the fusuma with Ruby it installed in System Wide.
(Of course, even rbenv and rvm is OK)
$ ruby -v ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] # confirm the version of ruby installed
libinput-tools for reading touchpad input.
(Fusuma use the output of debug logs by
libinput debug-events in itself)
$ sudo apt install libinput-tools
xdotool so that fusuma trigger shortcuts such as
Alt + Left,
Alt + Right and so on.
$ sudo apt install xdotool
$ sudo gem i fusuma
i is an abbreviation for
install. If you want to install the fusuma to Ruby in System-Wide is required
(If you use the Ruby you have installed via rbenv and rvm, you can install with
$ gem install fusuma)
Create a configurations file to
$ mkdir -p ~/.config/fusuma $ touch ~/.config/fusuma/config.yml
~/.config/fusuma/config.yml in editor, then paste following content.
swipe: 3: left: command: 'xdotool key alt+Right' right: command: 'xdotool key alt+Left' up: command: 'xdotool key ctrl+t' down: command: 'xdotool key ctrl+w'
The above example is registering the shortcut of the browser by three fingers' swipe.
(Back / Forward / Create Tab / Close Tab)
To execute Fusuma, it needs to give permission to read to the input of touchpad to the user.
$ sudo gpasswd -a $USER input
gpasswd command adds the user to the input group.
$ USER is the username at runtime)
Need to log out and log in (or restart) from X
Fusuma cannot recognize the touchpad without this process.
Because it must be reflected to add the user in the input group.
Open terminal, and type Fusuma and endter.
It's OK if all actions are worked (Back / Forward / Create Tab / Close Tab) when you swipe with Three-finger on the browser.
$ fusuma -d
-d option is running as Unix demon, it disconnects from the terminal process.
fusuma is available even after closing terminal.
Add recognition gestures and assigns commands to it in
To switch the workspace, you can set
xdotool key ctrl + alt + Up or
xdotool key ctrl + alt + Down
I recommend that you try such commands to work properly on the terminal.
Shortcuts for workspace depend on the WindowManager in this example. (Gnome 3 moves up and down with
xdotool key ctrl + alt + Up and
xdotool key ctrl + alt + Down)
Paste the following at the bottom of the
4: up: command: 'xdotool key ctrl+alt+Down' down: command: 'xdotool key ctrl+alt+Up'
If you rewrite the config file, you must do re-run
fusuma command after it stops with
If you can confirm the operation of the customized four-finger swipe, it is OK.
Set fusuma to start automatically, because it is troublesome to open the terminal and execute Fusuma command with every restarts your laptop.
which fusumain the terminal, to note the path to launch Fusuma
gnome-session-properties, enter the launch path noted the previous step by adding the
-doptions (daemonize) at the end.
$ sudo gem update fusuma
(If you have installed fusuma with Ruby on rbenv or rvm, you can update with
$ gem update fusuma)
~/.config/fusuma/config.yml, you can set Pinch Zoom (
pinch in /
pinch out) and Sensitivity for each gesture(
It is also possible to set gestures that pinch in continuity.
See Fusuma repository README for more information.
If you find any bug or issue, please register the issue to Github Issue.
Do you want to support Fusuma? Check out the fully optional donation option, a way to support Fusuma's ongoing development directly: https://www.patreon.com/iberianpig