`theme` switches kitty between the existing dark-theme.auto.conf and light-theme.auto.conf via `kitty @ set-colors --all --configured`, so it stays in sync with whatever `kitten themes --light/--dark` selects. Subcommands: light, dark, auto (hand control back to the OS appearance via load-config), status. Tide is resynced by calling __tide_apply_terminal_appearance directly, so the prompt recolors even if kitty sends no palette-change notification for a dynamic color change. conf.d/kitty_theme.fish tracks $fish_terminal_color_theme into $kitty_theme_mode so the toggle still reads the real state after kitty follows an OS appearance change. light-theme.auto.conf had no tab colors, which left the dark tab bar on a light background after switching; add a matching tab style block.
17 lines
616 B
Fish
17 lines
616 B
Fish
status is-interactive
|
|
or exit
|
|
|
|
# Keep $kitty_theme_mode tracking what the terminal actually reports, so that
|
|
# `theme` toggles from the real state even after kitty follows an OS appearance
|
|
# change on its own. fish populates $fish_terminal_color_theme at the first
|
|
# prompt and again whenever the terminal signals a palette change.
|
|
function __kitty_theme_track --on-variable fish_terminal_color_theme
|
|
contains -- "$fish_terminal_color_theme" light dark
|
|
or return
|
|
|
|
test "$kitty_theme_mode" = "$fish_terminal_color_theme"
|
|
and return
|
|
|
|
set --universal kitty_theme_mode $fish_terminal_color_theme
|
|
end
|