Skip to main content

Crate tmprl_ui

Crate tmprl_ui 

Source
Expand description

The window tree: splits, tabs and focus, expressed as rectangles.

There are no ratatui types here and no dependencies at all. A layout is a tree plus some arithmetic, and keeping the terminal out of it is what lets the rules, where focus goes when you press <C-w>l, what happens to a split’s siblings when you close it, be tested as plain functions.

The model is vim’s, because the people who want a Temporal client in their terminal mostly have vim’s window commands in their fingers already. It also means the diff feature is not a feature: two workflow histories in a side-by-side split is the comparison, and it works for any two views rather than a pair somebody anticipated.

Structs§

Pane
A window, laid out.
Rect
A rectangle in terminal cells.
Tabs
Every tab, with one current. There is always at least one.
Tree
A tree of windows, with one of them focused.
ViewId
What a pane is showing. Opaque here: this crate arranges rectangles and does not care what is drawn in them.

Enums§

Axis
Which way a split divides its children.
Direction
Where to move focus, or which edge to drag.