19

The one feature I really miss from OSX is multitouch gestures for changing desktops. Three-finger-swipe in either direction let me go to next/prev fullscreen app or desktop. I would very much like to have the same feature in linux with a tiling window manager. I am currently using i3wm, but I'm willing to switch if someone can provide a compelling reason.

In my .config/i3/config file I have the following lines:

# multitouch gestures
bindsym --whole-window $mod+button10 workspace prev_on_output
bindsym --whole-window $mod+button11 workspace next_on_output

According to xev I have button10/button11 set up correctly with my touchpad. The --whole-window flag (according to the docs) and as far as I can tell, should allow me to use this binding anywhere on the screen. But the binding only works when my mouse is hovering over the title-bars of windows.

Did I do something wrong in my config? Or is there another way to get this feature?

Edit: I'm running v 4.10.3

$ i3 -v
> i3 version 4.10.3 (2015-07-30, branch "4.10.3") © 2009-2014 Michael Stapelberg and contributors
Sethish
  • 293
  • 2
  • 6
  • Interesting concept as I have used i3wm a lot on mac hardware as well and do miss that 3-finger swipe. I wouldn't think u need the "whole-window" parameter though - bindsym should work regardless. I can't test this at the moment, but have u tried `focus_follows_mouse no` to see if it has an affect? – Eric Duncan Jan 24 '16 at 06:09
  • 1
    I'm still looking for a solution to this in 2019 – Gabriel Ziegler Apr 26 '19 at 23:57
  • @GabrielZiegler check my answer. – Enetheru Jul 15 '19 at 01:19

2 Answers2

6

i3-wm doesn't support multitouch gestures by default, so an external tool which can detect them and then fire off commands is needed.

I did some quick reading of the archwiki for libinput: https://wiki.archlinux.org/index.php/Libinput

  1. Install libinput-gestures from the aur
  2. Add yourself as a member of the input group to have permission to read the touchpad device: sudo gpasswd -a $USER input
  3. Add these two lines or a variation of them to the ~/.config/libinput-gestures.conf file:
gesture swipe up 3 i3-msg workspace prev
gesture swipe down 3 i3-msg workspace next
  1. Log out of your session completely or simply reboot.
  2. Start the libinput daemon:
libinput-gestures-setup autostart
libinput-gestures-setup start
Gabriel Ziegler
  • 193
  • 1
  • 6
Enetheru
  • 306
  • 3
  • 6
  • Couldn't quite manage to make it work. Guess the drivers and Xorg config might be slightly off compared to yours. Is there any way to test the gestures to see if libinput gestures is recognizing them? – Gabriel Ziegler Jul 15 '19 at 12:24
  • @GabrielZiegler submit a bug report in the github repo, see if the developer themselves is willing to help https://github.com/bulletmark/libinput-gestures – Enetheru Jul 17 '19 at 03:28
  • Got it working! Need to run a few configuration steps after installing! Thank you! – Gabriel Ziegler Jul 17 '19 at 13:40
  • 1
    what steps? if you can remember put them here in the comments, someone might edit my answer to add them in. – Enetheru Jul 18 '19 at 23:15
2

For me step 5 of @enetheru didn't work as intended and libinput-gestures-setup didn't start up automatically on reboot. But I fixed it by simply activating the gestures in i3 config file as follows:

exec --no-startup-id libinput-gestures-setup start
jalovisko
  • 121
  • 1