Configuring OSX touchgestures on Linux Mint

Install dependent packages

Install libinput-tools for reading touchpad input.

(Fusuma use the output of debug logs by libinput debug-events in itself)

$ sudo apt install libinput-tools

Also install xdotool so that fusuma trigger shortcuts such as Alt + LeftAlt + Right and so on.

$ sudo apt install xdotool

Install Fusuma From RubyGems

$ sudo gem i fusuma

i is an abbreviation for install. If you want to install the fusuma to Ruby in System-Wide is required sudo.

(If you use the Ruby you have installed via rbenv and rvm, you can install with $ gem install fusuma)

Create configurations file for Fusuma

Create a configurations file to ~/.config/fusuma/config.yml

$ mkdir -p ~/.config/fusuma
$ touch ~/.config/fusuma/config.yml

Open ~/.config/fusuma/config.yml in editor, then paste following content.

swipe:
  3:
    left:
      command: 'xdotool key ctrl+alt+Right'
    right:
      command: 'xdotool key ctrl+alt+Left'
    up:
      command: 'xdotool key ctrl+alt+Down'
    down:
      command: 'xdotool key ctrl+alt+Up'
pinch:
  in:
    command: 'xdotool key ctrl+plus'
  out:
     command: 'xdotool key ctrl+minus'


threshold:
  swipe: 0.4
  pinch: 0.4


interval:
  swipe: 0.8
  pinch: 0.1

The above example is registering the shortcut of the browser by three fingers’ swipe.

Add the user to input groups

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.

Add fusuma to startup applications then reboot.

Leave a Reply

Your email address will not be published. Required fields are marked *