@kecan0406/ttheme 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -15
- package/bin/ttheme.js +792 -230
- package/dist/manifest.json +1 -1
- package/dist/shell/palettes.zsh +3 -3
- package/package.json +1 -1
- package/shell/adapters/_osc.zsh +4 -0
- package/shell/adapters/ghostty.zsh +26 -0
- package/shell/launch-tab.zsh +1 -1
- package/shell/ttheme.zsh +35 -18
package/README.md
CHANGED
|
@@ -7,7 +7,8 @@ Steins;Gate, Lucky☆Star, Bocchi the Rock!, Monogatari, Sailor Moon, Serial
|
|
|
7
7
|
Experiments Lain, VA-11 Hall-A, Persona 5, Undertale, Call of the Night,
|
|
8
8
|
Higurashi, Doki Doki Literature Club, Umineko, K-On!, Cyberpunk: Edgerunners,
|
|
9
9
|
Touhou Project, Chuunibyou and Jujutsu Kaisen, built for **Ghostty, kitty, Alacritty,
|
|
10
|
-
WezTerm and iTerm2**, plus a zsh layer that
|
|
10
|
+
WezTerm and iTerm2**, plus a zsh layer that repaints tabs at runtime — one palette everywhere, or
|
|
11
|
+
the next one on every new tab.
|
|
11
12
|
|
|
12
13
|
Two things separate this from the usual color-scheme dump:
|
|
13
14
|
|
|
@@ -63,13 +64,16 @@ npx @kecan0406/ttheme@latest init
|
|
|
63
64
|
```
|
|
64
65
|
|
|
65
66
|
It asks which terminals to wire and which series to install — `space` marks
|
|
66
|
-
one, enter moves on, and `select all` takes the lot —
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
one, enter moves on, and `select all` takes the lot — and how the terminal
|
|
68
|
+
should wear them: `default` (preselected) puts one palette on every tab,
|
|
69
|
+
`rotate` gives every new tab the next palette, `keep` leaves your terminal colors
|
|
70
|
+
alone and only installs. Then it shows what it is about to change and writes it all at once,
|
|
71
|
+
so cancelling before that touches nothing. It places the zsh layer under
|
|
72
|
+
`~/.config/ttheme` and edits your terminal config and `~/.zshrc` between
|
|
73
|
+
`# ttheme begin` / `# ttheme end` markers — everything outside the markers is
|
|
74
|
+
left alone. It ends with a receipt, paints the first palette onto the tab you
|
|
75
|
+
ran it in (not under `keep`) and lists what to do next (`exec zsh` for the
|
|
76
|
+
`ttheme` command here, a terminal restart for new tabs).
|
|
73
77
|
Running it again updates in place; `--yes` skips every prompt and installs no
|
|
74
78
|
palettes — `ttheme browse` opens the full catalog any time, to add or drop
|
|
75
79
|
single palettes.
|
|
@@ -115,9 +119,10 @@ it for real.
|
|
|
115
119
|
|
|
116
120
|
```
|
|
117
121
|
ttheme list every palette, grouped, with previews
|
|
118
|
-
ttheme homura
|
|
122
|
+
ttheme homura paint this tab (a unique prefix works: ttheme ho)
|
|
119
123
|
ttheme preview browse live — focus repaints the tab, enter keeps it (this tab or default)
|
|
120
124
|
ttheme next advance this tab to the next palette
|
|
125
|
+
ttheme default make a palette the one new tabs open with
|
|
121
126
|
ttheme pin pick a palette for this directory — cd into it repaints, cd out restores
|
|
122
127
|
ttheme unpin drop the palette pinned to this directory
|
|
123
128
|
ttheme config edit settings in $EDITOR — they apply in new tabs
|
|
@@ -150,8 +155,8 @@ the cursor. The list and the sample widen with the window (the sample up to 64
|
|
|
150
155
|
columns) and the gap between them takes the rest; the tuning panel takes the
|
|
151
156
|
sample's place while open, and so does the key list once the sample is 48
|
|
152
157
|
columns wide.
|
|
153
|
-
Under Ghostty with `TTHEME_TAB_PALETTE=off
|
|
154
|
-
**default**: default records the palette as your
|
|
158
|
+
Under Ghostty with `TTHEME_TAB_PALETTE=off` (the default), enter asks **this tab** or
|
|
159
|
+
**default**: default records the palette as your default palette (so a later
|
|
155
160
|
`add` or `remove` keeps it), rewrites `theme =` in the `# ttheme begin` block of
|
|
156
161
|
your Ghostty config and sends `SIGUSR2` to the Ghostty that owns the tab, so new tabs — and open tabs you have not
|
|
157
162
|
painted by hand — take the palette without a restart. Painting is per surface
|
|
@@ -307,23 +312,24 @@ case your pick stays. The nearest pinned ancestor wins, so a project can pin
|
|
|
307
312
|
one palette and a subfolder another. Open tabs pick up a changed pins file on
|
|
308
313
|
their next `cd`; `unpin` drops the pin on the current directory.
|
|
309
314
|
|
|
310
|
-
`preview`, `next`, `pin`, `unpin`, `config` and `help` match exactly; every other first argument is read
|
|
315
|
+
`preview`, `next`, `default`, `pin`, `unpin`, `config` and `help` match exactly; every other first argument is read
|
|
311
316
|
as a palette name, where a unique prefix is enough. Mistyped names get a "did
|
|
312
317
|
you mean" suggestion instead of a wall of output. Piped output drops color and
|
|
313
318
|
turns tab-separated, and `NO_COLOR` is respected.
|
|
314
319
|
|
|
315
|
-
|
|
320
|
+
With `TTHEME_TAB_PALETTE=seq`, new tabs take the next palette in group order, with the counter shared across
|
|
316
321
|
tabs — so opening four tabs walks you through four different characters rather
|
|
317
322
|
than rolling the same one twice.
|
|
318
323
|
|
|
319
324
|
Settings live in `~/.config/ttheme/config.zsh` — `init` seeds it with the
|
|
320
|
-
defaults and never overwrites a line you changed
|
|
325
|
+
defaults and never overwrites a line you changed — bar `TTHEME_TAB_PALETTE`, which its
|
|
326
|
+
default/rotate/keep question sets — `ttheme config` opens it in `$EDITOR` and alt-c in `preview` edits it in place. Each line is a plain zsh
|
|
321
327
|
`: ${VAR:=value}` assignment, so a variable exported before the layer loads
|
|
322
328
|
still wins:
|
|
323
329
|
|
|
324
330
|
| Setting | Default | |
|
|
325
331
|
|---|---|---|
|
|
326
|
-
| `TTHEME_TAB_PALETTE` | `
|
|
332
|
+
| `TTHEME_TAB_PALETTE` | `off` | `off` keeps new tabs on the terminal's configured theme (`preview` → default changes it); `seq` gives every new tab the next palette. `init` writes `seq` for rotate and `off` for default and keep |
|
|
327
333
|
| `TTHEME_ANNOUNCE` | `1` | `0` silences the one-line notice under "Last login:" |
|
|
328
334
|
| `TTHEME_FX` | `typewriter` | search hint animation — `typewriter`, `decode` or `glitch` |
|
|
329
335
|
| `TTHEME_SORT` | `abc` | `series` lists series and palettes in the order they were added instead of by name — in `ttheme`, `preview` and, once exported, the `init` picker |
|