From 5e72000497732e7d20c179d2562e4bfacc1e3fbe Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Wed, 24 Jun 2026 05:46:43 -0400 Subject: feat(theme-studio): bespoke nerd-icons filetype-legend preview (phase 2) Register nerd-icons as a bespoke app whenever its captured legend is valid: the 34 color faces stay editable rows, and the legend rides APPS['nerd-icons'].legend. A new renderNerdIconsPreview draws each curated filetype's glyph in its mapped face's effective color, read through the same registry the other previews use, so recoloring a face repaints every row mapped to it. When the legend is absent the generic inventory app stands in. The #nerdiconstest browser gate covers the wiring, the dir-row owner, and the recolor-repaint. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ --- scripts/theme-studio/generate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/theme-studio/generate.py') diff --git a/scripts/theme-studio/generate.py b/scripts/theme-studio/generate.py index 4f390a850..edfb7e52b 100644 --- a/scripts/theme-studio/generate.py +++ b/scripts/theme-studio/generate.py @@ -1,5 +1,5 @@ import json, os, re -from app_inventory import add_inventory_apps, apply_default_face_seeds, apply_package_overrides, face_rows +from app_inventory import add_inventory_apps, add_nerd_icons_app, apply_default_face_seeds, apply_package_overrides, face_rows from default_faces import DefaultFaces from face_data import * from face_specs import face_spec, ui_face_spec, migrate_legacy @@ -297,6 +297,10 @@ def _build(): # Phase 6: merge the generated all-package inventory (refresh with build-inventory.el). # Bespoke apps stay; every other installed package becomes an editable generic app. _inv_path=os.path.join(HERE,"package-inventory.json") + # nerd-icons becomes a bespoke filetype-legend app when its captured legend is + # valid; otherwise add_inventory_apps below makes it a plain generic app (the + # fallback). Must precede add_inventory_apps so the generic path skips it. + add_nerd_icons_app(APPS, _inv_path, load_nerd_icons_legend()) add_inventory_apps(APPS, _inv_path) apply_default_face_seeds(APPS, DEFAULTS) # Apply seed theme package overrides when THEME_STUDIO_SEED is set: each full -- cgit v1.2.3