~/bend-docscommunity

tui/model.bend checks

raw source on the hub · import cswap-bend-cli@0.1.0.0/tui/model.bend as Model

1 import
import Base

Types

type Win source · line 8 · raw

Data

One usage window: "5h", "7d" or a model name; None pct is unknown.

type Acct source · line 13 · raw

Data

One managed account. age is the seconds since its last good reading; note explains an unreadable one ("" when there is nothing to say).

type Hdr source · line 17 · raw

Data

The auto-switch line: is the daemon running, and its settings.

type Snap source · line 22 · raw

Data

Everything for one frame. off is the local UTC offset biased by 86400 (Clock.tz), log the last daemon.log lines, already formatted.

type View source · line 26 · raw

Data

How to draw it: terminal width in columns, colour on or off (NO_COLOR).

Definitions

def win_label source · line 29 · raw

@+w:Win -> String

def win_pct source · line 34 · raw

@+w:Win -> Maybe<&2, U32>

def win_reset source · line 39 · raw

@+w:Win -> Maybe<&2, U32>

def acct_wins source · line 44 · raw

@+a:Acct -> List<&2, Win>

def acct_slot source · line 49 · raw

@+a:Acct -> String

def acct_active source · line 54 · raw

@+a:Acct -> Bool

def acct_disabled source · line 59 · raw

@+a:Acct -> Bool

def acct_email source · line 64 · raw

@+a:Acct -> String

def acct_age source · line 69 · raw

@+a:Acct -> Maybe<&2, U32>

def acct_note source · line 74 · raw

@+a:Acct -> String