Skip to main content

Module view

Module view 

Source
Expand description

Viewer-local state. UI plugins only; no grant.

Structs§

PaneRef
A pane and its generation.
Theme
The viewer’s theme colours as 0xRRGGBB.

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_000 is 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; None in a viewer that is not an enrolled machine (a browser).
surface_machine
The machine an instance surface (<surface>@<machine>, a machine.after instance) belongs to.
surface_pane
The pane an instance surface (<surface>@<pane>, a pane.footer or pane.header instance) belongs to, with its generation now.
surface_project
The project an instance surface (<surface>@<project>, a project.after instance) 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.