@kecan0406/ttheme 1.0.0 → 1.0.1
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 -8
- package/bin/ttheme.js +98 -97
- package/dist/manifest.json +1 -1
- package/package.json +1 -1
- package/shell/adapters/_bg.zsh +521 -0
- package/shell/adapters/_osc.zsh +2 -0
- package/shell/adapters/ghostty.zsh +8 -515
- package/shell/adapters/iterm2.zsh +67 -0
- package/shell/ttheme.zsh +62 -16
package/README.md
CHANGED
|
@@ -74,9 +74,10 @@ so cancelling before that touches nothing. It places the zsh layer under
|
|
|
74
74
|
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
|
-
iTerm2 reloads by itself whenever `ttheme browse` adds or drops one.
|
|
78
|
-
|
|
79
|
-
|
|
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`): Set
|
|
79
|
+
as Default on it once under Settings › Profiles and new tabs follow `ttheme
|
|
80
|
+
default` from then on. It ends with a receipt, paints the first palette onto the tab you
|
|
80
81
|
ran it in (not under `keep`) and lists what to do next (`exec zsh` for the
|
|
81
82
|
`ttheme` command here, a terminal restart for new tabs).
|
|
82
83
|
Running it again updates in place; `--yes` skips every prompt and installs no
|
|
@@ -160,11 +161,12 @@ the cursor. The list and the sample widen with the window (the sample up to 64
|
|
|
160
161
|
columns) and the gap between them takes the rest; the tuning panel takes the
|
|
161
162
|
sample's place while open, and so does the key list once the sample is 48
|
|
162
163
|
columns wide.
|
|
163
|
-
Under Ghostty with `TTHEME_TAB_PALETTE=off` (the default), enter asks **this tab** or
|
|
164
|
+
Under Ghostty or iTerm2 with `TTHEME_TAB_PALETTE=off` (the default), enter asks **this tab** or
|
|
164
165
|
**default**: default records the palette as your default palette (so a later
|
|
165
166
|
`add` or `remove` keeps it), rewrites `theme =` in the `# ttheme begin` block of
|
|
166
|
-
your Ghostty config and sends `SIGUSR2` to the Ghostty that owns the tab,
|
|
167
|
-
|
|
167
|
+
your Ghostty config and sends `SIGUSR2` to the Ghostty that owns the tab, and
|
|
168
|
+
rewrites iTerm2's `ttheme · default` profile, which iTerm2 reloads by itself — so new tabs, and open tabs you have not
|
|
169
|
+
painted by hand, take the palette without a restart. Painting is per surface
|
|
168
170
|
otherwise: a new tab starts from the configured theme, not from what the last
|
|
169
171
|
tab was painted.
|
|
170
172
|
|
|
@@ -192,6 +194,17 @@ none. A tab busy with a command catches up at its next prompt, focus reporting
|
|
|
192
194
|
is off while that command runs, and a tab whose colors are not a ttheme palette
|
|
193
195
|
leaves the picture where it is.
|
|
194
196
|
|
|
197
|
+
iTerm2 keeps a picture per tab. There the picture lives in the palette's own
|
|
198
|
+
profile — `ttheme · kagami` carries the file, its opacity as Blend and cover or
|
|
199
|
+
contain as the image mode, rewritten whenever the picture or its tuning
|
|
200
|
+
changes — and putting a palette with a picture on, or taking one off, moves the
|
|
201
|
+
tab to that palette's profile with `OSC 1337 SetProfile`. The first time,
|
|
202
|
+
iTerm2 asks at the top of the tab whether a control sequence may change the
|
|
203
|
+
profile: Always Allow lets every later switch through — put the palette on once
|
|
204
|
+
more for the one that asked — and a tab it refuses still wears the palette's
|
|
205
|
+
colors, only without the picture. iTerm2 has no
|
|
206
|
+
position setting, so a picture that does not fill the window sits centered.
|
|
207
|
+
|
|
195
208
|
A palette with no background yet can find one: on it in `preview`, tab opens
|
|
196
209
|
**find**, which searches a booru for the palette's character tag
|
|
197
210
|
(`meta.booru`) and lays the results out as a grid of thumbnails. It starts on
|
|
@@ -276,8 +289,8 @@ conf opens with where the picture came from —
|
|
|
276
289
|
panel shows it next to the palette's name.
|
|
277
290
|
|
|
278
291
|
`preview` shows the background of the palette under the cursor while you
|
|
279
|
-
browse: through the kitty graphics protocol
|
|
280
|
-
`background-image` where Ghostty would place it, faded by
|
|
292
|
+
browse: through the kitty graphics protocol (Ghostty, and iTerm2 3.7 or newer)
|
|
293
|
+
it draws that palette's `background-image` where Ghostty would place it, faded by
|
|
281
294
|
`background-image-opacity`, behind the list — or just its plain background when
|
|
282
295
|
it has no file. Only PNG images preview.
|
|
283
296
|
|