Skip to main content
Version: main

niri

Generates a themed colour configuration for niri, the scrollable-tiling Wayland compositor. The plugin emits a KDL include file that sets niri's themeable colour properties (focus-ring, border, insert-hint, tab-indicator, shadow, and the overview backdrop-color), plus an example file documenting how to wire it in.

Installation

Built into tinct — nothing to install separately. tinct generate -o niri works out of the box.

Quick start

tinct generate -i image -p ~/Pictures/wallpaper.jpg -o niri

Generated files

FilePathRole
tinct-colours.kdl~/.config/niri/tinct-colours.kdlTheme. Sets niri's colour properties directly (layout.focus-ring, layout.border, layout.tab-indicator, layout.insert-hint, layout.shadow, overview.backdrop-color). Include this from config.kdl.
tinct.kdl~/.config/niri/tinct.kdlReference. A read-only, commented copy of what gets applied, plus the list of available colour roles. Optional — disable with --niri.generate-stub=false.

Integration

Unlike Hyprland's $variable model, niri has no config variables. Instead it supports includes that merge per-property, so the colour file contains the actual themed config sections and overrides only the properties it sets.

Add one line near the end of your ~/.config/niri/config.kdl — after your own layout block, so the merge takes precedence:

include "tinct-colours.kdl"

niri includes are positional and merge per-property: only the properties set in the included file change; everything else in your config is preserved. Included files are watched, so niri live-reloads automatically whenever tinct rewrites the colour file — there is no reload step.

Reload behaviour

Automatic

niri watches config.kdl and every included file. When tinct regenerates tinct-colours.kdl, niri reloads the configuration automatically and applies the new colours to open windows. No action required.

Manual fallback

If your config has an error and niri rejects the reload, validate it:

niri validate

Uninstall / revert

  1. Remove the include line from your ~/.config/niri/config.kdl:

    sed -i '/include "tinct-colours\.kdl"/d' ~/.config/niri/config.kdl
  2. Delete the generated files:

    rm ~/.config/niri/tinct-colours.kdl ~/.config/niri/tinct.kdl

    niri reloads automatically and reverts to your own colours.

  3. External state: this plugin only writes into ~/.config/niri/. No further cleanup is required.

Flags

FlagDefaultDescription
--niri.output-dir~/.config/niriOverride the output directory
--niri.generate-stubtrueGenerate the tinct.kdl reference alongside the theme
--niri.stub-path(unset)Custom filename for the stub (basename only; written into the output dir)

Colour role mapping

niri sectionPropertyTinct role
layout.focus-ringactive-gradientaccent1accent2 (45°)
layout.focus-ringinactive-colorbackgroundMuted
layout.borderactive-coloraccent1
layout.borderinactive-colorbackgroundMuted
layout.insert-hintcoloraccent2
layout.tab-indicatoractive-coloraccent1
layout.tab-indicatorinactive-colorbackgroundMuted
layout.shadowcolorshadow (with alpha)
overviewbackdrop-colorscrim

Customising the template

Extract the default templates to override them:

tinct plugins templates dump -o niri -l ~/.config/tinct/templates/niri

This creates ~/.config/tinct/templates/niri/tinct-colours.kdl.tmpl and tinct.kdl.tmpl. Tinct uses your versions in preference to the embedded defaults.

See the templating reference for the available functions and palette accessors.

Troubleshooting

Colours not changing

The include line must come after your own layout block in config.kdl. niri merges includes positionally — an include placed before your layout block is overridden by it. Move include "tinct-colours.kdl" to the end of the file.

focus-ring colour ignored

niri's focus-ring uses either a solid colour or a gradient, and a gradient wins when both are present. The theme sets active-gradient; if you have an active-color defined after the include it takes effect instead. Remove the conflicting property or reorder the include.

Config rejected after include

Run niri validate to see the parse error. A common cause is including the file at the wrong nesting level — include must be at the top level of config.kdl, not inside a layout { } block.

  • waybar — status bar commonly paired with niri.
  • fuzzel — application launcher commonly paired with niri.
  • swayosd — on-screen display for volume/brightness.
  • hyprland — the other tiling Wayland compositor plugin.