Custom touchpad gestures for Plasma 6.
X11 is currently not supported.
kwingestures.mp4
peterfajdiga/kwin4_effect_geometry_change was used for tile animations.
- Gestures: hold, pinch, swipe
- Actions: run command, send keystrokes (full control over when keys are pressed and released), invoke global shortcut
- Override/block built-in Plasma gestures
- Application-specific gestures
- Trigger actions before fingers are lifted for a more responsive feel
- Repeating actions with support for changing the direction mid-gesture
- Fast and slow gestures
NixOS (flakes)
flake.nix
:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
kwin-gestures = {
url = "github:taj-ny/kwin-gestures";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}
{ inputs, pkgs, ... }:
{
environment.systemPackages = [
inputs.kwin-gestures.packages.${pkgs.system}.default
];
}
- CMake
- Extra CMake Modules
- Plasma 6
- Qt 6
- KF6
- KWin development packages
Arch Linux
sudo pacman -S --needed base-devel git extra-cmake-modules qt6-tools kwin yaml-cpp
Debian-based (KDE Neon, Kubuntu, Ubuntu)
sudo apt install git cmake g++ extra-cmake-modules qt6-tools-dev kwin-wayland kwin-dev libkf6configwidgets-dev gettext libkf6kcmutils-dev libyaml-cpp-dev libxkbcommon-dev
Fedora 40, 41
sudo dnf install git cmake extra-cmake-modules gcc-g++ qt6-qtbase-devel kwin-devel kf6-ki18n-devel kf6-kguiaddons-devel kf6-kcmutils-devel kf6-kconfigwidgets-devel qt6-qtbase kf6-kguiaddons kf6-ki18n wayland-devel yaml-cpp yaml-cpp-devel libepoxy-devel
openSUSE
sudo zypper in git cmake-full gcc-c++ kf6-extra-cmake-modules kguiaddons-devel kconfigwidgets-devel ki18n-devel kcmutils-devel "cmake(KF6I18n)" "cmake(KF6KCMUtils)" "cmake(KF6WindowSystem)" "cmake(Qt6Core)" "cmake(Qt6DBus)" "cmake(Qt6Quick)" "cmake(Qt6Widgets)" libepoxy-devel kwin6-devel yaml-cpp-devel libxkbcommon-devel
git clone https://github.com/taj-ny/kwin-gestures
cd kwin-gestures
mkdir build
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
Remove the build directory when rebuilding the effect.
Note
If the effect stops working after a system upgrade, you will need to rebuild it.
- Install the plugin.
- Open the Desktop Effects page in System Settings.
- Enable the Gestures effect in the Tools category.
See docs/configuration.md for instructions on how to configure this plugin.
Before reporting any issues related to gesture recognition, run libinput debug-events
as root and ensure the gesture is recognized properly. If it's not, there's nothing I can do.
Depending on the touchpad, 3 or 4-finger pinch gestures may sometimes be incorrectly interpreted as swipe gestures due to the touchpad only being able to track 2 fingers. As a workaround, move only 2 fingers in opposite directions. See https://wayland.freedesktop.org/libinput/doc/1.25.0/gestures.html#gestures-on-two-finger-touchpads for more information.
- KWin - Gesture recognition code (parts of it), sending keystrokes