NIRI-GENCONFIG(1)

πŸ“¦ version 5.0.0, in ubuntu stonking

πŸ’– NAME πŸ’–

niri-genconfig β€” the niri-companion config generation tool. Yes bestie, it's from the niri-companion manual, and yes it's about to be your new fave 🫢


✨ SYNOPSIS ✨

niri-genconfig [OPTIONS] COMMAND [ARGS]...

🌸 DESCRIPTION 🌸

okay so here's the vibe: niri-genconfig manages your niri configuration by smooshing multiple KDL files together into one. That's the whole thing, that's the job.

But the iconic part? It supports grouping sources, which means you can switch between different visual styles or monitor setups super easily. Lowkey a game changer β€” one command and your whole setup changes outfits like it's doing a fit check πŸ’…


πŸ’… OPTIONS πŸ’…

  • -h, --help β€” shows the help message and then dips (exits). that's it, that's the option ✨

πŸ‘‘ COMMANDS πŸ‘‘

🧚 generate [GROUP]

Combines your source files into the final niri configuration. The main character command fr fr.

  • -u, --use-include β€” instead of merging the file contents together, it writes a file containing KDL include statements for each source. Super useful for debugging, or if you just want your output file to stay clean and uncluttered 🌿
  • GROUP β€” pick a specific configuration group. Standalone source strings are always included (no take-backs). Objects matching the group name get included too. Defaults to "default".

πŸ¦‹ daemon [GROUP]

Starts a daemon that monitors the watch_dir πŸ‘€ and regenerates the configuration automatically whenever a source file gets modified. It's giving personal assistant energy, no notes.

  • GROUP β€” the configuration group to use for automatic generation.

πŸŽ€ CONFIGURATION πŸŽ€

Your settings live at ~/.config/niri-companion/settings.toml πŸ“

[general]

  • output_path β€” the target niri config, like "~/.config/niri/config.kdl".

[genconfig]

  • watch_dir β€” the directory to monitor. Default: "~/.config/niri/sources".
  • sources β€” a list of strings (paths) or arrays of objects (groups). mix and match, do your thing.

🌈 Example Configuration 🌈

[genconfig]
sources = [
  "~/niri/base.kdl",
  [
    { group = "default", path = "~/niri/visual_standard.kdl" },
    { group = "cool", path = "~/niri/visual_custom.kdl" },
  ]
]

πŸ”₯ EXAMPLES πŸ”₯

Generate the default configuration:

niri-genconfig generate

Generate a specific group using includes:

niri-genconfig generate -u cool

See? Ate. πŸ’…


🫢 SEE ALSO 🫢

niri-ipcext(1), niri-workspaces(1)


and that's the whole page bestie!! niri-genconfig 4.0.1, dated May 2026 β€” go forth and generate, you've got this πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from