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.

On Arch you don't build anything by hand: update-niri-tablet.sh builds the app together with the package (first installs included), rebuilds it on every update whenever its sources changed, and installs the launcher entry plus a ~/.local/bin symlink, so the app shows up in app launchers by itself (niri's logo as the icon). Manually, or on other distros:

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

To wire up the launcher by hand, install the entry and icon that ship in data/ (Exec/TryExec get absolute paths, since launchers started by the systemd user manager don't see ~/.local/bin on their PATH):

ES=$PWD
ln -s "$ES/target/release/niri-tablet-easysetup" ~/.local/bin/
mkdir -p ~/.local/share/applications
sed -e "s|^Exec=niri-tablet-easysetup\$|Exec=$HOME/.local/bin/niri-tablet-easysetup|" \
    -e "s|^TryExec=niri-tablet-easysetup\$|TryExec=$HOME/.local/bin/niri-tablet-easysetup|" \
    "$ES/data/com.github.ggezus.NiriTabletEasySetup.desktop" \
    > ~/.local/share/applications/com.github.ggezus.NiriTabletEasySetup.desktop
install -Dm644 "$ES/data/icons/hicolor/scalable/apps/com.github.ggezus.NiriTabletEasySetup.svg" \
    ~/.local/share/icons/hicolor/scalable/apps/

The icon is niri's logo, used under CC BY-SA 4.0.

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, a curated catalog of 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