Skip to main content

Module profiles

Module profiles 

Source
Expand description

Workstation profiles of the user’s own: a name, a description and the entries to run, kept as TOML in $XDG_CONFIG_HOME/helixforge/profiles/, exported and imported as the same files. Each becomes a profile entry in the catalog’s Profiles area, under “Your profiles”, so it is planned, queued and run like the built-in ones.

Structs§

Profile
A profile as stored and exported.

Enums§

ProfileError
Why a profile cannot be used.

Constants§

GROUP
The id of the group they appear in.
PREFIX
Prefix of the ids user profiles have in the catalog.

Functions§

add_to
Add the user’s profiles to the catalog’s Profiles area as “Your profiles”, replacing an earlier copy of that group. Returns the problems found.
check
Every entry must exist in the catalog, there must be one, and the name and description must be plain text: a shared file could otherwise carry terminal escape sequences into the menu.
dir
$XDG_CONFIG_HOME/helixforge/profiles, or under ~/.config.
entry
A profile as a catalog entry.
from_queue
The entries of a planned queue as a profile: profile entries contribute their members, so a profile is never nested in another.
load_all
The profiles in directory, each with its slug; unreadable or invalid ones are returned as problems instead.
read
Read and check one profile file against the catalog.
save
Write a profile into directory under its name’s slug; an existing one of that name is replaced. Returns the file.
slug
A file name from a profile name: lower case letters, digits and dashes.
write
Write a profile to any file, as export does.