Documentation
¶
Overview ¶
Package cursorrecord is the record of the cursor each user's last session showed, which the display manager keeps for the greeter. The greeter runs before anyone logs in, as an account that cannot read into a 0700 home, and a session's XDG_STATE_HOME is unknown before it starts; so the session hands its cursor to the display manager (`lys-login record-cursor`), which writes it, world-readable, under Dir by the session's uid.
Index ¶
Constants ¶
const Dir = "/var/lib/lys-login/cursor"
Dir is where the display manager keeps the records.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cursor ¶
type Cursor struct {
// Theme is the xcursor theme, a directory name; "" when unknown.
Theme string `json:"theme,omitempty"`
// Size is the nominal size in pixels, 0 when unknown.
Size uint32 `json:"size,omitempty"`
}
Cursor is a cursor theme and size; either may be unknown, not both. Decoding one checks it, so a decoded Cursor is always one to record.
func FromEnv ¶
FromEnv is the cursor a session with environment env shows: XCURSOR_THEME, and XCURSOR_SIZE else HYPRCURSOR_SIZE, which the compositor exported. False when env names neither; an error when it names a theme that cannot be recorded.
func (*Cursor) UnmarshalJSON ¶
UnmarshalJSON decodes a cursor and refuses one that cannot be recorded.