diff --git a/private_dot_config/kitty/private_tests/private_test_tab_bar_colors.py b/private_dot_config/kitty/private_tests/private_test_tab_bar_colors.py index 8ecddac..ae91e78 100644 --- a/private_dot_config/kitty/private_tests/private_test_tab_bar_colors.py +++ b/private_dot_config/kitty/private_tests/private_test_tab_bar_colors.py @@ -99,6 +99,13 @@ for theme_bg in (0xF8F8F8, 0x1C2836): (as_rgb(HOST_FG), as_rgb(HOST_BG)), "active tab takes the host color", ), + ( + # What __kitty_tab_set actually sends: host background, no fg + # override, so the shared active foreground applies. + TabBarData("tab", is_active=True, active_bg=HOST_BG), + (as_rgb(theme_bg), as_rgb(HOST_BG)), + "active tab without an fg override keeps the shared foreground", + ), ( TabBarData("tab", is_active=False, inactive_fg=HOST_BG), (as_rgb(HOST_BG), as_rgb(theme_bg)), diff --git a/private_dot_config/private_fish/functions/__kitty_tab_set.fish b/private_dot_config/private_fish/functions/__kitty_tab_set.fish index 9fdbe62..08083c9 100644 --- a/private_dot_config/private_fish/functions/__kitty_tab_set.fish +++ b/private_dot_config/private_fish/functions/__kitty_tab_set.fish @@ -15,11 +15,11 @@ function __kitty_tab_set -d "Tint the current kitty tab for the given ssh/mosh h end end set -l bg (string split ' ' $colors)[1] - set -l fg (string split ' ' $colors)[2] - # Active tab: full host-color background, readable fg. + # Active tab: full host-color background, and NONE for the foreground so it + # falls back to the same one every other active tab uses. # Inactive tab: keep theme's dark background (NONE), host color as text only. - kitten @ set-tab-color "active_bg=$bg" "active_fg=$fg" \ + kitten @ set-tab-color "active_bg=$bg" active_fg=NONE \ "inactive_bg=NONE" "inactive_fg=$bg" 2>/dev/null kitten @ set-tab-title "$host" 2>/dev/null end