aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/app_inventory.py
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-19 11:09:01 -0400
committerCraig Jennings <c@cjennings.net>2026-06-19 11:09:01 -0400
commita12bd7fc0dfe241d2d2c485f98553af9cf95e283 (patch)
tree5552d6547560f52ec7fb74692db2154ecb29f5d6 /scripts/theme-studio/app_inventory.py
parent4b55bc5b2cb5d1ccb0b2ba62359644c1a3de589d (diff)
downloaddotemacs-a12bd7fc0dfe241d2d2c485f98553af9cf95e283.tar.gz
dotemacs-a12bd7fc0dfe241d2d2c485f98553af9cf95e283.zip
refactor(theme-studio): single-source the bespoke-app list in face_data
The bespoke apps were listed twice: generate.py's _BESPOKE_APPS (key, label, preview, faces, prefix, seed) and app_inventory's BESPOKE_APPS set of keys, which had drifted (it carried both "org" and "org-mode"). The spec list now lives in face_data.py as BESPOKE_APP_SPECS, beside the FACES/SEED constants it references. generate.py builds APPS from it, and app_inventory derives its exclusion set from the same keys plus an explicit "org" alias of the "org-mode" app. Adding a bespoke app is now one row. APPS order and the generated page are unchanged.
Diffstat (limited to 'scripts/theme-studio/app_inventory.py')
-rw-r--r--scripts/theme-studio/app_inventory.py33
1 files changed, 7 insertions, 26 deletions
diff --git a/scripts/theme-studio/app_inventory.py b/scripts/theme-studio/app_inventory.py
index ed904b11..11ca605d 100644
--- a/scripts/theme-studio/app_inventory.py
+++ b/scripts/theme-studio/app_inventory.py
@@ -7,33 +7,14 @@ import os
from collections.abc import Sequence
from typing import Any
+from face_data import BESPOKE_APP_SPECS
-BESPOKE_APPS = {
- "magit",
- "elfeed",
- "org",
- "org-mode",
- "mu4e",
- "gnus",
- "org-faces",
- "ghostel",
- "auto-dim-other-buffers",
- "dashboard",
- "lsp-mode",
- "git-gutter",
- "flycheck",
- "dired",
- "dirvish",
- "calibredb",
- "erc",
- "org-drill",
- "org-noter",
- "signel",
- "pearl",
- "slack",
- "telega",
- "shr",
-}
+
+# Keys of the bespoke apps (single-sourced in face_data), excluded from the
+# generic-inventory path so they aren't also emitted as plain inventory apps.
+# "org" is an explicit alias of the "org-mode" bespoke app, so an inventory
+# package literally named "org" never gets a duplicate generic entry.
+BESPOKE_APPS = {spec[0] for spec in BESPOKE_APP_SPECS} | {"org"}
# Inventory apps (not in BESPOKE_APPS) default to the generic preview. A few have