pub struct TearTheme {
pub name: String,
pub fg: HexColor,
pub bg: HexColor,
pub active_fg: HexColor,
pub active_bg: HexColor,
pub inactive_fg: HexColor,
pub inactive_bg: HexColor,
pub border_active: HexColor,
pub border_inactive: HexColor,
pub message_fg: HexColor,
pub message_bg: HexColor,
}Expand description
Per-tear theme. Stores hex strings rather than typed Color values
so the serde wire format stays stable across renderer changes.
At runtime the in-process backend resolves these via
ishou-tokens semantics; the tmux backend writes them into the
rendered tmux.conf as colour#XXXXXX.
Fields§
§name: StringTheme name — typically one of "vellum" (the fleet prescribed
default), "nord", "solarized-dark", "gruvbox-dark", or
"custom" for inline-override themes.
fg: HexColorForeground color (status bar text default).
bg: HexColorBackground color (status bar background default).
active_fg: HexColorAccent for the active window’s segment.
active_bg: HexColor§inactive_fg: HexColorAccent for inactive windows.
inactive_bg: HexColor§border_active: HexColorPane border color when the pane is focused.
border_inactive: HexColorPane border color when the pane is not focused.
message_fg: HexColorMessage area (e.g. tmux command-prompt line) colors.
message_bg: HexColorImplementations§
Source§impl TearTheme
impl TearTheme
Sourcepub fn from_fleet(fd: &FleetDefaults) -> Self
pub fn from_fleet(fd: &FleetDefaults) -> Self
Derive a TearTheme from ishou_tokens::FleetDefaults — the
canonical fleet-themed constructor. Mirrors the pattern mado uses
in impl FleetThemedConfig for MadoConfig (mado/src/config.rs):
resolve the fleet theme to its BORN ishou tokens, then map each
surface onto tear’s status-bar / pane-border / message fields.
What derives from where (all from fd.theme.resolve()):
| tear field | ishou ResolvedTheme source |
|---|---|
name | resolved.name |
fg / inactive_fg | resolved.foreground |
bg | resolved.background |
active_bg / border_active | ansi_16[14] (bright cyan / frost) |
active_fg / message_fg | resolved.background (inverse) |
inactive_bg | ansi_16[0] (surface / night) |
border_inactive | ansi_16[8] (bright black / divider) |
message_bg | ansi_16[3] (yellow / aurora) |
The active/message accents pick the SAME semantic slots the old
hard-coded nord() used (frost-2 → ANSI bright-cyan, aurora-yellow
→ ANSI yellow), so the roles are preserved while the actual hex
now flows from the fleet truth.
Sourcepub fn nord() -> Self
pub fn nord() -> Self
Classic-Nord named theme (Polar Night / Snow Storm / Frost). This
is the EXPLICIT "nord" palette an operator selects by name — NOT
the fleet default (which is from_fleet, today Vellum). Kept as a
first-class option so name = "nord" resolves to true classic Nord
rather than the warm Vellum matte. Values mirror
ishou_tokens Nord (PlemeDark/ResolvedTheme::pleme_dark) intent.
Trait Implementations§
Source§impl Default for TearTheme
impl Default for TearTheme
Source§fn default() -> Self
fn default() -> Self
The fleet prescribed theme — DERIVED from
ishou_tokens::FleetDefaults::prescribed() (today: Vellum, the
warm aged-paper Nord-matte). This is the SAME source mado’s
FleetThemedConfig::from_fleet reads, so tear and mado converge
on identical colors by construction. A fleet rebrand touches
FleetDefaults::prescribed() / FleetTheme::prescribed_default()
and moves both at the next compile.