https://askubuntu.com/a/1044184/846886
The solution using fusuma works well (answered above).
First add yourself to the "input" group and log out/log back in:
sudo gpasswd -a $USER input
Install all pre-requisite packages:
sudo apt install libinput-tools xdotool ruby
Install fusuma gem:
sudo gem install fusuma
Create a configuration file as your user:
mkdir -p ~/.config/fusuma
gedit ~/.config/fusuma/config.yml
Paste the following as an example config:
swipe:
3:
left:
command: 'xdotool key alt+Left'
right:
command: 'xdotool key alt+Right'
up:
command: 'xdotool key super+s'
down:
command: 'xdotool key super+l'
4:
left:
command: 'xdotool key super+Left'
right:
command: 'xdotool key super+Right'
up:
command: 'xdotool key super+a'
down:
command: 'xdotool key super+s'
pinch:
in:
command: 'xdotool key ctrl+plus'
out:
command: 'xdotool key ctrl+minus'
threshold:
swipe: 1
pinch: 1
interval:
swipe: 1
pinch: 1
Enable fusuma to start automatically:
fusuma auto start
More at the fusuma github page