README.md in fusuma-2.1.0 vs README.md in fusuma-2.2.0
- old
+ new
@@ -1,6 +1,6 @@
-# Fusuma [](https://badge.fury.io/rb/fusuma) [](https://travis-ci.com/iberianpig/fusuma) [](https://coveralls.io/github/iberianpig/fusuma?branch=master)
+# Fusuma [](https://badge.fury.io/rb/fusuma) [](https://github.com/iberianpig/fusuma/actions/workflows/ubuntu.yml) [](https://coveralls.io/github/iberianpig/fusuma?branch=master)
Fusuma is multitouch gesture recognizer.
This gem makes your linux able to recognize swipes or pinchs and assign commands to them.

@@ -20,133 +20,143 @@
### Grant permission to read the touchpad device
**IMPORTANT**: You **MUST** be a member of the **INPUT** group to read touchpad by Fusuma.
```bash
-$ sudo gpasswd -a $USER input
+sudo gpasswd -a $USER input
```
Then, You apply the change with no logout or reboot.
```bash
-$ newgrp input
+newgrp input
```
### For Debian Based Distros (Ubuntu, Debian, Mint, Pop!OS)
#### 1. Install libinput-tools
You need `libinput` release 1.0 or later.
```bash
-$ sudo apt-get install libinput-tools
+sudo apt-get install libinput-tools
```
#### 2. Install Ruby
Fusuma runs in Ruby, so you must install it first.
```bash
-$ sudo apt-get install ruby
+sudo apt-get install ruby
```
#### 3. Install Fusuma
```bash
-$ sudo gem install fusuma
+sudo gem install fusuma
```
#### 4. Install xdotool (optional)
For sending shortcuts:
```bash
-$ sudo apt-get install xdotool
+sudo apt-get install xdotool
```
### For Arch Based Distros (Manjaro, Arch)
#### 1. Install libinput.
You need `libinput` release 1.0 or later. This is most probably installed by default on Manjaro
```z-h
-$ sudo pacman -S libinput
+sudo pacman -S libinput
```
#### 2. Install Ruby
Fusuma runs in Ruby, so you must install it first.
```zsh
-$ sudo pacman -S ruby
+sudo pacman -S ruby
```
#### 3. Install Fusuma
**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)
To install gems system-wide, see any of the methods listed on [Arch Wiki](https://wiki.archlinux.org/index.php/ruby#Installing_gems_system-wide)
```zsh
-$ sudo gem install fusuma
+sudo gem install fusuma
```
#### 4. Install xdotool (optional)
For sending shortcuts:
```zsh
-$ sudo pacman -S xdotool
+sudo pacman -S xdotool
```
### Touchpad not working in GNOME
Ensure the touchpad events are being sent to the GNOME desktop by running the following command:
```bash
-$ gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled
+gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled
```
## Usage
```bash
-$ fusuma
+fusuma
```
## Update
```bash
-$ sudo gem update fusuma
+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.**
```bash
-$ mkdir -p ~/.config/fusuma # create config directory
-$ nano ~/.config/fusuma/config.yml # edit config file.
+mkdir -p ~/.config/fusuma # create config directory
+nano ~/.config/fusuma/config.yml # edit config file.
```
### Available gestures
-* `swipe:`
- * support `3:`, `4:` fingers
- * support `left:`, `right:`, `up:`, `down:` directions
- * support `begin:`, `update:`, `end:` events
-* `pinch:`
- * support `2:`, `3:`, `4:` fingers
- * support `in:`, `out:` directions
- * support `begin:`, `update:`, `end:` events
-* `rotate:`
- * support `2:`, `3:`, `4:` fingers
- * support `clockwise:`,`counterclockwise:` directions
- * support `begin:`, `update:`, `end:` events
+#### swipe:
+ * support `3:`, `4:` fingers
+ * support `left:`, `right:`, `up:`, `down:` directions
+ * support `begin:`, `update:`, `end:` events
+
+#### pinch:
+
+ * support `2:`, `3:`, `4:` fingers
+ * support `in:`, `out:` directions
+ * support `begin:`, `update:`, `end:` events
+
+#### rotate:
+
+ * support `2:`, `3:`, `4:` fingers
+ * support `clockwise:`,`counterclockwise:` directions
+ * support `begin:`, `update:`, `end:` events
+
+#### hold:
+ * require libinput version 1.19.0 or later
+ * support `1:`, `2:`, `3:`, `4:` fingers
+ * support `begin:`, `end:`, `cancelled:` events
+
### About YAML Basic Syntax
- Comments in YAML begins with the `#` character.
- Comments must be separated from other tokens by whitespaces.
- Indentation of whitespace is used to denote structure.
@@ -179,10 +189,13 @@
pinch:
in:
command: "xdotool keydown ctrl click 4 keyup ctrl" # Zoom in
out:
command: "xdotool keydown ctrl click 5 keyup ctrl" # Zoom out
+hold:
+ 4:
+ command: "xdotool key super" # Activity
```
### More Example of config.yml
The following wiki pages can be edited by everyone.
@@ -199,16 +212,16 @@
If you have a nice configuration, please share `~/.config/fusuma/config.yml` with everyone.
### Threshold and Interval
-if `command:` properties are blank, the swipe/pinch doesn't execute command.
+if `command:` properties are blank, the swipe/pinch/hold doesn't execute command.
-`threshold:` is sensitivity to swipe/pinch. Default value is 1.
+`threshold:` is sensitivity to swipe/pinch/hold. Default value is 1.
If the swipe's threshold is `0.5`, shorten swipe-length by half.
-`interval:` is delay between swipes/pinches. Default value is 1.
+`interval:` is delay between swipes/pinches/hold. Default value is 1.
If the swipe's interval is `0.5`, shorten swipe-interval by half to recognize a next swipe.
### Example of `threshold:` / `interval:` settings
```yaml
@@ -241,11 +254,11 @@
There are three priorities of `threshold:` and `interval:`.
The individual `threshold:` and `interval:` settings (under "direction") have a higher priority than the global one (under "root")
1. child elements in the direction (left/right/down/up → threshold/interval)
-1. root child elements (threshold/interval → swipe/pinch)
+1. root child elements (threshold/interval → swipe/pinch/hold)
1. default value (= 1)
### `command:` property for assigning commands
On fusuma version 0.4 `command:` property is available!
@@ -312,12 +325,12 @@
- "EXTERNAL TOUCHPAD NAME"
```
## Autostart (gnome-session-properties)
-1. Check the path where you installed fusuma with `$ which fusuma`
-2. Open `$ gnome-session-properties`
+1. Check the path where you installed fusuma with `which fusuma`
+2. Open `gnome-session-properties`
3. Add Fusuma and enter the location where the above path was checked in the command input field
4. Add the `-d` option at the end of the command input field
## Fusuma Plugins
@@ -325,24 +338,32 @@
- Adding new gestures or combinations
- Features for specific Linux distributions
- Setting different gestures per applications
-### Installation of Fusuma plugins
+### Available plugins
Fusuma plugins are provided with the `fusuma-plugin-XXXXX` naming convention and hosted on [RubyGems](https://rubygems.org/search?utf8=%E2%9C%93&query=fusuma-plugins).
-`$ sudo gem install fusuma-plugin-XXXXX`
-
-### Available plugins
-
| Name | Version | About |
| ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------- |
| [fusuma-plugin-sendkey](https://github.com/iberianpig/fusuma-plugin-sendkey) |  | Emulates keyboard events |
| [fusuma-plugin-wmctrl](https://github.com/iberianpig/fusuma-plugin-wmctrl) |  | Manages Window and Workspace |
| [fusuma-plugin-keypress](https://github.com/iberianpig/fusuma-plugin-keypress) |  | Detects gestures while pressing multiple keys |
| [fusuma-plugin-tap](https://github.com/iberianpig/fusuma-plugin-tap) |  | Detects Tap and Hold gestures |
| [fusuma-plugin-appmatcher](https://github.com/iberianpig/fusuma-plugin-appmatcher) |  | Configure app-specific gestures |
+
+
+### Installation of Fusuma plugins
+
+```bash
+# install fusuma-plugin-XXXX
+sudo gem install fusuma-plugin-XXXXX`
+```
+```bash
+# update
+sudo gem list fusuma-plugin- | cut -d' ' -f1 | xargs --no-run-if-empty sudo gem update
+```
## Tutorial Video
[](http://www.youtube.com/watch?v=bn11Iwvf29I "Multitouch Touchpad Gestures in Linux with Fusuma")
[Multitouch Touchpad Gestures in Linux with Fusuma](http://www.youtube.com/watch?v=bn11Iwvf29I) by [Eric Adams](https://www.youtube.com/user/igster75)