Creating/Finding Config File
If you're mapping your gestures, you are either using one of these two ways to map them.
You are creating the configuration file ~/.config/fusuma/config.yml
and mapping the gestures there.
You are editing the configuration file config.yml
located in various subdirectories under /var/lib/gems
and mapping the gestures there. There was already a configuration for each gesture.
I can tell that for you, fusuma is probably using its own complete config file like in option 2 because of what you described, but I could be mistaken.
Either of the two ways are okay to use.
To find the file path of the second option, I performed a search for config.yml
under /var/lib/gems
. For me, I found it at /var/lib/gems/2.7.0/gems/fusuma-2.1.0/lib/fusuma/config.yml
, but the exact directory names will vary depending on the version of ruby or fusuma you have.
How to Edit (Map) The Gesture Commands
To edit your swipe commands, use something like this (These commands are similar to Macos's gestures, but you can of course change them to your liking):
swipe:
3:
left:
command: 'xdotool key alt+Right'
right:
command: 'xdotool key alt+Left'
up:
command: 'xdotool key fn+alt+F1'
down:
command: 'xdotool key fn+alt+F1'
4:
left:
command: 'xdotool key ctrl+alt+Up'
right:
command: 'xdotool key ctrl+alt+Down'
up:
command: 'xdotool key ctrl+alt+Up'
down:
command: 'xdotool key ctrl+alt+Down'
pinch:
2:
in:
command: 'xdotool key ctrl+equal'
out:
command: 'xdotool key ctrl+minus'
4:
in:
command: 'xdotool key super+a'
out:
command: 'xdotool key super+s'
threshold:
swipe: 0.3
pinch: 1.0
interval:
swipe: 1
pinch: 1
So to translate this, the first block tells you whether the blocks inside it are talking about swiping or pinching on your keyboard. The second block tells fusuma how many fingures you are swiping or pinching with. The next block tells fusuma wich way you are swiping or pinching (left, right, etc).
The command
block tells fusuma what shell command it will execute when it senses the gesture. You can essentially enter any command you could enter in a terminal, but it's reccommended to use the xdotool
command because xdotool
executes keyboard shortcuts. (An example would be xdotool key ctrl-alt-Up
because CtrlAltUp switches to the desktop above the current desktop.)
Depending on if you changed your shortcuts or have a different Ubuntu/Desktop version, you might have different shortcuts, so you'll have to find the shortcuts you need by looking in Settings App > Keyboard Shortcuts.
xdotool key super
will do the same action as when you press super from keyboard and key is the keyword for the next parameter i.e., super which the name of the key you want to be pressed – Parag Katoch May 16 '21 at 18:22