Keep your own niri config next to fjordxy's: a local.kdl that is read last #26
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Someone who switched from DMS reported this:
left-handedon the mouse.As a workaround they put their
inputsettings in~/.local/state/fjordxy/current/niri-settings.kdl. This issue proposes a proper place for those settings. Comments are welcome, especially from anyone with a hand-written niri config.What happens today
fjordxy generates all of
~/.config/niri/config.kdlfrom Nix (programs.niri.settings, via niri-flake). The file is a read-only store symlink, checked withniri validateat build. The order is:fjordxy.toml's[niri]table, which beats fjordxy's defaults (mkDefault).blur, thenprograms.fjordxy.niri.extraNodes.include optional=true ".../fjordxy/current/niri-theme.kdl": the live theme.include optional=true ".../fjordxy/current/niri-settings.kdl": kept for drawer controls that don't exist yet.What follows from that:
home-manager.backupFileExtension = "hm-bak". So if you had aconfig.kdl, home-manager moved it to~/.config/niri/config.kdl.hm-bak. Yourleft-handedis in there.niri-settings.kdl. Your workaround file there is safe for now, because nothing writes that file yet. It will be overwritten once drawer controls ship, so don't keep it there long-term.How DMS does it, for comparison
On a regular distro, DMS writes fragments to
~/.config/niri/dms/*.kdl. You pasteincludelines at the end of your ownconfig.kdl, and DMS never edits that file. Its binds-next/binds order means your binds win.On Nix, DMS also generates
config.kdl: the niri-flake output goes tohm.kdl, and the DMS fragments are included after it. So the part people like is not "the shell doesn't touch config.kdl". It's a hand-written file the shell never touches, which hot-reloads and wins.Proposal
fjordxy keeps generating
config.kdland adds one last include:local.kdlis yours. fjordxy creates it once with a commented header if it's missing, and never writes it again. Order, weakest to strongest:fjordxy defaults <
fjordxy.toml< your Nix <extraNodes< theme < drawer controls <local.kdlHow niri merges (from niri's include docs):
Mod+Y { move-workspace-to-monitor-next; }just works.layout,gesturesand similar sections merge field by field.window-ruleandoutputare added as written. A later rule wins.input { mouse { … } }replaces the wholemousesection, and the same goes fortouchpad. Your example works exactly as you'd expect.local.kdlis not checked at build, because it lives in$HOME. niri checks it on every save and keeps the last good config if it's broken. The session will also runniri validateat login and show an alert.For those who want raw kdl in their flake instead:
programs.fjordxy.niri.localConfig = ./niri.kdl;uses the same include point, but from the store, so it is checked byniri validateat build.Known gaps:
local.kdlwon't appear on the keybindings sheet or the command page until the shell reads that file too (step 5).local.kdlwithout saying so, until they learn to show "set in local.kdl" (step 6).Multiple monitors
Mod+Yabove, plus the existingMod+Shift+Ctrl+←/→(move column to monitor), is how you move things between screens.position, niri sorts outputs by connector name and lays them out left to right. SoDP-1ends up left ofHDMI-A-1, whatever your desk looks like. Fix it inlocal.kdl, using names fromniri msg outputsand positions in logical pixels, so scale counts:Steps
gestures.hot-corners.enable = false)~/.config/niri/local.kdllast; create it with a header if it's missingprograms.fjordxy.niri.localConfig(path in the flake, checked at build)niri validateand an alert on errors. First check what niri does on a parse error at login.config.kdl.hm-bak, what to strip from a DMS config (dms/*.kdlincludes,spawn-at-startup "dms", DMS IPC binds) and monitor positions.local.kdlniri-settings.kdl, so no hand-written file gets overwrittenQuestions
local.kdlcover what you wanted from the DMS model? Or do you really want to ownconfig.kdlyourself and include fjordxy's file? That's possible, but then a missing include means noMod+G.local.kdlbeat the theme and drawer controls, as proposed? The alternative is that the drawer always wins. Then a colour you set inlocal.kdldisappears at the next theme switch.~/.config/niri/local.kdlright?Mod+Y(move-workspace-to-monitor-next) be a fjordxy default? The key is free.🤖 Generated with Claude Code