An open API service indexing awesome lists of open source software.

https://github.com/taj-ny/kwin-gestures

Custom touchpad gestures for Plasma 6
https://github.com/taj-ny/kwin-gestures

kde kde-plasma kde-plasma-6 kwin linux plasma plasma6 wayland

Last synced: 17 days ago
JSON representation

Custom touchpad gestures for Plasma 6

Awesome Lists containing this project

README

        

# KWin Gestures
Custom touchpad gestures for Plasma 6.

X11 is currently not supported.

https://github.com/user-attachments/assets/2c16790a-869b-44f3-a760-590137293759

[peterfajdiga/kwin4_effect_geometry_change](https://github.com/peterfajdiga/kwin4_effect_geometry_change) was used for tile animations.

# Features
- Gestures: hold, pinch, swipe
- Actions: run command, input (keyboard keys, mouse buttons, relative and absolute mouse movement, full control over when keys/buttons are pressed/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

# Installation

NixOS (flakes)

``flake.nix``:
```nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

kwin-gestures = {
url = "github:taj-ny/kwin-gestures";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}
```

```nix
{ inputs, pkgs, ... }:

{
environment.systemPackages = [
inputs.kwin-gestures.packages.${pkgs.system}.default
];
}
```

# Building from source
### Dependencies
- 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
```

### Building
```sh
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.

# Usage
> [!NOTE]
> If the effect stops working after a system upgrade, you will need to rebuild it.

1. Install the plugin.
2. Open the Desktop Effects page in System Settings.
3. Enable the *Gestures* effect in the *Tools* category.

See [docs/configuration.md](docs/configuration.md) for instructions on how to configure this plugin.

# Gesture recognition issues
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.

# Credits
- [KWin](https://invent.kde.org/plasma/kwin) - Gesture recognition code (parts of it), sending keystrokes