Enabling Multitouch Gestures in Elementary OS 5.1 HeraElementary OS is a Linux Distribution with a design vision and mission that I believe in. I'm proud to support them and am excited for their Elementary OS 6 release and their AppCenter for Everyone campaign. Here's my write up on how I configured my Dell XPS 15's trackpad to use multitouch gestures, while runnign Elementary OS 5.1 Hera!
Posted: Thursday, September 17, 2020
5 min read
Table of Contents
Hello again 👋 Elementary OS
It's been a year or so since I last tried Elementary OS.
Since then, Ubuntu 18.04 and Ubuntu 20.04 LTS have been my daily driver. I've grown accustomed to GNOME as my desktop environment. I watched several videos on The Linux Experiment's YouTube Channel.
I recently found out about Fusuma through a YouTube video by InfinitelyGalactic, Build an Open Mac Alternative! - a Guide to Switching from macOS to elementary OS. I recommend watching the video as it does a very nice job of showing how Elementary OS stands on its own and how it's not a skinned desktop environment trying to look like macOS. The video detailed how to enable multi-touch gestures, similar to macOS's wonderful trackpads on Apple laptops.
That sounded so intriguing, it prompted me to give Elementary OS another go!
Multitouch Gestures with Fusuma
Fusuma is multitouch gesture recognizer. This gem makes your linux able to recognize swipes or pinchs and assign commands to them.
襖(Fusuma) means sliding door used to partition off rooms in a Japanese 🇯🇵 house.
Following along from Fusuma's general installation and Fusuma's Elementary OS Wiki Page.
1. 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 MUST LOGOUT/LOGIN or REBOOT to assign this group.
2. Install libinput-tools
You need libinput release 1.0 or later.
sudo apt-get install libinput-tools
3. Install Fusuma
I added the installation of Ruby to enable the gem command.
sudo apt install ruby-full sudo gem install fusuma
4. Install xdotool (optional)
For sending shortcuts:
sudo apt-get install xdotool
5. Setup Plugins
Fusuma Plugin Wmctrl
sudo apt install wmctrl
This plugin requires Fusuma version 1.0 or later.
sudo gem install fusuma-plugin-wmctrl
Fusuma Plugin Keypress
- Install fusuma-plugin-keypress
This plugin requires Fusuma version 1.4 or later.
sudo gem install fusuma-plugin-keypress
Usage from terminal
sudo fusuma -d
-d to run detached form the current terminal session
sudo to detect trackpad when running from terminal
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.
Example (Gesture Mapping for Elementary OS)
swipe: 3: left: command: 'xdotool key alt+Right' # History forward keypress: LEFTCTRL: command: 'xdotool key ctrl+Tab' # Next tab right: command: 'xdotool key alt+Left' # History back keypress: LEFTCTRL: command: 'xdotool key ctrl+shift+Tab' # Prev tab up: command: 'xdotool key ctrl+t' # Open new tab keypress: LEFTSHIFT: command: 'xdotool key --clearmodifiers ctrl+shift+t' # Open last closed tab down: command: 'xdotool key ctrl+w' # Close tab 4: left: workspace: 'next' # Switch to next workspace keypress: LEFTSHIFT: window: 'next' # Move window to next workspace LEFTMETA: command: 'xdotool key --clearmodifiers super+ctrl+Left' # Move window to left side right: workspace: 'prev' # Switch to previous workspace keypress: LEFTSHIFT: window: 'prev' # Move window to previous workspace LEFTMETA: command: 'xdotool key --clearmodifiers super+ctrl+Right' # Move window to right side up: command: 'xdotool key super+s' # Workspace overview keypress: LEFTMETA: window: maximized: 'toggle' # Toggle Maximize/Unmaximize Window down: command: 'xdotool key super+a' # Window overview keypress: LEFTMETA: window: 'close' # Close window pinch: 2: in: command: 'xdotool keydown ctrl click 4 keyup ctrl' # Zoom in out: command: 'xdotool keydown ctrl click 5 keyup ctrl' # Zoom out 4: in: command: 'xdotool key super+a' # Window overview out: command: 'xdotool key super+s' # Workspace overview rotate: 2: clockwise: command: 'xdotool key XF86AudioRaiseVolume' # Volume up counterclockwise: command: 'xdotool key XF86AudioLowerVolume' # Volume down 3: clockwise: command: 'xdotool key XF86MonBrightnessUp' # Brightness up counterclockwise: command: 'xdotool key XF86MonBrightnessDown' # Brightness down plugin: inputs: libinput_command_input: # options for lib/plugin/inputs/libinput_command_input enable-tap: true # click to tap enable-dwt: true # disable tap while typing show-keycodes: true # https://github.com/iberianpig/fusuma-plugin-keypress#add-show-keycode-option
Enable on Startup and Login
Elementary Startup (Create a startup entry)
Hit Super+Space to open the search, type "Startup", and find "Applications-> Startup"
Add an entry with: /usr/local/bin/fusuma -d
Reference on GitHub Issue describing command to use for startup
Voila! There you have it. You should be able to logout, login, and enjoy multi-touch gestures on your trackpad.
Elementary Blog Post hinting at multi-touch support
Fingers crossed for more built in multi-touch support!
Hints for More multi-touch support
Libhandy library, and I'm not sure how that library differs from
lipinput-tools. Either way, it's exciting news! If you agree, check out their Funding Page
Plug for AppCenter for Everyone
Lastly, a plug for their IndieGogo Campaign to help improve the app ecosystem on Linux desktops!
I'm a big fan of their goals with their Elementary team's "AppCenter for Everyone" campaign of creating a way to pay for and distribute applications on Linux.
I think their efforts will be a very positive thing for the open source community.
If you agree, check out their AppCenter for Everyone campaign!