Skip to main content

TearTheme

Struct TearTheme 

Source
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: String

Theme name — typically one of "vellum" (the fleet prescribed default), "nord", "solarized-dark", "gruvbox-dark", or "custom" for inline-override themes.

§fg: HexColor

Foreground color (status bar text default).

§bg: HexColor

Background color (status bar background default).

§active_fg: HexColor

Accent for the active window’s segment.

§active_bg: HexColor§inactive_fg: HexColor

Accent for inactive windows.

§inactive_bg: HexColor§border_active: HexColor

Pane border color when the pane is focused.

§border_inactive: HexColor

Pane border color when the pane is not focused.

§message_fg: HexColor

Message area (e.g. tmux command-prompt line) colors.

§message_bg: HexColor

Implementations§

Source§

impl TearTheme

Source

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 fieldishou ResolvedTheme source
nameresolved.name
fg / inactive_fgresolved.foreground
bgresolved.background
active_bg / border_activeansi_16[14] (bright cyan / frost)
active_fg / message_fgresolved.background (inverse)
inactive_bgansi_16[0] (surface / night)
border_inactiveansi_16[8] (bright black / divider)
message_bgansi_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.

Source

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 Clone for TearTheme

Source§

fn clone(&self) -> TearTheme

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TearTheme

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TearTheme

Source§

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.

Source§

impl<'de> Deserialize<'de> for TearTheme

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for TearTheme

Source§

fn eq(&self, other: &TearTheme) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for TearTheme

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for TearTheme

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.