@kecan0406/ttheme 1.2.6 → 1.2.8
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 +17 -7
- package/bin/ttheme.js +225 -207
- package/bin/ttheme.js.map +1 -1
- package/dist/manifest.json +1 -1
- package/package.json +2 -2
- package/shell/adapters/_bg.zsh +21 -9
- package/shell/adapters/_osc.zsh +16 -7
- package/shell/adapters/editor.zsh +5 -0
- package/shell/adapters/iterm2.zsh +2 -0
- package/shell/adapters/konsole.zsh +2 -0
- package/shell/adapters/terminal-app.zsh +4 -8
- package/shell/adapters/warp.zsh +2 -0
- package/shell/ttheme.zsh +863 -204
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ is about to change, and writes nothing until you confirm. Then:
|
|
|
45
45
|
|
|
46
46
|
```sh
|
|
47
47
|
exec zsh # the ttheme command in this tab
|
|
48
|
-
ttheme preview
|
|
48
|
+
ttheme # preview and browse as tabs — tab switches
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
<details>
|
|
@@ -105,7 +105,7 @@ the folders under its `palettes/` as catalogs:
|
|
|
105
105
|
```sh
|
|
106
106
|
ttheme add dusk --market alice/ttheme-pastel # add alice's market and install from it
|
|
107
107
|
ttheme market add alice/ttheme-pastel#v1 # or add it alone, pinned to a tag
|
|
108
|
-
ttheme browse #
|
|
108
|
+
ttheme browse # shift+→ to Markets: add, remove, auto-update
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
`ttheme browse` handles markets the way it handles palettes: its Markets tab
|
|
@@ -152,13 +152,14 @@ from the booru the way `find` does.
|
|
|
152
152
|
|
|
153
153
|
| Command | |
|
|
154
154
|
|---|---|
|
|
155
|
+
| `ttheme` | Preview and browse as tabs of one screen — `tab` and `shift+tab` switch |
|
|
155
156
|
| `ttheme preview` | Browse live — the tab repaints as the cursor moves, enter applies it to this tab or makes it the default |
|
|
156
157
|
| `ttheme use <palette>` | Paint this tab (a unique prefix works) |
|
|
157
158
|
| `ttheme next` | Advance this tab to the next palette |
|
|
158
159
|
| `ttheme default <palette>` | The palette new tabs open with |
|
|
159
|
-
| `ttheme pin` / `unpin` | A palette for this directory, everything below it
|
|
160
|
-
| `ttheme pins` | Map every pinned directory as a tree, in each palette's colors, with where you are marked |
|
|
161
|
-
| `ttheme browse` | Pick palettes and markets —
|
|
160
|
+
| `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 |
|
|
161
|
+
| `ttheme pins` | Map every pinned directory as a tree, in each palette's colors, with where you are marked, and every pinned ssh host |
|
|
162
|
+
| `ttheme browse` | Pick palettes and markets — `shift+←/→` moves between Catalog, Installed, Markets and Errors |
|
|
162
163
|
| `ttheme market add <owner/repo>` | Add someone's market (`#v1` pins it) — `ttheme market` lists yours; `search`, `remove` too |
|
|
163
164
|
| `ttheme new <name>` | Make a palette of your own in the palette editor (`--from <palette>` starts from its colors); `edit`, `check`, `share` follow |
|
|
164
165
|
| `ttheme on` / `off` | Wear the default again / give the terminal its own colors back |
|
|
@@ -180,11 +181,14 @@ Nothing is emulated — a terminal that cannot express something does not get it
|
|
|
180
181
|
Any other terminal that speaks OSC 4/10/11 gets runtime repainting. A default
|
|
181
182
|
set, a palette added or a picture tuned in one terminal reaches every other one
|
|
182
183
|
you wired. Why each cell is what it is: [docs/terminals.md](docs/terminals.md).
|
|
184
|
+
An editor such as Neovim keeps its own colorscheme inside its window — how the
|
|
185
|
+
two share the screen, and how to let Neovim wear the palette instead:
|
|
186
|
+
[docs/terminals.md#editors](docs/terminals.md#editors).
|
|
183
187
|
|
|
184
188
|
## Background pictures
|
|
185
189
|
|
|
186
190
|
A palette can wear a picture behind the text. ttheme ships none: `ttheme
|
|
187
|
-
preview` →
|
|
191
|
+
preview` → enter, then `f` in the picture panel searches danbooru, konachan, yande.re and zerochan for the character live
|
|
188
192
|
(safe-rated by default), or takes a picture you paste or drop, cuts the
|
|
189
193
|
character out on macOS, tints it to the palette — or keeps its own colors — and
|
|
190
194
|
installs it on your machine only. Ghostty shows the focused tab's picture, iTerm2 one per tab, kitty one per
|
|
@@ -210,6 +214,12 @@ hues survive: the harmonizer normalizes lightness and saturation away and
|
|
|
210
214
|
rotates each non-signature hue toward the palette's own seed, so no scheme is
|
|
211
215
|
reproduced here.
|
|
212
216
|
|
|
217
|
+
JPEG pictures are decoded by [mozjpeg](https://github.com/mozilla/mozjpeg),
|
|
218
|
+
compiled to WebAssembly and packaged as
|
|
219
|
+
[@jsquash/jpeg](https://github.com/jamsinclair/jSquash) (Apache-2.0), which the
|
|
220
|
+
npm package carries inside `bin/ttheme.js`. This software is based in part on
|
|
221
|
+
the work of the Independent JPEG Group.
|
|
222
|
+
|
|
213
223
|
Palettes are inspired by characters from the listed works; this project is
|
|
214
224
|
unaffiliated with and unendorsed by their rights holders. No character art,
|
|
215
225
|
audio or trademarked asset is redistributed here — only color values.
|
|
@@ -221,7 +231,7 @@ Every background picture belongs to the artist who drew it. ttheme never passes
|
|
|
221
231
|
one on: a palette or a share code names a booru post by its number, and each
|
|
222
232
|
machine fetches it from that booru itself. `find` names who drew each post and
|
|
223
233
|
links the post and the artwork's own page, an installed picture keeps its
|
|
224
|
-
artist and source, and
|
|
234
|
+
artist and source, and preview's image edit names the artist over the picture. The
|
|
225
235
|
pictures are for your own terminal — when you show one off, credit the artist
|
|
226
236
|
and link the artwork's page, not the booru's copy.
|
|
227
237
|
|