Expand description
Shared pieces of the full-screen views: the palette, panels, header and help lines, the event loop, histogram scales and binning, and a histogram plot with a y gutter, an x axis, and markers.
Structs§
- Binned
- A sorted statistic binned on a scale: the bins and their counts.
- Binning
- Equal-width bins on a scale, keyed by integers from 0 at 0. The log
scale is the
Axisevery histogram reads values on:ln(shift + x), the shift 1 for counts and smaller for values mostly below 1. - Hist
Plot - Mirror
Plot - Two bar series on one scale around a zero line, one growing up and the
other down, as a Miami plot, in half cells. Signed values are a mirror of
their positive and negative parts. Axes as
HistPlot’s, one column per bar. - Mirror
Side - One side of a
MirrorPlot. - Tui
- The terminal a command’s views draw on, in the command’s session: up
from the first view (
Tui::run) until dropped, so every view of the command and the work between them (Tui::work) share one screen. While it is up, adata-beans killasks the views to stop as Ctrl-C does (Tui::stop_requested), and work under way finishes first. Log records raised while it is up are held back and written once the normal screen is back, or as work between views runs.
Enums§
- Scale
- How a histogram axis is drawn.
Constants§
- ACCENT
- ACCENTED
- Accent bars and marks.
- DIM
- Secondary text: labels, axes, units.
- HIGHLIGHT
- Key names in help lines, typed values, and the value in focus.
- PLAIN
- Plain text and bars in the terminal’s foreground.
- TICK
- How often a view’s loop asks
Screen::tick, keys or not.
Traits§
- BarValue
- A histogram of
countsover binskmin.., scaled to them. A bar heightHistPlotcan draw: whole counts, or any non-negative real value (a summed signal, a log statistic). - Screen
- A full-screen view driven by
run_screen.
Functions§
- compact
- Compact number for axis labels: 950, 1.2k, 35k, 1.1M; small fractions keep two significant digits.
- copy
- Ask the terminal to put
texton the clipboard (OSC 52): kitty, iTerm2, WezTerm and others do (tmux when itsset-clipboardlets it through); the rest ignore it. Whether it took cannot be known. - header
- Title bar: a reverse-video badge naming the view, then plain text.
- help_
line - Help line from
(key, what it does)pairs. - input_
line - Footer while typing:
prompt, the text so far with a cursor, then keys. - median
- Median of an ascending slice (0 when empty).
- modes_
of - The terminal modes
screenasks for, as its session turns them on (and on again after every attach): the mouse as buttons and the wheel in SGR form, not the pointer’s every move, which would wake the loop for nothing; keys held with modifiers told apart. - notify
- Ring the terminal’s bell and ask it for a desktop notification saying
text(OSC 9); terminals without either ignore them. - panel
- Rounded panel titled
title: plain border and accent title whenfocused, dim border otherwise. - run_
screen - Run
screenfull screen until it is done, in a plain session of its own (Session::plain). The terminal is restored on return and on panic. SeeTui::run_withfor the rest. - run_
screen_ in run_screeninsession: hosted, it keeps running when the connection drops and akillstops it as Ctrl-C does. The screen is handed back on return;Tuikeeps it up across several views.- run_
screen_ in_ with run_screen_in, with each key (but Ctrl-C) handed toon_key.- run_
screen_ with run_screen, with each key (but Ctrl-C) handed toon_keyrather thanScreen::handle_key: for a caller with rules of its own about which keys a screen sees.- title_
bar - Title bar:
title(aheader) with the session keys,keys(super::session_keys), at its right end. The keys stay whole however narrow the terminal, the title giving way, so the detach key is always on screen.