StatusBar

termflow.tui.widgets.StatusBar
object StatusBar

Bottom-of-screen status bar with left / center / right sections.

Produces a single-row TextNode exactly width cells wide. The three sections are placed independently:

  • left — flush to the left edge
  • center — centered within the row
  • right — flush to the right edge

If sections overlap because the row is too narrow, the renderer drops sections in priority order right → center → left. An oversized left is truncated to fit.

The bar uses the theme's primary colour as its background and background as the foreground by default — the classic "inverse-video status line" look. Override the styling by constructing the TextNode directly if you need something bespoke.

given Theme = Theme.dark
StatusBar(
 left   = " ready",
 center = "editor.scala",
 right  = "L:42 ",
 width  = model.terminalWidth,
 at     = Coord(1.x, (model.terminalHeight).y)
)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
StatusBar.type

Members list

Value members

Concrete methods

def apply(left: String, center: String, right: String, width: Int, at: Coord)(using theme: Theme): VNode
def renderString(left: String, center: String, right: String, width: Int): String

Compose the three sections into a single padded string of length width.

Compose the three sections into a single padded string of length width.

Exposed for tests and for callers that want to apply custom styling rather than going through apply.

Attributes