@kecan0406/ttheme 1.0.34 → 1.0.35

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 CHANGED
@@ -28,8 +28,6 @@ get it.
28
28
  | **Setup with `init`** | ![Done][done] | ![Done][done] | ![Done][done] | ![Done][done] | ![Done][done] | ![Done][done] | ![Done][done] | ![No][no] | ![No][no] |
29
29
  | **Palette files** | ![Done][done] | ![Done][done] | ![Done][done] | ![Done][done] | ![Done][done] | ![Done][done] | ![Done][done] | ![No][no] | ![No][no] |
30
30
  | **Runtime repaint** | ![Done][done] | ![Done][done] | ![Done][done] | ![Done][done] | ![Done][done] | ![Done][done] | ![No][no] | ![Done][done] | ![Partial][partial] |
31
- | **Font** | ![Done][done] | ![No][no] | ![Done][done] | ![Done][done] | ![Done][done] | ![No][no] | ![No][no] | ![No][no] | ![No][no] |
32
- | **Shader** | ![Done][done] | ![No][no] | ![No][no] | ![No][no] | ![No][no] | ![No][no] | ![No][no] | ![No][no] | ![No][no] |
33
31
  | **Background pictures** | ![Done][done] | ![Done][done] | ![Done][done] | ![No][no] | ![Partial][partial] | ![No][no] | ![No][no] | ![No][no] | ![No][no] |
34
32
 
35
33
  - **Setup with `init`** — iTerm2 is offered on macOS only, Windows Terminal
@@ -51,9 +49,8 @@ get it.
51
49
  sets, so the shell layer stays off there and `ttheme use <palette>` points you at
52
50
  `ttheme default <palette>`, which puts the palette on every Warp window; any other terminal that speaks OSC 4/10/11 (foot, Konsole,
53
51
  VTE-based terminals…) gets repainting and nothing else.
54
- - **Font** — family and size everywhere it is marked; Ghostty also maps
55
- codepoints to fonts. iTerm2 keeps the font of your own profile, Windows
56
- Terminal and Warp the one you set in them.
52
+ - **Colors only** — ttheme sets no font, font size or shader anywhere; those
53
+ stay what you configured in your terminal.
57
54
  - **Background pictures** — `find`, `ttheme image` and `preview`'s live
58
55
  backdrop. Ghostty shows one picture app-wide, following the focused tab;
