WM Independent Touchpad Gesture Daemon for libinput
Gebaar means Gesture in Dutch
Run any command by simply gesturing on your touchpad!
libinput-gestures and fusuma both parse the output of the shell command libinput debug-events which is an unstable API and the output just keeps coming, so it'll eat (some) RAM.
Gebaar directly interfaces with libinput to receive and react to the events.
This is more stable, faster, and more efficient as it does not parse the output of a program like the aforementioned projects do.
- Clone the repository via
git clone https://github.com/Coffee2CodeNL/gebaar-libinput - Check out the latest version (
git checkout v0.0.5) - Run
git submodule update --initin the root folder - Run
mkdir build && cd build - Run
cmake .. - Run
make -j$(nproc) - Run
sudo make installto install - Run
mkdir -p ~/.config/gebaar - Run
nano ~/.config/gebaar/gebaard.toml(or vim, if you like it better) - Add the snippet below to
gebaard.toml - Configure commands to run per direction
- Add yourself to the
inputgroup withusermod -a -G input $USER - Run Gebaar via some startup file by adding
gebaard -bto it - Reboot and see the magic
[swipe.commands.three]
left_up = ""
right_up = ""
up = ""
left_down = ""
right_down = ""
down = ""
left = ""
right = ""
[swipe.commands.four]
left_up = ""
right_up = ""
up = ""
left_down = ""
right_down = ""
down = ""
left = ""
right = ""
[pinch.commands]
in = ""
out = ""
[pinch.settings]
threshold = 0.25
one_shot = false
[swipe.settings]
threshold = 0.5
one_shot = true
trigger_on_release = falsepinch.settings.thresholdkey sets the distance between fingers where it shold trigger. Defaults to0.25which means fingers should travel exactly 25% distance from their initial position.swipe.settings.thresholdsets the limit when swipe gesture should be executed. Defaults to 0.5.
bspwm
~/.config/gebaar/gebaard.toml
[swipe.commands.three]
left_up = ""
right_up = ""
up = "bspc node -f north"
left_down = ""
right_down = ""
down = "bspc node -f south"
left = "bspc node -f west"
right = "bspc node -f east"
[swipe.commands.four]
left_up = ""
right_up = ""
up = "rofi -show combi"
left_down = ""
right_down = ""
down = ""
left = "bspc desktop -f prev"
right = "bspc desktop -f next"
[pinch.commands.two]
in = "xdotool key Control_L+equal"
out = "xdotool key Control_L+minus"
[pinch.settings]
threshold=0.25
one_shot=false
[swipe.settings]
threshold = 0.5
one_shot = true
trigger_on_release = falseAdd gebaard -b to ~/.config/bspwm/bspwmrc
KDE Plasma 5
Any multiword value (like in some qdbus commands) must have escaped double quotes to work (\").
Additionally, in some distros (like openSUSE), the qdbus command might be named qdbus-qt5.
Some navigation-related qdbus commands are provided directly by KWin and can be seen via qdbus org.kde.KWin /KWin,
but most shortcuts can be checked with qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.shortcutNames.
For Wayland users, a tool similar to xdotool in functionality is ydotool.
[swipe.commands.three]
up = "qdbus org.kde.kglobalaccel /component/kwin invokeShortcut \"Switch One Desktop Up\""
down = "qdbus org.kde.kglobalaccel /component/kwin invokeShortcut \"Switch One Desktop Down\""
left = "qdbus org.kde.kglobalaccel /component/kwin invokeShortcut \"Switch One Desktop to the Left\""
right = "qdbus org.kde.kglobalaccel /component/kwin invokeShortcut \"Switch One Desktop to the Right\""
[swipe.commands.four]
up = "qdbus org.kde.kglobalaccel /component/kwin invokeShortcut \"Window Maximize\""
down = "qdbus org.kde.kglobalaccel /component/kwin invokeShortcut \"Window Minimize\""
left = "xdotool key alt+Left"
right = "xdotool key alt+Right"- Receiving swipe events from libinput
- Swipe gesture have trigger treshold
- Receiving pinch/zoom events from libinput
- Support continous pinch
- Support pinch-and-rotate gestures
- Receiving rotation events from libinput
- Converting libinput events to motions
- Running commands based on motions
- Refactor code to be up to Release standards, instead of testing-hell