NiriMod GTK4/libadwaita configuration editor for the niri Wayland compositor. Niri uses KDL for configuration. Hand-editing works well for basic keys, but managing multi-monitor layouts, easing curves, and complex window rules directly in text is error-prone. NiriMod provides a native graphical interface for these subsystems while preserving existing comments, file structures, and manual edits. Features…
GTK4/libadwaita configuration editor for the niri Wayland compositor.
Niri uses KDL for configuration. Hand-editing works well for basic keys, but managing multi-monitor layouts, easing curves, and complex window rules directly in text is error-prone. NiriMod provides a native graphical interface for these subsystems while preserving existing comments, file structures, and manual edits.
Cubic-bezier and spring curve editor with live previews across all compositor transitions.
Built-in KDL editor with syntax validation and undo/redo history.
Configuration Safety
Writes run through niri validate before committing to disk. Invalid configurations are blocked and surfaced with compiler diagnostics.
Config updates are staged in temporary files before replacing targets, preventing half-written files.
Custom comments, whitespace, and formatting are preserved across round-trips.
Snapshot and restore alternate configurations on demand.
Multi-File and Desktop Shell Setups
Niri configurations frequently use include directives to separate concerns across files (such as inputs, outputs, or third-party shells like Dank Material Shell and Noctalia).
NiriMod resolves include paths recursively up to five levels deep. When modifying a setting from the interface, NiriMod maps the node back to its originating file and writes only to that file. Unrecognized directives and custom shell blocks remain untouched.
NixOS and Home Manager
When managing Niri via Home Manager, point NiriMod directly to your source files by using out-of-store symlinks:
NiriMod resolves symlinks to their underlying target before writing, allowing GUI adjustments to commit directly into your dotfiles repository.
Usage
nirimod # open on the first page
nirimod --page outputs # open directly on a sidebar page
nirimod -p bindings -c ~/dotfiles/niri/config.kdl
nirimod --help # list options and valid page IDs
Valid --page / -p IDs, matching the sidebar order: input, bindings, outputs, appearance, animations, layout, workspaces, window_rules, startup, environment, gestures, raw_config. An unknown ID exits with status 2 before the config is read or a window is opened.
评论