Repository navigation
Restyle the active tab independently of accent (tab_active_bg / tab_active_fg) #2215
Replies: 3 comments
|
Yes, Strong +1 |
|
Another concrete case of this coupling, from Omarchy's shipped herdr config (herdr 0.9.1, Omarchy wanted the tab bar to show the terminal background (so it goes translucent with the rest of the window) while keeping dark text on the accent-filled active tab, like tmux's [theme.custom]
panel_bg = "reset"
surface_dim = "black"Because Today there's no config that gives a reset tab bar, dark active tab text and visible dividers at once. A |
|
+1. Same coupling from the other side: with |
Uh oh!
There was an error while loading. Please reload this page.
Right now the active tab style is fixed to
fg(panel_contrast_fg)onbg(accent)(src/ui/tabs.rs). The foreground comes frompanel_bg(orsurface_dimwhenpanel_bg = "reset"), and both of those tokens also drive panel backgrounds, selected-row highlights, and separators. That coupling makes a very common tab style impossible to express in config: a dark tab that matches the inactive tabs, with a light or colored label (for example Tokyo Night with yellow text instead of a filled accent pill).Concretely, on stock tokyo-night the only ways to get light text on the active tab also turn separators bright yellow or make the selected sidebar rows unreadable, because
surface_dimis shared between tab text, row highlight backgrounds, and pane borders.Proposal: two optional
[theme.custom]tokens that only affect the active tab:When unset, rendering is unchanged, so every existing config and theme keeps its current look.
I have a working implementation on a branch (4 files, ~55 lines: two
Option<String>fields inCustomThemeColors, twoOption<Color>palette fields withNonedefaults in all 18 theme constructors, override plumbing inwith_overrides, a two-line change in the tab renderer, plusdocs/nextconfig-reference entries): https://github.com/threatseeker/herdr/tree/feat/tab-active-color-tokensHappy to open the PR if this fits the direction.
All reactions