status¶
The status helper module: constructors for the status line wire format.
Functions¶
status.fill(spec) -> {kind: "span", text: string, fg: number | string?, bg: number | string?, bold: boolean?, italic: boolean?, underline: boolean?, dim: boolean?, reverse: boolean?, strikethrough: boolean?} | {kind: "fill", glyph: string?, fg: number | string?, bg: number | string?, bold: boolean?, italic: boolean?, underline: boolean?, dim: boolean?, reverse: boolean?, strikethrough: boolean?}— Build a fill element that absorbs the leftover width of the line when the line is laid out.status.flat(elems) -> {kind: "flat"} | {kind: "zones", left: {[integer]: {text: string, fg: number | string?, bg: number | string?, bold: boolean?, italic: boolean?, underline: boolean?, dim: boolean?, reverse: boolean?, strikethrough: boolean?}}?, center: {[integer]: {text: string, fg: number | string?, bg: number | string?, bold: boolean?, italic: boolean?, underline: boolean?, dim: boolean?, reverse: boolean?, strikethrough: boolean?}}?, right: {[integer]: {text: string, fg: number | string?, bg: number | string?, bold: boolean?, italic: boolean?, underline: boolean?, dim: boolean?, reverse: boolean?, strikethrough: boolean?}}?}— Build a flat status line: the elements laid out left to right, with any fills absorbing the leftover width.status.span(spec) -> {kind: "span", text: string, fg: number | string?, bg: number | string?, bold: boolean?, italic: boolean?, underline: boolean?, dim: boolean?, reverse: boolean?, strikethrough: boolean?} | {kind: "fill", glyph: string?, fg: number | string?, bg: number | string?, bold: boolean?, italic: boolean?, underline: boolean?, dim: boolean?, reverse: boolean?, strikethrough: boolean?}— Build a styled span of text.status.zones(spec) -> {kind: "flat"} | {kind: "zones", left: {[integer]: {text: string, fg: number | string?, bg: number | string?, bold: boolean?, italic: boolean?, underline: boolean?, dim: boolean?, reverse: boolean?, strikethrough: boolean?}}?, center: {[integer]: {text: string, fg: number | string?, bg: number | string?, bold: boolean?, italic: boolean?, underline: boolean?, dim: boolean?, reverse: boolean?, strikethrough: boolean?}}?, right: {[integer]: {text: string, fg: number | string?, bg: number | string?, bold: boolean?, italic: boolean?, underline: boolean?, dim: boolean?, reverse: boolean?, strikethrough: boolean?}}?}— Build a zoned status line with independently aligned left, center, and right groups.