diff options
| author | Saiyed Shizain <saiyedshizain@gmail.com> | 2026-09-11 18:57:51 +0530 |
|---|---|---|
| committer | Saiyed Shizain <saiyedshizain@gmail.com> | 2026-09-11 18:57:51 +0530 |
| commit | 5a90041da51c6813890b05a4bc1f9fcfe67c27de (patch) | |
| tree | 2d2dcaa22f6b8c82c4b801908e66e32418182721 | |
| parent | b37fff291e4b5ac3577e865807bb25cf1e03d569 (diff) | |
| download | pomoru-5a90041da51c6813890b05a4bc1f9fcfe67c27de.tar.xz pomoru-5a90041da51c6813890b05a4bc1f9fcfe67c27de.zip | |
docs: fix noctalia v5 wiring instructions and asset templates.toml
- Correct CLI command: noctalia msg templates-apply (not theme --render-templates)
- Correct config schema: [theme.templates.user.*] (not matugen's [templates.*])
- Explain {{colors.<role>.default.hex}} token syntax in README
- Add migration note for v4 users: delete stale colors.json + user-templates.toml
- Add noctalia config validate step to setup instructions
- Update assets/noctalia/templates.toml with correct setup comments and schema
| -rw-r--r-- | README.md | 64 | ||||
| -rw-r--r-- | assets/noctalia/templates.toml | 32 |
2 files changed, 68 insertions, 28 deletions
@@ -152,28 +152,45 @@ Pomoru picks up colors in this priority order: | Priority | Source | When it applies | |----------|--------|-----------------| -| 1 | `~/.cache/pomoru/colors.json` | Noctalia v5 matugen template (recommended) | -| 2 | `~/.config/noctalia/colors.json` | Legacy noctalia `< v5` format | +| 1 | `~/.cache/pomoru/colors.json` | Noctalia v5 user template (recommended) | +| 2 | `~/.config/noctalia/colors.json` | Legacy noctalia v4 format | | 3 | Built-in defaults | Catppuccin Mocha palette | -### Noctalia v5 (matugen) — recommended +### Noctalia v5 — wiring it up -Copy the template and add the user-template entry so noctalia re-renders pomoru's colors whenever your palette changes: +Noctalia v5 uses its own template engine (matugen-compatible `{{colors.<role>.default.hex}}` tokens). When the wallpaper or palette changes, noctalia re-renders all configured templates automatically. Pomoru ships the template and config snippet needed to hook into this system. + +**One-time setup:** ```bash -# 1. Copy the template file +# 1. Copy the input template into noctalia's template directory mkdir -p ~/.config/noctalia/templates cp assets/noctalia/colors-template.json \ ~/.config/noctalia/templates/pomoru-colors.json -# 2. Append the template entry to your noctalia templates config +# 2. Register the user template in noctalia's config +# Either append to an existing templates.toml, or create it fresh: cat assets/noctalia/templates.toml >> ~/.config/noctalia/templates.toml -# 3. Trigger an immediate render (or just change your wallpaper) -noctalia theme --render-templates +# 3. Render immediately (no need to change wallpaper) +noctalia msg templates-apply ``` -The template entry noctalia needs is: +After step 3, `~/.cache/pomoru/colors.json` will exist and pomoru picks it +up on the next launch. + +**What noctalia renders** (`assets/noctalia/colors-template.json`): + +```json +{ + "primary": "{{colors.primary.default.hex}}", + "on_surface_variant": "{{colors.on_surface_variant.default.hex}}", + "surface_container": "{{colors.surface_container.default.hex}}", + "on_surface": "{{colors.on_surface.default.hex}}" +} +``` + +**The config block** (`assets/noctalia/templates.toml`) noctalia reads: ```toml [theme.templates.user.pomoru] @@ -181,10 +198,33 @@ input_path = "$XDG_CONFIG_HOME/noctalia/templates/pomoru-colors.json" output_path = "$XDG_CACHE_HOME/pomoru/colors.json" ``` -### Legacy noctalia (`< v5`) +> **Note:** `$XDG_CONFIG_HOME` defaults to `~/.config` and `$XDG_CACHE_HOME` +> defaults to `~/.cache`. Noctalia v5 expands these automatically. + +> **Coming from noctalia v4?** Delete the stale files from `~/.config/noctalia/`: +> - `colors.json` — not read by v5 +> - `user-templates.toml` — uses matugen's old `[templates.*]` schema; v5 will +> warn `templates: unknown section` and ignore it. The v5 schema is +> `[theme.templates.user.*]` in any `*.toml` under `~/.config/noctalia/`. + +**Validate your config:** + +```bash +noctalia config validate ~/.config/noctalia/templates.toml +# → ✓ Config is valid +``` + +**Re-apply without changing wallpaper:** + +```bash +noctalia msg templates-apply +``` + +### Legacy noctalia (v4) -No setup required. If `~/.config/noctalia/colors.json` exists and the -matugen cache file does not, pomoru reads colors from it automatically. +No setup required. If `~/.config/noctalia/colors.json` exists and +`~/.cache/pomoru/colors.json` does not, pomoru reads the legacy camelCase +format automatically. Delete it once you've set up the v5 template above. --- diff --git a/assets/noctalia/templates.toml b/assets/noctalia/templates.toml index 51d3f41..8a48f8c 100644 --- a/assets/noctalia/templates.toml +++ b/assets/noctalia/templates.toml @@ -1,28 +1,28 @@ # Noctalia v5 user-template for pomoru # -# This template tells noctalia to render pomoru's theme colors whenever -# the palette changes, so pomoru always matches your wallpaper-derived scheme. +# This tells noctalia to render pomoru's theme colors whenever the palette +# changes (wallpaper change, manual palette switch, etc.). # # SETUP # ----- -# Option A – Drop this file into your noctalia config directory: +# 1. Copy the input template into noctalia's templates directory: # -# cp ~/.config/noctalia/templates.toml ~/.config/noctalia/templates.toml.bak # optional backup -# cat assets/noctalia/templates.toml >> ~/.config/noctalia/templates.toml +# mkdir -p ~/.config/noctalia/templates +# cp assets/noctalia/colors-template.json \ +# ~/.config/noctalia/templates/pomoru-colors.json # -# Option B – Add the block below to ~/.config/noctalia/templates.toml manually. +# 2. Append this file to your noctalia templates config: # -# After adding it, noctalia will render the colors on the next palette change, -# or immediately via: noctalia theme --render-templates +# cat assets/noctalia/templates.toml >> ~/.config/noctalia/templates.toml +# +# Or create ~/.config/noctalia/templates.toml if it doesn't exist yet. +# +# 3. Apply immediately (noctalia must be running): +# +# noctalia msg templates-apply +# +# Validate: noctalia config validate ~/.config/noctalia/templates.toml [theme.templates.user.pomoru] input_path = "$XDG_CONFIG_HOME/noctalia/templates/pomoru-colors.json" output_path = "$XDG_CACHE_HOME/pomoru/colors.json" - -# TEMPLATE FILE -# ------------- -# Copy the template to the input_path above: -# -# mkdir -p ~/.config/noctalia/templates -# cp assets/noctalia/colors-template.json \ -# ~/.config/noctalia/templates/pomoru-colors.json |