@kecan0406/ttheme 1.2.17 → 1.2.19
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 +27 -17
- package/bin/ttheme.js +233 -221
- package/bin/ttheme.js.map +1 -1
- package/dist/manifest.json +1 -1
- package/package.json +9 -7
- package/shell/adapters/_bg.zsh +7 -6
- package/shell/adapters/_osc.zsh +20 -4
- package/shell/adapters/ghostty.zsh +1 -1
- package/shell/adapters/iterm2.zsh +6 -3
- package/shell/adapters/kitty.zsh +1 -1
- package/shell/adapters/konsole.zsh +1 -1
- package/shell/adapters/terminal-app.zsh +1 -1
- package/shell/adapters/warp.zsh +1 -1
- package/shell/adapters/wezterm.zsh +1 -1
- package/shell/preview.zsh +261 -113
- package/shell/ttheme.zsh +114 -39
package/README.md
CHANGED
|
@@ -40,8 +40,10 @@
|
|
|
40
40
|
npx @kecan0406/ttheme@latest init
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
It
|
|
44
|
-
|
|
43
|
+
It needs Node 22 or newer and zsh, which macOS ships — bash and fish get the
|
|
44
|
+
`ttheme` command too, run through zsh. It asks which terminals to wire and which
|
|
45
|
+
series to install, shows every file it is about to change, and writes nothing
|
|
46
|
+
until you confirm. Then:
|
|
45
47
|
|
|
46
48
|
```sh
|
|
47
49
|
exec zsh # the ttheme command in this tab
|
|
@@ -51,13 +53,17 @@ ttheme # preview and browse as tabs — tab switches
|
|
|
51
53
|
<details>
|
|
52
54
|
<summary><b>What init changes</b></summary>
|
|
53
55
|
|
|
54
|
-
- Your terminal config and `~/.zshrc` get
|
|
55
|
-
`# ttheme end
|
|
56
|
-
|
|
56
|
+
- Your terminal config and `~/.zshrc` get one line between `# ttheme begin` /
|
|
57
|
+
`# ttheme end` that loads a file ttheme keeps under `~/.config/ttheme`, and
|
|
58
|
+
only while it is there — so changing the default palette never touches your
|
|
59
|
+
config again, and a config synced to a machine without ttheme still works.
|
|
60
|
+
Everything outside the block is left alone, and what ttheme sets is colors —
|
|
61
|
+
no font, font size or shader — plus, in Ghostty while new tabs rotate
|
|
62
|
+
palettes, the `command` that opens them on the next one.
|
|
57
63
|
- Each file is backed up once to `<file>.ttheme.bak` before the first edit, and
|
|
58
64
|
written through symlinks, so a dotfiles repo keeps its links.
|
|
59
|
-
- A
|
|
60
|
-
folders is named `ttheme-<palette>`.
|
|
65
|
+
- A `command` or `shell-integration` you set in Ghostty stays yours, and every
|
|
66
|
+
file ttheme adds to a terminal's folders is named `ttheme-<palette>`.
|
|
61
67
|
- `npx @kecan0406/ttheme@latest uninstall` lists and then reverses all of it.
|
|
62
68
|
|
|
63
69
|
Per-terminal details, manual install from the release archives and building from
|
|
@@ -105,16 +111,16 @@ the folders under its `palettes/` as catalogs:
|
|
|
105
111
|
```sh
|
|
106
112
|
ttheme add dusk --market alice/ttheme-pastel # add alice's market and install from it
|
|
107
113
|
ttheme market add alice/ttheme-pastel#v1 # or add it alone, pinned to a tag
|
|
108
|
-
ttheme # shift+tab to Browse
|
|
114
|
+
ttheme # shift+tab to Browse: markets are rows there — add, remove, auto-update
|
|
109
115
|
```
|
|
110
116
|
|
|
111
|
-
Browse handles markets the way it handles palettes:
|
|
117
|
+
Browse handles markets the way it handles palettes: in the same list it
|
|
112
118
|
adds one by repository or folder, finds the public ones on GitHub, marks one for
|
|
113
119
|
removal and switches its auto-update, and enter applies all of it with the
|
|
114
120
|
palettes you picked. The official catalog comes with ttheme and updates with it;
|
|
115
121
|
a repository asks when you add it whether its list updates on its own, and a
|
|
116
122
|
palette you installed from it keeps its colors until you take its update —
|
|
117
|
-
`ctrl+r` on a palette marked `↑` in Browse
|
|
123
|
+
`ctrl+r` on a palette marked `↑` in Browse. Nobody reviews a market. Its
|
|
118
124
|
palettes are colors and post numbers, never code, and the contrast gate's
|
|
119
125
|
numbers are shown for them but never enforced — only the official catalog is
|
|
120
126
|
held to the gate. `ttheme update` updates ttheme and refreshes every market now; `ttheme market
|
|
@@ -126,11 +132,15 @@ page](https://ttheme.vercel.app/market) lists the public ones.
|
|
|
126
132
|
|
|
127
133
|
`ttheme new rei` opens the palette editor on a blank palette: a few seeds grow
|
|
128
134
|
twenty colors that pass the contrast gate, then each one is tuned in OKLCH while
|
|
129
|
-
|
|
135
|
+
a mock terminal beside them shows the result. It makes `<you>@<market>/rei`, named after your
|
|
130
136
|
GitHub handle and a market name the first `new` asks for, in
|
|
131
137
|
`~/.config/ttheme/market/<market>`, and installs it; `--from rei` starts from
|
|
132
|
-
rei's colors instead. `ttheme edit rei` opens the same editor
|
|
133
|
-
|
|
138
|
+
rei's colors instead. `ttheme edit rei` opens the same editor — on any palette,
|
|
139
|
+
the official ones included: one that is not yours keeps your changes as a tone
|
|
140
|
+
over its own colors, and `R` then `s` in the editor puts them back. `ttheme check
|
|
141
|
+
--fix` writes colors that pass the gate (as a tone, for a palette that is not
|
|
142
|
+
yours). Left without a palette, `edit`, `check` and `share` ask to use the one
|
|
143
|
+
the tab wears; `share` into a pipe uses it without asking.
|
|
134
144
|
|
|
135
145
|
A local market is already a repository layout: `palettes/*.toml` (a folder
|
|
136
146
|
under it, such as `palettes/night/`, is a catalog) and the
|
|
@@ -157,11 +167,11 @@ without a market, fetching those posts from the booru the way `find` does.
|
|
|
157
167
|
|
|
158
168
|
| Command | |
|
|
159
169
|
|---|---|
|
|
160
|
-
| `ttheme` | Preview and Browse as tabs of one screen — `tab` and `shift+tab` switch. Preview tries palettes live: the tab repaints as the cursor moves, enter applies it to this tab or makes it the default. Browse picks palettes and markets: `shift+←/→`
|
|
170
|
+
| `ttheme` | Preview and Browse as tabs of one screen — `tab` and `shift+tab` switch. Preview tries palettes live: the tab repaints as the cursor moves, enter applies it to this tab or makes it the default. Browse picks palettes and markets in one list: a market's row takes `delete`, `shift+←/→` for its auto-update and `ctrl+r` |
|
|
161
171
|
| `ttheme use <palette>` | Paint this tab (a unique prefix works) |
|
|
162
172
|
| `ttheme default <palette>` | The palette new tabs open with |
|
|
163
173
|
| `ttheme pin` / `unpin` | A palette for this directory, everything below it, its repository or an ssh host (`ssh:<host>`) — a panel shows what each choice reaches; `cd` or `ssh` in repaints, leaving restores |
|
|
164
|
-
| `ttheme pins` | Map every
|
|
174
|
+
| `ttheme pins` | Map every pin as a file tree — the pinned directories in each palette's colors, with where you are marked, and every pinned ssh host |
|
|
165
175
|
| `ttheme market add <owner/repo>` | Add someone's market (`#v1` pins it) — `ttheme market` lists yours; `search`, `remove` too |
|
|
166
176
|
| `ttheme new <name>` | Make a palette of your own in the palette editor (`--from <palette>` starts from its colors); `edit`, `check`, `share` follow |
|
|
167
177
|
| `ttheme on` / `off` | Wear the default again / give the terminal its own colors back |
|
|
@@ -189,8 +199,8 @@ two share the screen, and how to let Neovim wear the palette instead:
|
|
|
189
199
|
|
|
190
200
|
## Background pictures
|
|
191
201
|
|
|
192
|
-
A palette can wear a picture behind the text. ttheme ships none: `ttheme
|
|
193
|
-
|
|
202
|
+
A palette can wear a picture behind the text. ttheme ships none: in `ttheme`,
|
|
203
|
+
`tab` on a palette opens its panel, and `f` there searches danbooru, konachan, yande.re and zerochan for the character live
|
|
194
204
|
(safe-rated by default), or takes a picture you paste or drop, cuts the
|
|
195
205
|
character out on macOS, tints it to the palette — or keeps its own colors — and
|
|
196
206
|
installs it on your machine only. Ghostty shows the focused tab's picture, iTerm2, Konsole and Terminal.app one per tab, kitty one per
|