Sway garuda setup gestures to simulate keystrokes

Hello guys,
I was wondering, if it is possible to setup touchpad gestures in the garuda sway gestures app to for example move the tiled windows in specified directions with three finger slide, change workspaces with four finger slide etc.
I tried playing with xdotool to simulate keystrokes, but it looks like it does not work and the app says, that it is not supported in wayland.
Any hint, what commands or programs should I work with within the app to make it happen?
Thanks in advance

System:
  Kernel: 5.16.11-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=3d1822ec-c8c8-49a4-a58b-a8b798e0d7bf rw rootflags=subvol=@
    quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
  Desktop: sway 1.7 info: waybar vt: 1 dm: greetd Distro: Garuda Linux
    base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82FE v: IdeaPad 5 14ITL05
    serial: <superuser required> Chassis: type: 10 v: IdeaPad 5 14ITL05
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: No DPK serial: <superuser required>
    UEFI: LENOVO v: FKCN40WW(V3.03) date: 01/14/2022
Battery:
  ID-1: BAT1 charge: 35.8 Wh (72.6%) condition: 49.3/56.5 Wh (87.3%)
    volts: 12.6 min: 11.6 model: Celxpert L19C3PF3 type: Li-ion
    serial: <filter> status: Charging cycles: 162
CPU:
  Info: model: 11th Gen Intel Core i7-1165G7 bits: 64 type: MT MCP
    arch: Tiger Lake family: 6 model-id: 0x8C (140) stepping: 1 microcode: 0x9A
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 320 KiB desc: d-4x48 KiB; i-4x32 KiB L2: 5 MiB desc: 4x1.2 MiB
    L3: 12 MiB desc: 1x12 MiB
  Speed (MHz): avg: 939 high: 1180 min/max: 400/4700 scaling:
    driver: intel_pstate governor: powersave cores: 1: 606 2: 1180 3: 1082
    4: 768 5: 844 6: 963 7: 1050 8: 1019 bogomips: 44851
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2
    mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Lenovo
    driver: i915 v: kernel ports: active: eDP-1
    empty: DP-1, DP-2, DP-3, DP-4, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0
    chip-ID: 8086:9a49 class-ID: 0300
  Device-2: Chicony Integrated Camera type: USB driver: uvcvideo
    bus-ID: 3-6:2 chip-ID: 04f2:b6c2 class-ID: 0e02 serial: <filter>
  Display: wayland server: Xwayland v: 22.1.0 compositor: sway v: 1.7
    driver: gpu: i915 display-ID: 1
  Monitor-1: eDP-1 model: Chi Mei Innolux built: 2019 res: 1920x1080 hz: 60
    dpi: 158 gamma: 1.2 scale: 1 size: 309x173mm (12.2x6.8")
    diag: 354mm (13.9") ratio: 16:9 modes: 1920x1080
  Message: Wayland GBM/EGL data currently not available.
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio vendor: Lenovo
    driver: sof-audio-pci-intel-tgl
    alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 00:1f.3
    chip-ID: 8086:a0c8 class-ID: 0401
  Sound Server-1: ALSA v: k5.16.11-zen1-1-zen running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
  Sound Server-4: PipeWire v: 0.3.47 running: yes
Network:
  Device-1: Intel Wi-Fi 6 AX201 driver: iwlwifi v: kernel bus-ID: 00:14.3
    chip-ID: 8086:a0f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 3-10:4 chip-ID: 8087:0026 class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 2 state: up address: <filter>
Drives:
  Local Storage: total: 476.94 GiB used: 11.21 GiB (2.4%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Lenovo
    model: UMIS RPJTJ512MEE1OWX size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 2.1C0628 temp: 41.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 106.96 GiB size: 106.96 GiB (100.00%)
    used: 11.14 GiB (10.4%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
    used: 70.5 MiB (73.5%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 106.96 GiB size: 106.96 GiB (100.00%)
    used: 11.14 GiB (10.4%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-4: /var/log raw-size: 106.96 GiB size: 106.96 GiB (100.00%)
    used: 11.14 GiB (10.4%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-5: /var/tmp raw-size: 106.96 GiB size: 106.96 GiB (100.00%)
    used: 11.14 GiB (10.4%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 15.41 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 50.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 316 Uptime: 1h 19m wakeups: 13632 Memory: 15.41 GiB
  used: 5.27 GiB (34.2%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.2.0 clang: 13.0.1 Packages: 1311 pacman: 1303 lib: 344 snap: 8
  Shell: fish v: 3.3.1 default: Bash v: 5.1.16 running-in: alacritty
  inxi: 3.3.13
Garuda (2.5.5-1):
  System install date:     2022-02-26
  Last full system update: 2022-02-26
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       Probably (Run as root to verify)
  Snapshots:               Snapper
  Failed units:

Without it, you will not receive any help from the Garuda team or your topic is likely to be closed without notice.

Before you open a new help request, read relevant sections of the Arch and Garuda wiki.
Thoroughly search your issue and any error messages in the forum and on the web.

Report everything you have already attempted to solve your problem.

The gesture support is more limited than the examples you mentioned. You can set options for one-, two-, or three-fingered tap (two-fingered tap can be right click, for example), two-finger scroll is possible, tap-and-drag...honestly, those are about the fanciest options. You can check them out by running man sway-input and you can plop anything you like into your sway config (you need to identify your device first).

It looks like there was a project going for some more robust gesture support, but the maintainer lost access to a touchpad device and let it go. GitHub - grahnen/libtouch: Touch Gesture Library, created under the guidance of the Sway project.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.