@kecan0406/ttheme 1.0.1 → 1.0.2
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 -12
- package/bin/ttheme.js +58 -58
- package/dist/manifest.json +1970 -122
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,9 +75,12 @@ left alone. iTerm2 has no config file to edit, so it gets one profile per
|
|
|
75
75
|
installed palette instead — `ttheme · miku` and so on, in
|
|
76
76
|
`~/Library/Application Support/iTerm2/DynamicProfiles/ttheme.json`, which
|
|
77
77
|
iTerm2 reloads by itself whenever `ttheme browse` adds or drops one. One more,
|
|
78
|
-
`ttheme · default`, always wears your default palette (none under `keep`)
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
`ttheme · default`, always wears your default palette (none under `keep`), and
|
|
79
|
+
init makes it iTerm2's default profile, so new tabs and windows open wearing the
|
|
80
|
+
palette and its picture from their first frame and follow `ttheme default` from
|
|
81
|
+
then on. iTerm2 reads its default profile only when it starts, so quit and
|
|
82
|
+
reopen it once after init. The profile it replaces stays the parent of every
|
|
83
|
+
ttheme profile, so your font and keys carry over, and `keep` gives it back. It ends with a receipt, paints the first palette onto the tab you
|
|
81
84
|
ran it in (not under `keep`) and lists what to do next (`exec zsh` for the
|
|
82
85
|
`ttheme` command here, a terminal restart for new tabs).
|
|
83
86
|
Running it again updates in place; `--yes` skips every prompt and installs no
|
|
@@ -203,7 +206,8 @@ iTerm2 asks at the top of the tab whether a control sequence may change the
|
|
|
203
206
|
profile: Always Allow lets every later switch through — put the palette on once
|
|
204
207
|
more for the one that asked — and a tab it refuses still wears the palette's
|
|
205
208
|
colors, only without the picture. iTerm2 has no
|
|
206
|
-
position setting, so a picture that
|
|
209
|
+
position setting, so a tuned picture that is not centered is baked onto a canvas
|
|
210
|
+
the size of the window, as the sizes above 100% are.
|
|
207
211
|
|
|
208
212
|
A palette with no background yet can find one: on it in `preview`, tab opens
|
|
209
213
|
**find**, which searches a booru for the palette's character tag
|
|
@@ -280,8 +284,10 @@ When a site asks ttheme to slow down, find waits as long as it names, up to a
|
|
|
280
284
|
minute, with a countdown at the bottom. ttheme keeps no
|
|
281
285
|
list of images — the tag is all it knows about a character.
|
|
282
286
|
|
|
283
|
-
An install writes `<palette>.png` (the tinted figure),
|
|
284
|
-
(the window-shaped crop)
|
|
287
|
+
An install writes `<palette>.<hash>.png` (the tinted figure),
|
|
288
|
+
`<palette>.<hash>@fill-<focus>.png` (the window-shaped crop) — the hash is of
|
|
289
|
+
their content, because Ghostty and iTerm2 reload a background only when its path
|
|
290
|
+
changes, so no two pictures may share a name — `<palette>.conf` and the untouched original under
|
|
285
291
|
`backgrounds/originals/`, and starts it untuned — the picture it replaces moves
|
|
286
292
|
to the shelf with the tuning it had. The
|
|
287
293
|
conf opens with where the picture came from —
|
|
@@ -300,7 +306,7 @@ steps at a time). Size walks 1% at a time, shown large in the middle of the
|
|
|
300
306
|
screen as it changes: 100% is the whole image fitted into the window
|
|
301
307
|
(`contain`), below that it shrinks to 20%, above it the image grows around the
|
|
302
308
|
face until it covers the window, and the top step is **fill** (`cover`). Fill
|
|
303
|
-
uses `<palette>@fill-<focus>.png` when it sits beside the image — a crop made
|
|
309
|
+
uses `<palette>.<hash>@fill-<focus>.png` when it sits beside the image — a crop made
|
|
304
310
|
to fill the window, whose name carries the height of the face in percent, which
|
|
305
311
|
the sizes above 100% zoom around — and the image itself otherwise. Position
|
|
306
312
|
steps through the nine `background-image-position` anchors, or `1`–`9` jump to
|
|
@@ -320,13 +326,16 @@ picture before `,` or `.` moves off it.
|
|
|
320
326
|
The palette's `.conf` holds those defaults; the preview only appends two
|
|
321
327
|
optional includes to it and keeps everything else in `<palette>.tune.conf` (the
|
|
322
328
|
tuning) and `<palette>.off.conf` (the off switch), which Ghostty loads after
|
|
323
|
-
the conf. Kept changes are written when the preview closes, by whichever key,
|
|
324
|
-
|
|
329
|
+
the conf. Kept changes are written when the preview closes, by whichever key,
|
|
330
|
+
and reach both terminals from whichever one ran the preview: Ghostty reloads
|
|
331
|
+
when it is showing that palette, and iTerm2's profiles are rewritten. Ghostty has no scale setting,
|
|
325
332
|
so every size but 100% and fill is baked into a copy beside the image and the
|
|
326
333
|
tuning points at it: below 100% onto a transparent canvas of the image's own
|
|
327
|
-
size (`kagami@60-bottom-right.png`, fitted with `contain`), above it onto
|
|
328
|
-
the window's size at the time (`kagami@130-center-2880x1800.png`,
|
|
329
|
-
`cover`).
|
|
334
|
+
size (`kagami.1a2b3c4d@60-bottom-right.png`, fitted with `contain`), above it onto
|
|
335
|
+
one of the window's size at the time (`kagami.1a2b3c4d@130-center-2880x1800.png`,
|
|
336
|
+
with `cover`). With iTerm2 wired, a size of 100% or less that is not centered
|
|
337
|
+
goes onto the window-sized canvas too, since iTerm2 cannot place an image.
|
|
338
|
+
Baking runs `sips`, so those sizes are offered on macOS only.
|
|
330
339
|
|
|
331
340
|
The preview draws inside the cell grid, and Ghostty's `window-padding` around
|
|
332
341
|
it keeps showing the configured background. While the cursor rests on the
|