dotfiles/private_dot_config/private_fish/functions
Anton Volnuhin 9e2667f8fe kitty: capture theme choices however the kitten was launched
Saving a theme stopped sticking: the choice was captured only by the fish
`kitten` wrapper, so `kitty +kitten themes`, a keybinding or any non-fish
shell wrote <appearance>-theme.auto.conf directly and the next regeneration
overwrote it from theme-modes. The dark slot had already lost a pick that
way -- dark-theme.auto.conf held #0d0f31 while canonical dark said #2b2c2e.

Move the capture into apply-theme-mode.sh, which every path runs. It records
a cksum of each generated file after the repair step; on the next run a file
whose checksum differs was written by something else, so it becomes canonical
for that appearance. With no state recorded yet nothing is adopted, so a
first run cannot mistake a pinned mode's duplicated files for real choices.

The fish wrapper keeps only its useful part: re-apply the mode and reload so
the change shows at once.

theme-modes/dark.conf is the recovered #0d0f31 (1984). Covered by a new case
in tests/test_theme_mode.sh that writes the theme file with no shell involved.
2026-08-06 04:42:59 +03:00
..
__kitty_config_dir.fish kitty: remember the light/dark mode across restarts 2026-08-06 01:49:45 +03:00
__kitty_host_color.fish kitty: color terminal tabs by ssh/mosh host 2026-05-19 23:08:32 +03:00
__kitty_macos_appearance.fish kitty: remember the light/dark mode across restarts 2026-08-06 01:49:45 +03:00
__kitty_ssh_host.fish kitty: color terminal tabs by ssh/mosh host 2026-05-19 23:08:32 +03:00
__kitty_tab_reset.fish kitty: color terminal tabs by ssh/mosh host 2026-05-19 23:08:32 +03:00
__kitty_tab_set.fish kitty: give active ssh tabs the same foreground as every other tab 2026-08-06 01:35:25 +03:00
__kitty_theme_current.fish kitty: remember the light/dark mode across restarts 2026-08-06 01:49:45 +03:00
__kitty_theme_mode_setting.fish kitty: remember the light/dark mode across restarts 2026-08-06 01:49:45 +03:00
n.fish lazygit, dust, nnn, mc, nethogs, ngrep, mtr, tmux, jq 2023-06-01 10:42:00 +03:00
ping4.fish ping: check IPv6 is actually usable, and split ping4 per platform 2026-08-06 03:38:12 +03:00
private___tide_apply_terminal_appearance.fish fish, kitty: follow terminal light theme 2026-07-27 20:20:38 +03:00
private___tide_terminal_light_color.fish fish, kitty: follow terminal light theme 2026-07-27 20:20:38 +03:00
private_kitten.fish kitty: capture theme choices however the kitten was launched 2026-08-06 04:42:59 +03:00
ssh.fish kitty: color terminal tabs by ssh/mosh host 2026-05-19 23:08:32 +03:00
theme.fish kitty: remember the light/dark mode across restarts 2026-08-06 01:49:45 +03:00
tide-reset.fish new tide config, cmd+N for kitty, slightly bigger font in kitty 2026-04-05 19:36:34 +03:00