Skip to main content

Module config

Module config 

Source
Expand description

The configuration file: accounts, admin windows, the notes folder.

Default location: $XDG_CONFIG_HOME/sioul/config.toml, else ~/.config/sioul/config.toml. Passwords never go in it: they belong in the system keyring (docs/architecture.md). See examples/config.toml.

Sioul writes to this file too, when you add or remove an account. It edits it in place with toml_edit, so your comments and your order stay.

Structs§

Account
AgendaSettings
BitwardenSettings
CallSettings
The devices of calls in sites, by the names the system gives them; unsaid, the system’s own.
Config
ContactSettings
How the contacts read phone numbers (docs/client.md, “Duplicates”).
GithubSettings
What GitHub brings, once asked; its token is in the keyring.
InvoiceSettings
LetterSettings
Paper letters (docs/porch.md): the folder their scans arrive in.
MailSettings
MapSettings
McpSettings
What an AI agent connected to sioul mcp may use, beyond reading and adding ([mcp], docs/mcp.md).
NamedValue
A name and what it stands for.
PlanningSettings
What a day holds, as the plan learns it from your days (docs/capacity.md).
PorchSettings
What the Porch shows of what Sioul knows.
QuietSettings
What quiet time keeps: the categories of tasks that are yours (family, friends, leisure). Read through the word lists (words::TaskWords: personal, work), which these settings replace while written.
ReachSettings
Who may reach you when, channel by channel, as an older Sioul wrote it before [attention]: each row the columns ticked for it (“work”, “admin”, “leisure”, “meals”, “sleep”, “pause”); mail’s rows at the top of [reach], calls’ in [reach.calls], messages’ in [reach.messages]; a row left out kept its usual times, an empty one was never. Read once, to seed the matrix of what reaches you (attention::seeded).
Reading
How long text reads (docs/client.md, “Calm first”): lines need air.
ReminderSettings
Reminders before dates (docs/reminders.md): one quiet notification each, never again.
RenameValue
One name changed.
RowSettings
One channel’s rows, each the columns ticked for it; a row left out keeps its usual times.
Source
A folder of mail to read, the account it belongs to, and the provider ids to trust for it.
SpamSettings
Sioul’s own spam filter ([spam], docs/spam-filter.md): what it does with each verdict, and how sure it must be. One filter for every account.
TaskKind
A kind of task, as you named it.
TaskSettings
TimeOff
Days off, from one day to another, both included.
TimeOffValue
Days off, as the settings edit them.
WeatherSettings
WindowValue
A day’s hours, as the settings edit them.

Enums§

AccountKind
Priority
How an account’s mail ranks against the others’.
Security
How the connection to the mail server is encrypted. There is no plain option.
SettingValue
A setting’s value, as the window gives it back.

Constants§

DEFAULT_FETCH_MINUTES
Minutes between two fetches of the folders the server does not push.
DEFAULT_HISTORY_WEEKS
Weeks of history when the configuration says nothing.
DEFAULT_SYNC_DAYS
Days of mail the first sync brings, when the account does not say.

Functions§

