Keep a desk colour the machine set itself, past the runtime theme #13

Merged
arne merged 1 commit from niri-pins into main 2026-11-05 22:58:43 +01:00
Owner

A machine that set programs.niri.settings.layout.background-color (black sets #00000000, to drop the veil over each desk) lost it as soon as fjordxy-theme rendered: the runtime niri-theme.kdl fragment is included after the generated config, and it wrote the theme's desk_background, so the white veil came back.

  • nix/niri.nix: finds whether the machine set that option at higher than default priority, and writes ~/.config/fjordxy/pins.json. That is { desk_background = <value>; } when it did, {} otherwise.
  • nix/fjordxy-theme.py: reads the pins and lets them override the theme's values when rendering.
  • niri-theme.kdl.tpl: a comment saying where the value can come from.

Tested:

  • black's pins file holds #00000000, and a machine that sets nothing writes {}
  • a sandboxed render gives #00000000 with the pin and the theme's #ede8de33 without it

🤖 Generated with Claude Code

A machine that set `programs.niri.settings.layout.background-color` (black sets `#00000000`, to drop the veil over each desk) lost it as soon as fjordxy-theme rendered: the runtime `niri-theme.kdl` fragment is included after the generated config, and it wrote the theme's `desk_background`, so the white veil came back. - **`nix/niri.nix`**: finds whether the machine set that option at higher than default priority, and writes `~/.config/fjordxy/pins.json`. That is `{ desk_background = <value>; }` when it did, `{}` otherwise. - **`nix/fjordxy-theme.py`**: reads the pins and lets them override the theme's values when rendering. - **`niri-theme.kdl.tpl`**: a comment saying where the value can come from. Tested: - black's pins file holds `#00000000`, and a machine that sets nothing writes `{}` - a sandboxed render gives `#00000000` with the pin and the theme's `#ede8de33` without it 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The theme switcher renders `background-color` into a niri fragment that is
read last, so a consumer's own value held only until the first successful
render. Black and fox turn the wallpaper veil off with "#00000000"; once
the theme started rendering, the veil came back on every desk.

nix/niri.nix now looks through the definitions of programs.niri.settings
for `layout.background-color` set stronger than mkDefault (fjordxy's own is
not; fjordxy.toml's [niri] at 500 is) and writes it to
~/.config/fjordxy/pins.json; fjordxy-theme uses a pinned value as
`desk_background` instead of the veil. Checked: black pins "#00000000" and
renders it, a config without the line writes {} and renders the veil.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
arne merged commit 1f95aea6c9 into main 2026-11-05 22:58:43 +01:00
arne deleted branch niri-pins 2026-11-05 22:58:44 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bases/fjord!13
No description provided.