dotfiles/private_dot_config/private_fish/functions
Anton Volnuhin addce489b4 kitty: remember the light/dark mode across restarts
kitty gives *-theme.auto.conf priority over everything -- includes and
even --override -- and has no option to stop following the OS. So the
only way to start in a chosen mode is to control what those files
contain. Make them generated:

  themes/{light,dark,no-preference}.conf  canonical, the real themes
  theme-mode                              auto | light | dark
  apply-theme-mode.sh                      writes the three .auto.conf

Under `auto` each appearance keeps its own theme, so kitty follows the
OS as before. Pinned, all three get the pinned theme, so kitty starts in
it whatever the OS says and a config reload no longer resets it.

`theme` now records the mode and reloads instead of calling set-colors,
which is why the setting survives restarts. A bare `theme` records
`auto` rather than pinning when the toggle lands on the macOS
appearance, so nothing is pinned unless it actually differs.

The kitten shim hashes the automatic theme files before running `kitten
themes` and copies whichever changed into themes/, so picking a new
light theme while pinned to dark is kept and applied on the next switch.
Covered by tests/test_theme_mode.sh.

conf.d/kitty_theme.fish is gone: theme-mode is now the source of truth,
so the universal-variable tracker it maintained is redundant.
2026-08-06 01:49:45 +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
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: remember the light/dark mode across restarts 2026-08-06 01:49:45 +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