chore(theme): prune 9 dead templates, document the 2 that ship
themes/templates/ shipped 11 mustache templates, but
nomarchy-theme-set-templates only writes to a path when no file is
already there — and a careful trace shows 9 of the 11 outputs are
either preempted by an earlier write or never read at all:
- kitty.conf.tpl, ghostty.conf.tpl
→ shadowed by the per-palette generators in
themes/engine/files.nix added in 8d3ce2d.
- hyprland.conf.tpl
→ shadowed by files.nix:100, which always writes
~/.config/nomarchy/current/theme/hyprland.conf from the
palette/feature/nord fallback chain.
- hyprlock.conf.tpl, alacritty.toml.tpl, btop.theme.tpl,
chromium.theme.tpl, swayosd.css.tpl
→ output paths nothing reads. alacritty + swayosd are themed
via Stylix / declarative HM options inline. btop reads from
~/.config/btop/themes/nomarchy.theme (loader.nix:72), not
from the theme symlink. chromium is themed via the managed-
policy module in core/system/browser.nix. hyprlock has no
consumer of theme/hyprlock.conf anywhere in the tree.
- hyprland-preview-share-picker.css.tpl
→ orphaned when the share-picker dir was deleted in 20de3d4.
obsidian.css.tpl and keyboard.rgb.tpl stay: the first is consumed by
nomarchy-theme-set-obsidian (copied into every Obsidian vault), the
second by nomarchy-theme-set-keyboard-asus-rog (sets the ROG
keyboard tint via asusctl).
Rewrote Step 6 of docs/creating-themes.md to describe the two live
templates by name and corrected a path bug ("~/.config/nomarchy/themed/"
→ "~/.config/nomarchy/themes/templates/" — the script actually reads
the latter).
`nix flake check --no-build` clean.
This commit is contained in:
@@ -175,17 +175,26 @@ decoration {
|
||||
|
||||
## Step 6: Template Variables
|
||||
|
||||
Nomarchy has a template system that generates app configs from your `colors.toml`. Templates in `themes/templates/*.tpl` use placeholder syntax:
|
||||
Nomarchy has a small template system that generates per-palette files from your `colors.toml` at `nomarchy-theme-set` time. Templates in `themes/templates/*.tpl` use placeholder syntax:
|
||||
|
||||
| Syntax | Example Value | Description |
|
||||
|---------------------|---------------|--------------------------------|
|
||||
| `{{ background }}` | `#2d353b` | Color value as-is (with `#`) |
|
||||
| `{{ background_strip }}` | `2d353b` | Color value without `#` |
|
||||
| `{{ background_rgb }}` | `45,53,59` | Color as decimal RGB |
|
||||
| Syntax | Example Value | Description |
|
||||
|-------------------------|---------------|------------------------------|
|
||||
| `{{ background }}` | `#2d353b` | Color value as-is (with `#`) |
|
||||
| `{{ background_strip }}`| `2d353b` | Color value without `#` |
|
||||
| `{{ background_rgb }}` | `45,53,59` | Color as decimal RGB |
|
||||
|
||||
Every key from `colors.toml` is available as a template variable. Templates are processed automatically by `nomarchy-theme-set-templates` when switching themes.
|
||||
Every key from `colors.toml` is available as a template variable. The script (`nomarchy-theme-set-templates`) processes each template into `~/.config/nomarchy/current/theme/<name>` only when no file is already there — so it acts as a fallback for palettes that don't ship the file themselves.
|
||||
|
||||
To add custom templates, place `.tpl` files in `~/.config/nomarchy/themed/`. User templates take priority over built-in ones.
|
||||
Two built-in templates ship:
|
||||
|
||||
| Template | Output | Consumed by |
|
||||
|---------------------|------------------------------------------------|-----------------------------------------------------------------------------|
|
||||
| `obsidian.css.tpl` | `~/.config/nomarchy/current/theme/obsidian.css` | `nomarchy-theme-set-obsidian` copies it into every Obsidian vault |
|
||||
| `keyboard.rgb.tpl` | `~/.config/nomarchy/current/theme/keyboard.rgb` | `nomarchy-theme-set-keyboard-asus-rog` calls `asusctl aura effect static` |
|
||||
|
||||
Everything else that used to ship a template (`alacritty.toml.tpl`, `btop.theme.tpl`, `chromium.theme.tpl`, `ghostty.conf.tpl`, `hyprland.conf.tpl`, `hyprlock.conf.tpl`, `kitty.conf.tpl`, `swayosd.css.tpl`, `hyprland-preview-share-picker.css.tpl`) has been removed: those apps are themed via Stylix, declarative Home-Manager options, or per-palette Nix generators in `themes/engine/files.nix` — the template path was always shadowed by an earlier write.
|
||||
|
||||
To add a custom template, drop a `.tpl` file in `~/.config/nomarchy/themes/templates/`. User templates take priority over built-in ones.
|
||||
|
||||
## Step 7: Preview Image (Optional)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user