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