Skip to content

Multitouch Trackpad Touchpad Gestures

This guide sets up touchpad gestures with fusuma on Garuda Sway and Garuda i3.

Touchpad: Apple Magic Trackpad 2

  1. Install fusuma

    Terminal window
    paru -S ruby-fusuma
  2. Install the following fusuma plugins

    Terminal window
    paru -S ruby-fusuma-plugin-tap ruby-fusuma-plugin-keypress
  3. Create the directory ~/.config/fusuma

    Terminal window
    mkdir ~/.config/fusuma
  4. Create a new file ~/.config/fusuma/config.yml

  5. Edit your newly created config.yml to contain the following:

    Use a text editor, place the content below into the file and save. You can adjust it with the example configs from the fusuma wiki.

    The config uses swaymsg. For i3, replace each instance of swaymsg with i3-msg.

    ~/.config/fusuma/config.yml
    # Custom ~/.config/fusuma/config.yml for Garuda Sway Edition
    #
    # config.yml for fusuma --- https://github.com/iberianpig/fusuma
    #
    # This should work in any linux distro running sway and using fusuma.
    #
    # Email:
    #
    # Note, this is not a file included in Garuda Official.
    # This is user contributed to help others along the way.
    #
    # swipe section
    swipe:
    3:
    left:
    command: swaymsg move left # Move Window Left
    right:
    command: swaymsg move right # Move Window Right
    up:
    command: swaymsg move up # Move Window Up
    down:
    command: swaymsg move down # Move Window Down
    4:
    left:
    command: swaymsg workspace next # Next Workspace
    right:
    command: swaymsg workspace prev # Previous Workspace
    up:
    command: swaymsg fullscreen toggle # Fullscreen Toggle
    down:
    command: swaymsg floating toggle # Tiling Floating Toggle
    # pinch section
    pinch:
    2:
    in:
    command: "xdotool keydown ctrl click 4 keyup ctrl" # Zoom In - Test in a browser
    out:
    command: "xdotool keydown ctrl click 5 keyup ctrl" # Zoom Out - Test in a browser
    4:
    in:
    command:
    "xdotool key super+a" # Window Overview - Mod+a not defined in sway
    # Redefine to something useful
    out:
    command:
    "xdotool key super+s" # Workspace Overview - Mod+s not defined in sway
    # Redefine to something useful
    threshold:
    swipe: 0.4
    pinch: 0.4
    interval:
    swipe: 0.8
    pinch: 0.1

    More config.yml Examples

  6. Start fusuma in terminal by simply typing the command fusuma

    Terminal window
    fusuma

    Start fusuma in a terminal, not daemonized, for initial testing. fusuma should now be running in your terminal.

  7. Test

    Try some gestures on your trackpad or touchpad.

    You can see which gestures are defined in the ~/.config/fusuma/config.yml that you just created.

    Try 3-finger-swipe up/down/left/right, for example.

  8. Set up fusuma daemonized so it runs automatically when you log in

    Fusuma is running in a terminal for testing right now. Press Control + C to stop it. Now make it run in the background each time you log in.

Fusuma is reliable and works across window managers.