如macOS般丝滑的触摸板

最近折腾了一番linux的触摸板,发现竟然能达到与macos触摸板近乎一样的体验!详细配置如下

需要的包:

  1. libinput-three-finger-drag
  2. libinput-gestures

/etc/X11/xorg.conf.d/30-touchpad.conf中写入以下内容

Section "InputClass"
    Identifier "touchpad"
    Driver "libinput"
    Option "Tapping" "on"
    Option "TappingDrag" "false"
    Option "ClickMethod" "clickfinger"
EndSection

更新:我又在xorg设置中加入了禁止单指触摸拖动( Option "TappingDrag" "false" )。

6 个赞

libinput-three-finger-drag由于用了xdotool,貌似不支持wayland吧?

三指拖动太好用了,比鼠标还方便,完全可以不用鼠标。但是看上去linux不准备支持,挺遗憾。现在能用的方法有点hack

应该也可以,我看aur下面评论里面有人在sway中使用。不清楚是不是要用xdotool

libinput官方好像专门开了个issue.也许未来会支持

在ubuntu 22.04的wayland里编译改版的libinput,实测可用,参考 GitHub - aakside/libinput: complyue's implementation of "3 finger initiated drag (a trackpad feature) for macOS experience on Linux (Wayland or Xorg) desktop" on top of libinput 1.16 里面提到的: I personally stopped using this in favor of abc def’s implementation. You can clone that, then follow the regular build instructions to install.

代码: https://gitlab.freedesktop.org/abcdef/libinput/-/commits/resumable-3fd

编译步骤:libinput build instructions — libinput 1.24.0 documentation