aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/generate.py
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-24 05:46:43 -0400
committerCraig Jennings <c@cjennings.net>2026-06-24 05:46:43 -0400
commitaa82b41028d7077205a9bff7e5a645e17a7cf36f (patch)
treeaa96b7672e3f3a7adb298908f16036a369146df6 /scripts/theme-studio/generate.py
parente3795af2adc128a70bce283a08054a0d8d6106e7 (diff)
downloaddotemacs-aa82b41028d7077205a9bff7e5a645e17a7cf36f.tar.gz
dotemacs-aa82b41028d7077205a9bff7e5a645e17a7cf36f.zip
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
Diffstat (limited to 'scripts/theme-studio/generate.py')
-rw-r--r--scripts/theme-studio/generate.py6
1 files changed, 5 insertions, 1 deletions
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