0

I tried installing fusuma and copied the commands in here. How do I edit them to do what I want as they seem to be messed up right now, here's what I mean:

  • the 3 finger up and down swipe open and close tabs in chrome and nothing else in the desktop
  • the 4 finger gestures up opens activities and down opens applications, left puts window on left side so does right. etc.

Firstly, Everything is wrong and I would like to edit them to suit my needs like the following:

  1. 3 finger left, right, up and down swipes should act just like in windows with some tweaks i.e (right swipe = alt+tab), (left swipe = super+`), (swipe up = activities) and (swipe down = show desktop) .
  2. 4 finger gestures should also act like this (swipe up = show applications). The rest I would set as I use linux more and get familiar with the workflow and It would be great if someone can also tell me how to do this.

Secondly, what does the "xdotool" and "key" commands mean?

Please note I am a beginner linux user so keep that in mind. Thank you in advance. Also I use a Laptop with windows built in and linux running off usb.

Nura
  • 33
  • 1
    xdotool helps perform keyboard key press using terminal eg: 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
  • Ah makes sense now – Nura May 16 '21 at 18:48
  • still no answers yet. welp, guess I'll keep waiting. – Nura May 25 '21 at 16:16

1 Answers1

0

Creating/Finding Config File

If you're mapping your gestures, you are either using one of these two ways to map them.

  1. You are creating the configuration file ~/.config/fusuma/config.yml and mapping the gestures there.

  2. 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.

muru
  • 197,895
  • 55
  • 485
  • 740
AlexFullinator
  • 1,459
  • 11
  • 39