Skip to content

EasySetup

GGEZUS edited this page Sep 23, 2026 · 9 revisions

A GUI for everything this wiki documents by hand: pick what each gesture does (installed apps, niri actions, commands), test actions live, and export or import whole schemes. It lives in the repo as niri-tablet-easysetup/.

binding a gesture in EasySetup

Build and run

System deps: gtk4, libadwaita, and Rust 1.85 or newer.

cd niri-tablet/niri-tablet-easysetup
cargo build --release
./target/release/niri-tablet-easysetup

No need to repeat the build on updates: update-niri-tablet.sh rebuilds the app whenever its sources changed.

Optional, to launch it by name:

ln -s /path/to/niri-tablet/niri-tablet-easysetup/target/release/niri-tablet-easysetup ~/.local/bin/

And to get it into your app launcher, save this as ~/.local/share/applications/com.github.ggezus.NiriTabletEasySetup.desktop (Icon picks any name your icon theme has):

[Desktop Entry]
Type=Application
Name=niri-tablet EasySetup
Comment=Configure touchscreen gestures for niri-tablet
Exec=niri-tablet-easysetup
TryExec=niri-tablet-easysetup
Icon=input-tablet
Terminal=false
Categories=Settings;DesktopSettings;GTK;
Keywords=gestures;touch;tablet;niri;

What it does

  • Shows your current scheme on launch, wherever it lives.
  • Every gesture gets a row: taps and flicks, holds, edge and corner swipes.
  • The picker offers installed apps, around 65 curated niri actions, running a command, running a shell command, or raw KDL for anything else.
  • A Test button fires an action immediately through niri msg action, so you can feel a candidate before committing to it.
  • Export and import schemes as JSON, or import a plain gestures .kdl file (including the repo's config/gestures.kdl).

Configs from v26.04.18 or earlier load fine: the old tap-4/swipe-4-* names are recognized, a banner explains they were renamed tap-more/swipe-more-*, and the next save writes the new names. A fingers value outside 3-4 resets to the default 3 with a warning.

How it saves

The app manages one file, by default ~/.config/niri/cfg/gestures.kdl, included from config.kdl. On Apply it writes the new file only after niri validate accepts it, and then waits for the compositor's own confirmation: niri broadcasts a config-loaded event after each reload, and the toast tells you whether the running session actually accepted the new config ("Applied and verified"), not just that a file changed. A one-time .easysetup.bak backup sits next to the managed file.

  • If your gestures live inline in config.kdl, the first Apply moves them into the managed file (config.kdl gets a backup too) and swaps the node for an include line.
  • If nothing is configured yet, the first Apply creates the file and adds the include.

The managed file is rewritten wholesale: comments in it are not kept. Unknown nodes (hot-corners, dnd-edge-*) are preserved. Hand-edits survive until the next save from the app; use the Custom KDL entry for anything exotic.

A banner warns when the running niri does not support the gestures config (stock niri or missing patchset), and another when the file is read-only.

Command line

  • niri-tablet-easysetup - the GUI.
  • niri-tablet-easysetup --check - print what would be loaded: niri support, the managed file, any warnings, and the current scheme as JSON. Useful in bug reports.

Clone this wiki locally