Add custom touch-gesture in KDE — the one-minute setup

Bouteiller < A2N > Alan
4 min readSep 21, 2023

--

Touché the GUI of touchegg

The purpose of this story is to add some touch gesture to our Linux with touché and touchégg.

A YouTube video is also available here !

Today we are going to add touch-gesture to our KDE. Obviously, this works only if you have a touchpad.

I am going to show you how to install the right package, how the settings GUI works, and two custom example.

So, we need two packages :

Both are created by JoseExposito on his GitHub. For the both packages the readme is very well written so if you want extra settings or have questions read it first.

I use Endeavour OS, so I’m going to do the step for the arch Linux based distro.

🚀 Installing the package

For installing touchegg nothing special, I use “pacman” :

sudo pacman -S touchegg

After that, we need to enable the package with “sytemctl”, like so, the service is automatically launched on the next reboot :

sudo systemctl enable touchegg.service --now

After that, we need to reboot. This is a mandatory step.

The package is configurable with a configuration file, but I found the GUI well done and very simple to use, so let’s install it :

yay -S touche

I used “yay” but you can do it with “paru” too.

After the installation, you just have to launch the “Touché” program.

The Touché GUI

In the left column, we have a list of applications and in the right the settings for the selected application.

Next I want to showcase you some gesture I set up in my pc. The purpose is to show you the ability of the program to do powerful and customizable gestures.

🌎 Browser navigation gesture

The first gesture I want to show you is for going forward or backward in Vivaldi history with a 3 fingers swipe left or right, like with your phone.

I found this gesture very practical, especially when I search the web for some forum answers or read a bunch of documentation : I can swipe to the previous page very quickly (in this case the search result page) and check another link, and go back to the result and so on.

Example of search with the use of the gesture in Vivaldi

For that, you just need to check the keyboard shortcut for the action in Vivaldi, we search for the “history back” and the “history forward” shortcut (in Vivaldi you can do ctrl + F1 if you want to view all the shortcut or directly via the configuration menu).

When you have found the right shortcut, we need to add it to the touchegg configuration.

So we add Vivaldi to the list of the applications and, in the right column, under the “swipe with 3 fingers” we add the following :

  • left, keyboard shortcut, and the shortcut is Alt + Left
  • right, keyboard shortcut, and the shortcut is Alt + Right
The configuration for Vivaldi

And voilà, it's that easy.

The next example I want to show you is with KDE integration. I want to do two things :

  • when I do “swipe up with 3 fingers” I want the desktop overview to be shown
  • when I do “swipe down with 3 fingers” I want the krunner launcher to be shown
The desktop overview

For these two gestures we have again the use of the “keyboard shortcut” :

  • for the desktop overview, the shortcut is found on the setting under the desktop effect tab : meta + w
  • and for krunner we just have to check the shortcut in the shortcut tabs, I have created a custom shortcut for krunner : meta + p

Next, in the “global gesture” application we just have to add, like for Vivaldi, the gesture :

The settings for the custom KDE gesture.

And that’s it !

The result for the two gestures we made.

Now it’s up to you to find or create useful gestures :)

Some examples that just pop in my mind :

  • play, pause, forward, backward video on YouTube or in a video editor application
  • lock the desktop or go to sleep
  • execute some custom command (via the “execute a command” option)
  • open a program or a setting

etc …

--

--

Bouteiller < A2N > Alan
Bouteiller < A2N > Alan

Written by Bouteiller < A2N > Alan

Ex dev - PM - tech and startup enthusiast 🚀

No responses yet