Expand description
Shared pieces of the full-screen views, legume-tui’s: the screen loop
and the chrome (legume_tui::view), histogram scales, binning and plots
(legume_tui::hist), all drawn in data-beans’ LOOK.
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 - A histogram of
countsover binskmin.., scaled to them. - Look
- Styles for a popup or a strip. Built with
Look::neworLook::terminal: more styles may come, so not field by field. - 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, akillasks the views to stop (Screen::quit,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§
- LOOK
- The views’ styles: the terminal’s own foreground (so light and dark
backgrounds both work) for nearly everything, dim for what is
secondary, and [
ACCENT]. - TICK
- How often a view’s loop asks
Screen::tick, keys or not.
Traits§
- BarValue
- A bar height
HistPlotcan draw: whole counts, or any non-negative real value (a summed signal, a log statistic). - Screen
- A full-screen view, driven by
Tui::runorrun_screen.
Functions§
- compact
- Compact number for axis labels: 950, 1.2k, 35k, 1.1M; small fractions keep two significant digits.
- copy
- Ask for
texton the clipboard (pbcopy, else the terminal’s OSC 52). Whether a terminal took it cannot be known. - header
- Title row: a reverse-video badge naming the view, then
title, thenextradim. - help_
line - Help line from
(key, what it does)pairs: each key in the accent in bold, what it does dim (crate::widgets::key_line). - 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: the page’s border and the accent title whenfocused, the look’s border otherwise. - run_
screen - Run
screenfull screen until it is done, in a plain session of data-beans’ own. The terminal is restored on return and on panic. - run_
screen_ in run_screeninsession: hosted, it keeps running when the connection drops and akillstops it (Screen::quit). 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.- title_
bar - Title row:
title(aheader) with the session keys,keys(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.