add_dav_account
Adds a contacts-and-calendars account at the end of the configuration file.
add_imap_account
Adds a mail account at the end of the configuration file, creating the file if needed.
add_portal
Adds a site: a web-only mailbox, a chat, opened in Sioul’s Sites.
add_site
Adds a site with the name it shows.
add_site_as
Adds a site as the Sites page offers it: its name, address, type (“mailbox”, “chat”…), what it is for (“” for its type’s), the domains whose mail announces it, your categories (“Banque”).
append_account 🔒
append_site 🔒
before_sites_path
The copy of config.toml kept before the sites moved: config-before-sites.toml, beside it.
cache_dir
$XDG_CACHE_HOME/sioul, else ~/.cache/sioul: copies made to open attachments.
change_kind
A kind renamed (from and to), taken away (to empty) or added (from empty, to its name). Tasks keep the kind they have: taking a kind away only takes it off the choices. The kinds are read under the file’s lock, which the sharing takes too, as the file holds them then: a kind another device’s change brought in meanwhile stays.
config_dir
$XDG_CONFIG_HOME/sioul, else ~/.config/sioul.
data_dir
$XDG_DATA_HOME/sioul, else ~/.local/share/sioul: the mail.
default_kinds 🔒
Sioul’s kinds, before you name your own.
default_path
Where the configuration lives by default.
downloads_dir
Where the desktop puts downloads: XDG_DOWNLOAD_DIR on Linux, the system’s elsewhere.
expand_home
Expands a leading ~ to the home folder (USERPROFILE on Windows): “/Notes”, and “\Notes” as Windows writes it.
fifteen 🔒
filter_table 🔒
One filter as its table, through what rules::Filter writes (the usual values left out); its lists of conditions and actions inline.
history_days
Days of history from a setting in weeks: two weeks by default, None for everything (0).
make_private_dirs
Makes Sioul’s own folders (configuration, data, state, cache) yours alone, as they hold mail, keys, drafts and caches: made with mode 0700 on Unix, and narrowed to it when they exist already. Their parents are made as usual and never changed, and a folder that is a link is left as it is. Nothing to do elsewhere: a Windows profile’s folders are the user’s own. Called at start; what cannot be done is left, said by the first write that fails.
migrate_sites
Sites written as [[account]] of kind “portal” by older files, moved to [[site]], in their order, each with the comments above it; their kind goes. Returns whether any moved.
migrate_sites_at_start
The sites migration as the window runs it at each start (migrate_sites), while the file still holds a site among its accounts: the file copied aside first (before_sites_path), once only, so that a migration that fails at each start never writes over the first copy, the file as it was. Returns whether any site moved.
move_account
Moves an account delta places among those of its kind (sites among sites): the order the lists show them in. At either end, it stays.
move_site
Moves a site delta places in the list: the order the Sites page shows (site_order, then the file’s). At either end, it stays. The file’s tables take that order. With order (the sharing writes format 2, where each site travels apart: docs/database.md, “The format of what travels”), site_order says it too, for your other devices; without, the list’s own order travels with it, as it always did, and site_order, if there, follows it.
private_dir 🔒
One folder of Sioul’s own, made or narrowed to 0700.
read_document 🔒
remove_account
Removes an account from the configuration. Its mail and its password are not touched here.
remove_site
Takes a site out of the configuration; what its pages kept (sign-ins, cookies) stays in its profile.
set_account_item 🔒
set_auth
How an account signs in: Some("google") for Google’s sign-in (an access token), None for a password (an app password given instead).
set_enabled
An account switched on or off: off, it keeps its settings and is neither synced nor shown.
set_filters
Writes the mail filters whole, in their order, as [[mail.filter]] tables, each condition and each action an inline table on a line of its own (rules::Filter); the rest of the file and its comments stay. None: the list is taken out.
set_history
Sets how far back mail and the agenda reach, in weeks (0 for everything).
set_priority
Sets an account’s priority; “average”, the default, is written too, so the choice shows.
set_smtp
Records an account’s sending server (found from its address when first needed).
set_table
A table’s keys written at once, each a list of words (Some) or taken out (None), the table kept even empty (it says it was written); and remove, keys or tables taken out (“reach”, “pause.doses”): one write, the comments kept (attention’s rows, the older keys they replace).
set_trusted_ids
Records the authserv-ids to trust for an account (learned at its first sync).
set_value
Sets one setting in the file, in place, keeping its comments and order: history_weeks, reading.size (a table’s key), account.<id>.priority (an account’s), window (every admin window at once). An empty value removes the key, so its default comes back.
set_writing
Sets your name as recipients see it and your signature (Markdown); empty removes them.
sioul_authserv_id
The name under which Sioul writes its own checks of a message (RFC 8601 authserv-id): unique to this installation and under .invalid, so no sender can write results that pass for Sioul’s. Made once, kept in the state folder.
slug
Lowercase letters, digits and dashes: safe as a folder name and a TOML value.
state_dir
$XDG_STATE_HOME/sioul, else ~/.local/state/sioul: where sync and the Porch stopped.
swap_tables 🔒
Two tables trade places. Each read from the file keeps its place in it (Table::position), which orders the file when written: the places stay with the slots, or the file would come back in its old order.
two 🔒
write_document 🔒
Writes next to the file, then renames, so a crash never leaves half a configuration. A configuration that is a link (kept in a dotfiles folder) is written where it points, the link kept.
xdg 🔒
$<variable>/sioul when the variable is set, on every system (tests set them); else Linux’s XDG fallback, and the system’s own folders on Windows (%APPDATA%, %LOCALAPPDATA%) and macOS (~/Library/Application Support).
yes 🔒