Skip to content

Commit 0bd78d9

Browse files
mcvalosborneclaude
andcommitted
Copy shell command instead of raw config; fix theme keys
- Mixer and gallery cards now copy a mkdir + append command that writes to ~/.config/ghostty/config, so it works when pasted into any terminal (including Ghostty itself) without needing to open the config file by hand. - Correct 7 theme keys to match the actual filenames Ghostty ships (TokyoNight, Nord, Rose Pine, Solarized Dark Patched, iTerm2 Solarized Light, Kanagawa Wave, TokyoNight Storm). - Update footer instructions and Part-one copy to match the new flow. - Rename primary button "Copy config" → "Copy command". - Ignore LAUNCH.md (local-only launch plan). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5782ee9 commit 0bd78d9

2 files changed

Lines changed: 28 additions & 16 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
LAUNCH.md

index.html

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ <h1>Ghostty themes &amp; fonts, <em>mixed to taste.</em></h1>
881881
<div class="terminal" id="mix-terminal"></div>
882882
<div class="mixer-config">
883883
<pre id="mix-config"></pre>
884-
<button class="btn-copy-lg" id="mix-copy">Copy config</button>
884+
<button class="btn-copy-lg" id="mix-copy">Copy command</button>
885885
</div>
886886
</div>
887887
</div>
@@ -895,7 +895,8 @@ <h1>Ghostty themes &amp; fonts, <em>mixed to taste.</em></h1>
895895
<h2>Color schemes, <em>sixteen ways.</em></h2>
896896
<p>
897897
Every palette rendered in its actual hex values. Scroll to compare.
898-
Click any "Copy" to grab just the theme line.
898+
Click any "Copy" to grab a one-line command that adds just that
899+
theme to your config.
899900
</p>
900901
</div>
901902
<div class="theme-grid" id="theme-grid"></div>
@@ -986,13 +987,13 @@ <h2>Three lines to a <em>new look.</em></h2>
986987
<li>
987988
<div>
988989
Use the <strong>mixer</strong> above (or click Copy on any card) —
989-
the config goes to your clipboard.
990+
a shell command goes to your clipboard.
990991
</div>
991992
</li>
992993
<li>
993994
<div>
994-
Open your config: <code>~/.config/ghostty/config</code> — replace
995-
or add the lines.
995+
Paste it into any terminal and hit enter — it appends to
996+
<code>~/.config/ghostty/config</code>. No editor required.
996997
</div>
997998
</li>
998999
<li>
@@ -1001,6 +1002,12 @@ <h2>Three lines to a <em>new look.</em></h2>
10011002
restart needed.
10021003
</div>
10031004
</li>
1005+
<li>
1006+
<div>
1007+
Prefer to edit the file by hand? The command is transparent — you
1008+
can read what it will append before pasting.
1009+
</div>
1010+
</li>
10041011
<li>
10051012
<div>
10061013
For fonts not installed:
@@ -1103,7 +1110,7 @@ <h2>Three lines to a <em>new look.</em></h2>
11031110
},
11041111
{
11051112
name: "Tokyo Night",
1106-
key: "Tokyo Night",
1113+
key: "TokyoNight",
11071114
desc: "Cool blues, soft purples. City-at-night mood.",
11081115
p: {
11091116
bg: "#1a1b26",
@@ -1120,7 +1127,7 @@ <h2>Three lines to a <em>new look.</em></h2>
11201127
},
11211128
{
11221129
name: "Tokyo Night Storm",
1123-
key: "Tokyo Night Storm",
1130+
key: "TokyoNight Storm",
11241131
desc: "Tokyo Night with softer bg. Less harsh in low light.",
11251132
p: {
11261133
bg: "#24283b",
@@ -1171,7 +1178,7 @@ <h2>Three lines to a <em>new look.</em></h2>
11711178
},
11721179
{
11731180
name: "Nord",
1174-
key: "nord",
1181+
key: "Nord",
11751182
desc: "Arctic, restrained. Low-sat blues. Scandinavian.",
11761183
p: {
11771184
bg: "#2e3440",
@@ -1205,7 +1212,7 @@ <h2>Three lines to a <em>new look.</em></h2>
12051212
},
12061213
{
12071214
name: "Rosé Pine",
1208-
key: "rose-pine",
1215+
key: "Rose Pine",
12091216
desc: "Muted plum bg. Rose, iris, foam. Poetic.",
12101217
p: {
12111218
bg: "#191724",
@@ -1222,7 +1229,7 @@ <h2>Three lines to a <em>new look.</em></h2>
12221229
},
12231230
{
12241231
name: "Solarized Dark",
1225-
key: "Solarized Dark - Patched",
1232+
key: "Solarized Dark Patched",
12261233
desc: "Scientifically calibrated. The classic.",
12271234
p: {
12281235
bg: "#002b36",
@@ -1239,7 +1246,7 @@ <h2>Three lines to a <em>new look.</em></h2>
12391246
},
12401247
{
12411248
name: "Solarized Light",
1242-
key: "Solarized Light",
1249+
key: "iTerm2 Solarized Light",
12431250
desc: "Same math, inverted. Calm cream for daytime.",
12441251
p: {
12451252
bg: "#fdf6e3",
@@ -1256,7 +1263,7 @@ <h2>Three lines to a <em>new look.</em></h2>
12561263
},
12571264
{
12581265
name: "Kanagawa",
1259-
key: "Kanagawa",
1266+
key: "Kanagawa Wave",
12601267
desc: "Inspired by Hokusai. Muted, painterly.",
12611268
p: {
12621269
bg: "#1f1f28",
@@ -1480,7 +1487,7 @@ <h2>Three lines to a <em>new look.</em></h2>
14801487
<div class="preview-title">${t.name}</div>
14811488
<div class="preview-desc">${t.desc}</div>
14821489
</div>
1483-
<button class="copy-btn" data-config="theme = ${t.key}">Copy</button>
1490+
<button class="copy-btn" data-config="mkdir -p ~/.config/ghostty && echo 'theme = ${t.key}' >> ~/.config/ghostty/config">Copy</button>
14841491
</div>
14851492
<div class="terminal" style="${paletteVars(t.p)}">${terminalGallery(t.p)}</div>
14861493
</article>
@@ -1504,7 +1511,7 @@ <h2>Three lines to a <em>new look.</em></h2>
15041511
<div class="preview-title">${f.name}${f.ligatures ? ' <span class="lig-badge">lig</span>' : ""}</div>
15051512
<div class="preview-desc">${f.desc}</div>
15061513
</div>
1507-
<button class="copy-btn" data-config='font-family = "${f.key}"'>Copy</button>
1514+
<button class="copy-btn" data-config='mkdir -p ~/.config/ghostty && echo &apos;font-family = "${f.key}"&apos; >> ~/.config/ghostty/config'>Copy</button>
15081515
</div>
15091516
<div class="terminal" style="${paletteVars(tinted)}">${terminalFont()}</div>
15101517
</article>
@@ -1555,7 +1562,11 @@ <h2>Three lines to a <em>new look.</em></h2>
15551562
lines.push(`background = ${tinted.bg.replace("#", "")}`);
15561563
lines.push(`font-family = "${font.key}"`);
15571564
lines.push(`font-size = 14`);
1558-
document.getElementById("mix-config").textContent = lines.join("\n");
1565+
const command = `mkdir -p ~/.config/ghostty && cat >> ~/.config/ghostty/config <<'EOF'
1566+
# ghostty-theme-mixer
1567+
${lines.join("\n")}
1568+
EOF`;
1569+
document.getElementById("mix-config").textContent = command;
15591570
}
15601571

15611572
function wireMixer() {
@@ -1588,7 +1599,7 @@ <h2>Three lines to a <em>new look.</em></h2>
15881599
btn.classList.add("copied");
15891600
showToast(text.split("\n")[0] + "…");
15901601
setTimeout(() => {
1591-
btn.textContent = "Copy config";
1602+
btn.textContent = "Copy command";
15921603
btn.classList.remove("copied");
15931604
}, 1800);
15941605
});

0 commit comments

Comments
 (0)