跳转至内容

Touchegg

来自 ArchWiki

Touchegg 是一个以用户身份在后台运行的多点触控手势程序,它可以识别手势,将其转换为更常规的事件类型,并/或执行相应的自定义操作。

Touchegg 与 Wayland 不兼容。

安装

安装 touchegg 软件包。如果你想要一个用于配置 touchegg 的桌面应用程序,请安装 toucheAUR

对于 X11 GNOME,除了 touchegg 之外,还可以安装 X11 Gestures 扩展。

配置

默认配置可以在 /usr/share/touchegg/touchegg.conf 中找到。

要对其进行自定义,请将默认配置复制到 ~/.config/touchegg/touchegg.conf 并进行修改。

这是一个定义各种手势的基础 XML 文件。请注意,目前 TAP_AND_HOLD(轻触并保持)、PINCH(捏合)和 ROTATE(旋转)似乎无法正常工作。

请参阅 触发器列表操作列表

由于用户体验不佳,两指滚动模拟在最近的 touchegg 2.0 重写版本中已被移除。要恢复此功能,请安装 xdotool 并在配置文件中添加以下内容

<gesture type="SWIPE" fingers="2" direction="DOWN">
      <action type="RUN_COMMAND">
        <repeat>true</repeat>
        <command>xdotool click 4</command>
        <decreaseCommand>xdotool click 5</decreaseCommand>
      </action>
    </gesture>
    <gesture type="SWIPE" fingers="2" direction="UP">
      <action type="RUN_COMMAND">
        <repeat>true</repeat>
        <command>xdotool click 5</command>
        <decreaseCommand>xdotool click 4</decreaseCommand>
      </action>
    </gesture>

请注意,在 KDE 上,滚动时会选中文字(详见上游 issue 401)。

登录时启动

启用 touchegg.service,然后客户端即可设置为自动启动

© . This site is unofficial and not affiliated with Arch Linux.

Content is available under GNU Free Documentation License 1.3 or later unless otherwise noted.