aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-08 08:56:47 -0500
committerCraig Jennings <c@cjennings.net>2026-06-08 08:57:05 -0500
commitf2654a0083a94d0e0dc7cbb6094aae6116a1c318 (patch)
tree1aab6dac6b8c8b6cd4ccdb3ca06cd66055f55cbd /scripts
parent01e4214819fa9011f684097d54f5d8953973f8fc (diff)
downloaddotemacs-f2654a0083a94d0e0dc7cbb6094aae6116a1c318.tar.gz
dotemacs-f2654a0083a94d0e0dc7cbb6094aae6116a1c318.zip
refactor(theme-studio): rename theme-selector to theme-studio
The tool authors themes from scratch -- palette, faces across every tier, live preview, export to a loadable deftheme. It never selects among existing themes, so "selector" mis-described it. Renamed the directory, the generated HTML and its title, the design spec, and every reference in the code, README, tests, and todo. No behavior change.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/theme-studio/README.md (renamed from scripts/theme-selector/README.md)14
-rw-r--r--scripts/theme-studio/build-inventory.el (renamed from scripts/theme-selector/build-inventory.el)6
-rw-r--r--scripts/theme-studio/build-theme.el (renamed from scripts/theme-selector/build-theme.el)14
-rw-r--r--scripts/theme-studio/generate.py (renamed from scripts/theme-selector/generate.py)4
-rw-r--r--scripts/theme-studio/package-inventory.json (renamed from scripts/theme-selector/package-inventory.json)0
-rw-r--r--scripts/theme-studio/samples.py (renamed from scripts/theme-selector/samples.py)0
-rw-r--r--scripts/theme-studio/theme-studio.html (renamed from scripts/theme-selector/theme-selector.html)2
7 files changed, 20 insertions, 20 deletions
diff --git a/scripts/theme-selector/README.md b/scripts/theme-studio/README.md
index 8f63383c1..620340396 100644
--- a/scripts/theme-selector/README.md
+++ b/scripts/theme-studio/README.md
@@ -1,4 +1,4 @@
-# theme-selector
+# theme-studio
A self-contained tool for designing Emacs color themes by eye. One generated
HTML page drives the whole theme: a palette, the syntax (font-lock /
@@ -11,13 +11,13 @@ readouts, then export a `theme.json` that a build step turns into
## Run
```bash
-python3 generate.py # writes theme-selector.html beside this script
+python3 generate.py # writes theme-studio.html beside this script
```
Then open it in Chrome (Firefox had color-rendering flakiness during design):
```bash
-WAYLAND_DISPLAY=wayland-1 google-chrome-stable theme-selector.html
+WAYLAND_DISPLAY=wayland-1 google-chrome-stable theme-studio.html
```
During color work, disable Hyprland inactive-window dimming so colors read true:
@@ -37,7 +37,7 @@ hyprctl keyword decoration:dim_inactive false
faces it defines (see Package faces below). A committed data artifact.
- `build-inventory.el` — refreshes `package-inventory.json` from a running
Emacs.
-- `theme-selector.html` — generated output. Regenerate; don't hand-edit.
+- `theme-studio.html` — generated output. Regenerate; don't hand-edit.
## What it captures
@@ -95,7 +95,7 @@ The reachable packages come from `package-inventory.json`. Regenerate it from a
running Emacs (so it reflects what's actually installed), then rebuild the HTML:
```bash
-emacsclient -e '(load "/home/cjennings/.emacs.d/scripts/theme-selector/build-inventory.el")'
+emacsclient -e '(load "/home/cjennings/.emacs.d/scripts/theme-studio/build-inventory.el")'
python3 generate.py
```
@@ -149,8 +149,8 @@ the UI faces passed through, and the package faces with `:inherit`/`:height`
and weight/slant written.
```bash
-emacs --batch -l scripts/theme-selector/build-theme.el \
- --eval '(build-theme/convert-file "scripts/theme-selector/dupre-revised.json" "themes")'
+emacs --batch -l scripts/theme-studio/build-theme.el \
+ --eval '(build-theme/convert-file "scripts/theme-studio/dupre-revised.json" "themes")'
```
Output is a flat generated deftheme, not the palette/faces/theme trio the
diff --git a/scripts/theme-selector/build-inventory.el b/scripts/theme-studio/build-inventory.el
index 52e14baa1..04d821453 100644
--- a/scripts/theme-selector/build-inventory.el
+++ b/scripts/theme-studio/build-inventory.el
@@ -1,10 +1,10 @@
-;;; build-inventory.el --- emit package->faces inventory for theme-selector -*- lexical-binding: t -*-
+;;; build-inventory.el --- emit package->faces inventory for theme-studio -*- lexical-binding: t -*-
;;; Commentary:
;; Loaded into a running Emacs (emacsclient -e '(load ".../build-inventory.el")')
;; to write package-inventory.json next to itself: a JSON object mapping each
;; installed (elpa/straight) package to the faces it defines, grouped by the
;; package that owns the face's definition file. Built-in faces are skipped.
-;; generate.py embeds the JSON so the theme-selector dropdown can reach every
+;; generate.py embeds the JSON so the theme-studio dropdown can reach every
;; installed package (tier-3 phase 6, the "theme every package" path).
;;; Code:
@@ -23,7 +23,7 @@
(with-temp-file (expand-file-name
"package-inventory.json"
(file-name-directory (or load-file-name buffer-file-name
- "~/.emacs.d/scripts/theme-selector/")))
+ "~/.emacs.d/scripts/theme-studio/")))
(let ((json-encoding-pretty-print t))
(insert (json-encode al) "\n")))))
diff --git a/scripts/theme-selector/build-theme.el b/scripts/theme-studio/build-theme.el
index fe080c0d1..c869dea18 100644
--- a/scripts/theme-selector/build-theme.el
+++ b/scripts/theme-studio/build-theme.el
@@ -1,12 +1,12 @@
-;;; build-theme.el --- Convert a theme-selector theme.json into a deftheme -*- lexical-binding: t -*-
+;;; build-theme.el --- Convert a theme-studio theme.json into a deftheme -*- lexical-binding: t -*-
;; Author: Craig Jennings <c@cjennings.net>
;;; Commentary:
-;; The last link in the theme-selector pipeline: turn a theme.json exported by
-;; the tool (see scripts/theme-selector/README.md and
-;; docs/design/theme-selector-package-faces-spec.org) into a single,
+;; The last link in the theme-studio pipeline: turn a theme.json exported by
+;; the tool (see scripts/theme-studio/README.md and
+;; docs/design/theme-studio-package-faces-spec.org) into a single,
;; self-contained, loadable Emacs deftheme written to themes/<name>-theme.el.
;;
;; Four tiers come out of the JSON:
@@ -190,12 +190,12 @@ the font-lock faces in `build-theme/--syntax-face-map'."
(defun build-theme/--render (name specs)
"Render a deftheme file body for theme NAME from face SPECS, as a string."
(concat
- (format ";;; %s-theme.el --- Generated by theme-selector -*- lexical-binding: t -*-\n" name)
+ (format ";;; %s-theme.el --- Generated by theme-studio -*- lexical-binding: t -*-\n" name)
"\n;;; Commentary:\n"
- (format ";; Generated from %s.json by scripts/theme-selector/build-theme.el.\n" name)
+ (format ";; Generated from %s.json by scripts/theme-studio/build-theme.el.\n" name)
";; Do not hand-edit; re-run the converter.\n"
"\n;;; Code:\n\n"
- (format "(deftheme %s\n \"Generated by theme-selector.\")\n\n" name)
+ (format "(deftheme %s\n \"Generated by theme-studio.\")\n\n" name)
(format "(custom-theme-set-faces\n '%s\n" name)
;; Each spec is quoted: custom-theme-set-faces is a function, so an
;; unquoted (face ((t ...))) would be evaluated as a call. Specs hold
diff --git a/scripts/theme-selector/generate.py b/scripts/theme-studio/generate.py
index 8e76c1740..405ce150a 100644
--- a/scripts/theme-selector/generate.py
+++ b/scripts/theme-studio/generate.py
@@ -369,7 +369,7 @@ if os.path.exists(_inv_path):
APPS[_pkg]={"label":_pkg,"preview":"generic","faces":[
[f,(f[len(_pkg)+1:] if f.startswith(_pkg+"-") else f).replace("-face","").replace("-"," "),{}]
for f in _INV[_pkg]]}
-HTML = """<!doctype html><meta charset=utf-8><title>theme-selector</title>
+HTML = """<!doctype html><meta charset=utf-8><title>theme-studio</title>
<style>
body{background:#0d0b0a;color:#cdced1;font:15px/1.55 monospace;margin:20px}
h1{font-size:22px;font-weight:normal;color:#e8bd30;margin:26px 0 10px;border-bottom:1px solid #252321;padding-bottom:6px}
@@ -1111,6 +1111,6 @@ HTML=(HTML.replace("SAMPLES_J",json.dumps(SAMPLES))
.replace("PALETTE_J",json.dumps(PALETTE)).replace("CATS_J",json.dumps(CATS))
.replace("UIFACES_J",json.dumps(UI_FACES)).replace("UIMAP_J",json.dumps(UIMAP)).replace("APPS_J",json.dumps(APPS))
.replace("BOLD_J",json.dumps(BOLD)).replace("MAP_J",json.dumps(MAP)))
-OUT=os.path.join(HERE,'theme-selector.html')
+OUT=os.path.join(HERE,'theme-studio.html')
open(OUT,"w").write(HTML)
print("wrote",OUT)
diff --git a/scripts/theme-selector/package-inventory.json b/scripts/theme-studio/package-inventory.json
index 18fd7aa25..18fd7aa25 100644
--- a/scripts/theme-selector/package-inventory.json
+++ b/scripts/theme-studio/package-inventory.json
diff --git a/scripts/theme-selector/samples.py b/scripts/theme-studio/samples.py
index e487cc5e9..e487cc5e9 100644
--- a/scripts/theme-selector/samples.py
+++ b/scripts/theme-studio/samples.py
diff --git a/scripts/theme-selector/theme-selector.html b/scripts/theme-studio/theme-studio.html
index 30279c745..61466d420 100644
--- a/scripts/theme-selector/theme-selector.html
+++ b/scripts/theme-studio/theme-studio.html
@@ -1,4 +1,4 @@
-<!doctype html><meta charset=utf-8><title>theme-selector</title>
+<!doctype html><meta charset=utf-8><title>theme-studio</title>
<style>
body{background:#0d0b0a;color:#cdced1;font:15px/1.55 monospace;margin:20px}
h1{font-size:22px;font-weight:normal;color:#e8bd30;margin:26px 0 10px;border-bottom:1px solid #252321;padding-bottom:6px}