59
56
  iTerm2 (3.7 or newer) shows one per tab and kitty one per window (a split
@@ -119,7 +116,14 @@ alone and only installs. Then it shows what it is about to change and writes it
119
116
  so cancelling before that touches nothing. It places the zsh layer under
120
117
  `~/.config/ttheme` and edits your terminal config and `~/.zshrc` between
121
118
  `# ttheme begin` / `# ttheme end` markers — everything outside the markers is
122
- left alone. iTerm2 has no config file to edit, so it gets one profile per
119
+ left alone, and what goes in is colors only. Before its first edit of a file it
120
+ keeps a copy beside it, `<file>.ttheme.bak`, and it writes through symlinks, so a
121
+ dotfiles repo keeps its links. A key you set yourself stays yours: a Ghostty
122
+ `command` or `shell-integration`, kitty's `window_logo_scale` and
123
+ `window_logo_alpha`. Every file it adds to a terminal's own folders is named
124
+ `ttheme-<palette>`, so a theme of yours is never overwritten. Alacritty lets its
125
+ own config win over an import, so colors set in `alacritty.toml` hide the
126
+ default palette — init says so when it finds them. iTerm2 has no config file to edit, so it gets one profile per
123
127
  installed palette instead — `ttheme · miku` and so on, in
124
128
  `~/Library/Application Support/iTerm2/DynamicProfiles/ttheme.json`, which
125
129
  iTerm2 reloads by itself whenever `ttheme browse` adds or drops one. One more,
@@ -143,8 +147,20 @@ It ends with a receipt, paints the first palette onto the tab you
143
147
  ran it in (not under `keep`) and lists what to do next (`exec zsh` for the
144
148
  `ttheme` command here, a terminal restart for new tabs).
145
149
  Running it again updates in place; `--yes` (`-y`) skips every prompt and installs no
146
- palettes — `ttheme browse` opens the full catalog any time, to add or drop
147
- single palettes.
150
+ palettes, and init refuses to run without a terminal unless it is given —
151
+ `ttheme browse` opens the full catalog any time, to add or drop single palettes.
152
+
153
+ ```sh
154
+ npx @kecan0406/ttheme@latest uninstall
155
+ ```
156
+
157
+ takes it all back out, after listing what it will do: every ttheme block
158
+ leaves its config, Warp gets its theme back and iTerm2 its own default profile,
159
+ and the `ttheme-*` theme files, `~/.config/ttheme` (installed pictures
160
+ included), the cache and the iTerm2 and Windows Terminal files are deleted. A
161
+ config you did not touch since ttheme first edited it comes back byte for byte
162
+ and its backup goes; one you edited since keeps `<file>.ttheme.bak`. Open shells
163
+ drop the layer at their next prompt.
148
164
 
149
165
  **Any of them by hand** — one archive per terminal in the
150
166
  [latest release](https://github.com/kecan0406/ttheme/releases/latest):
@@ -154,19 +170,19 @@ REL=https://github.com/kecan0406/ttheme/releases/latest/download
154
170
 
155
171
  # kitty
156
172
  curl -L $REL/ttheme-kitty.tar.gz | tar xz
157
- cp kitty/themes/miku.conf ~/.config/kitty/themes/
158
- # kitty.conf: include themes/miku.conf
173
+ cp kitty/themes/ttheme-miku.conf ~/.config/kitty/themes/
174
+ # kitty.conf: include themes/ttheme-miku.conf
159
175
 
160
176
  # alacritty
161
177
  curl -L $REL/ttheme-alacritty.tar.gz | tar xz
162
- cp alacritty/themes/miku.toml ~/.config/alacritty/themes/
178
+ cp alacritty/themes/ttheme-miku.toml ~/.config/alacritty/themes/
163
179
  # alacritty.toml: [general]
164
- # import = ["~/.config/alacritty/themes/miku.toml"]
180
+ # import = ["~/.config/alacritty/themes/ttheme-miku.toml"]
165
181
 
166
182
  # wezterm
167
183
  curl -L $REL/ttheme-wezterm.tar.gz | tar xz
168
- cp wezterm/colors/miku.toml ~/.config/wezterm/colors/
169
- # wezterm.lua: config.color_scheme = "miku"
184
+ cp wezterm/colors/ttheme-miku.toml ~/.config/wezterm/colors/
185
+ # wezterm.lua: config.color_scheme = "ttheme-miku"
170
186
 
171
187
  # iTerm2 — open a .itermcolors to add it to Settings > Profiles > Colors presets
172
188
  curl -L $REL/ttheme-iterm2.tar.gz | tar xz
@@ -181,11 +197,8 @@ curl -L $REL/ttheme-warp.tar.gz | tar xz
181
197
  cp warp/themes/ttheme-miku.yaml ~/.warp/themes/
182
198
  ```
183
199
 
184
- The kitty, Alacritty and WezTerm archives also carry a `config/` file per theme
185
- with that theme's font — separate so you can take the colors without the rest. Ghostty is laid out
186
- differently: the dock-icon colors travel inside each theme file (they derive
187
- from the palette), and the font + shader — identical across themes — ship as
188
- one shared `ttheme.conf` you include once with `config-file`.
200
+ Each Ghostty theme file also carries the dock-icon colors, derived from the
201
+ palette.
189
202
 
190
203
  Building from a checkout works too: `mise install && bun install && mise run
191
204
  build` writes the same tree to `dist/`, `mise run sandbox` tries it in a
@@ -545,10 +558,6 @@ catalog is cached in `~/.config/ttheme/catalog.json`.
545
558
 
546
559
  ## Terminal notes
547
560
 
548
- Ghostty is the only terminal here with GLSL shaders, and the only one with
549
- per-codepoint font mapping — which is why the Hangul→D2Coding rule survives only
550
- in its build.
551
-
552
561
  WezTerm keeps an OSC-set palette per pane, but a picture belongs to the window:
553
562
  the Lua module ttheme runs follows the active pane's `ttheme_shown` user var,
554
563
  which the shell layer sets whenever the tab's palette changes, and reads the
@@ -604,8 +613,7 @@ ansi = [ ... 16 colors ... ]
604
613
  ```
605
614
 
606
615
  The series title and its `native` reading live once in `themes/_groups.toml`,
607
- never in a theme file. `[font]` and `[ghostty]` are inherited from
608
- `themes/_defaults.toml` unless the theme overrides them. Then:
616
+ never in a theme file. Then:
609
617
 
610
618
  ```sh
611
619
  mise run build # regenerates dist/ for every terminal — fails on bad contrast
@@ -645,9 +653,7 @@ and `magi` from [lotap/magi-theme](https://github.com/lotap/magi-theme) (MIT).
645
653
  Every palette records its input in `meta.ansi_source`, and only that input's
646
654
  hues survive: the harmonizer normalizes lightness and saturation away and
647
655
  rotates each non-signature hue toward the palette's own seed, so no scheme is
648
- reproduced here. Shaders come from
649
- [sahaj-b/ghostty-cursor-shaders](https://github.com/sahaj-b/ghostty-cursor-shaders)
650
- (MIT), see `ghostty/shaders/`.
656
+ reproduced here.
651
657
 
652
658
  Palettes are inspired by characters from the listed works; this project is
653
659
  unaffiliated with and unendorsed by their rights holders. No character art,