Expand description
Viewer-local state. UI plugins only; no grant.
Structs§
Constants§
- GRAYED_
OUT_ PERCENT - How far a fully grayed-out colour recedes toward the background, in percent: the viewer’s own rule.
- XTERM_
PALETTE - The xterm defaults of the 16 ANSI colours.
Functions§
- focused_
pane - The focused pane’s id, when one is focused.
- identity_
tint - The identity tint of a machine or project, by id.
- instance_
id - This viewer instance: shared by every plugin of one running viewer,
different in every other viewer and after a restart. A key such as
<plugin>.seen.<instance>is this viewer’s own. - is_
driving - Whether this viewer is the one the user is controlling. Several viewers can show the same account at once; only the driving one should act on the user’s behalf.
- local_
ms - The viewer’s local wall-clock time in milliseconds since the Unix
epoch shifted by the offset:
local_ms() / 86_400_000is the local day number, and the remainder the time of day. - machine_
id - The machine this viewer runs on, by the account’s machine id;
Nonein a viewer that is not an enrolled machine (a browser). - surface_
machine - The machine an instance surface (
<surface>@<machine>, amachine.afterinstance) belongs to. - surface_
pane - The pane an instance surface (
<surface>@<pane>, apane.footerorpane.headerinstance) belongs to, with its generation now. - surface_
project - The project an instance surface (
<surface>@<project>, aproject.afterinstance) belongs to. - surface_
tint - The identity tint (
0xRRGGBB) of what an instance surface belongs to: a machine row’s machine, a project row’s project, a pane footer’s project (else its machine), as the viewer paints it. - theme
- time_
zone - The viewer’s IANA time zone (
Europe/Berlin), when known. - utc_
offset_ minutes - The viewer’s local offset from UTC right now, in minutes east (UTC+2 is 120). It follows daylight saving: read it when you format a time, not once at activation.
- wall_ms
- The wall clock where the viewer runs, in milliseconds since the Unix
epoch: for dates, countdowns and “updated 3 min ago”. Animation keeps
to
Frame::now_ms.