pub enum Segment {
Text {
value: String,
},
SessionName,
WindowName,
PaneCommand,
PaneCwdBasename,
Time {
format: String,
},
Hostname {
short: bool,
},
Shell {
cmd: String,
interval_seconds: u32,
},
If {
cond: String,
then: Box<Segment>,
otherwise: Box<Segment>,
},
Signal {
signal: TearSignalKind,
mode: SignalRenderMode,
},
}Expand description
One status-bar widget. Each variant evaluates to a string at
render time; the bar concatenates segments aligned per
alignment. Colors and attrs come from the active
crate::TearTheme.
Variants§
Text
Literal text — common for separators / icons.
SessionName
The current session’s name.
WindowName
The current window’s name.
PaneCommand
The active pane’s command (e.g. "zsh", "nvim").
PaneCwdBasename
Current working directory (basename).
Time
Current time, formatted via strftime.
Hostname
Hostname (long or short).
Shell
User-defined shell-command output, refreshed every interval
seconds. The backend caches the most recent value.
If
Conditional: render then if cond evaluates non-empty,
otherwise else. cond is a #{...}-style condition for
tmux compatibility.
Signal
A typed fleet status signal — a semantic glyph from the
TearSignals / ishou_tokens::FleetSignals atlas (session
active 🌊, pane zoomed 🔍, prefix armed ⌨️, sync on 🔗,
copy-mode 📜, …). Replaces hand-typed emoji in Segment::Text
with the fleet-uniform vocabulary; the glyph moves fleet-wide when
the ishou atlas changes. mode selects emoji / single-width glyph
/ plain label for the bar’s width budget. Pair inside a
Segment::If (tmux conditional) to show the signal only when the
state is active.
Field is named signal (not kind) to avoid colliding with the
enum’s #[serde(tag = "kind")] discriminant key.