Skip to main content

Module everywhere

Module everywhere 

Source
Expand description

Do-not-disturb on every device (docs/do-not-disturb.md): why it holds now, the switch pressed on any device, and the people who may reach you then.

  • The reasons, each read from the one place that already says it, and shared as it is: the pause and Free time (quiet.toml), the night and naps (Health), a focus session (time/running.toml), and the switch (state/do-not-disturb.toml, the only new record). Every device reads the same files and comes to the same answer. The latest change wins: the switch pressed off after a reason began holds that reason off until it ends; a reason beginning after the press holds again.
  • The switch: each device writes its own table only, its last press stamped with a hybrid clock (never before a press already known), so a press made after seeing another always comes after it, whatever the clocks. A press asks one of three states (State, the owner’s decisions 6 to 12 of 18 October 2026): Reachable, As usual, Do not disturb. Two presses that did not know of each other, less than a minute apart: the quieter state wins (Do not disturb, then As usual, then Reachable); one more press settles it. A Reachable press writes on = false, so that an older Sioul reads do-not-disturb off.
  • Reachable: while it lasts, never past the night’s start (waking, at night: reachable_end), neither a focus session, nor the night, nor Free time turns do-not-disturb on; at its end, what an As usual before it held off stays off (held_off); a pause pressed after it, or that knew of it, ends it, and it holds no pause off. A device gone from the sharing reads as As usual (Switch::counted). Its press releases what the phone holds, as “Let what your phone holds through” pressed on a computer does (a device’s release stamp, by device: Switch::release_stamps).
  • The list, “Who may reach you during do-not-disturb” (config/dnd-people.toml): names, numbers and addresses, kept in the sharing itself, since the address books of two devices may not be in step.
  • Both ways: each device’s own do-not-disturb, turned on or off by anything there and heard as it happens, presses the switch when it disagrees with what holds there (heard); the press says where it came from (via). A device whose switch “on” came from its own system alone adds no mode of Sioul’s over it (held_by_system), so that the end of what turned it on stays visible.

Structs§

Device
One device’s table in the switch’s file, written by that device alone.
DndSettings
What turns do-not-disturb on ([dnd] in the configuration, shared with the settings).
Held
A reason that holds now.
Here
This device, as said words it.
Now
Why do-not-disturb holds now: every reason that does, the one said first first; and Reachable, while it lasts.
People
“Who may reach you during do-not-disturb”.
Person
Someone who may reach you during do-not-disturb.
Press
The press that holds, as every device reads the switch.
Reach
Reachable while it lasts (Now::reachable).
Said
What the status line and the details say of do-not-disturb.
Sources
What each reason’s source says now (Unix seconds).
Switch
The switch’s file: a table per device.

Enums§

Follows
How another device follows.
Length
The lengths Reachable is pressed for (decision 8 of 18 October 2026).
State
One of the three states a press asks (the owner’s decisions 6 to 12 of 18 October 2026), from the least quiet: Reachable (« Joignable »), the people who write and call reach you at once; As usual (« Comme d’habitude »), the matrix by the time; Do not disturb (« Ne pas déranger »).
Why
Why do-not-disturb holds, in the order the first one is said.

Constants§

CLOCK_AHEAD_MS
A press stamped further ahead of this device’s clock than this (milliseconds) is not followed by its hybrid clock (Switch::next_stamp), and reads as not pressed yet (read_switch): a garbled stamp, or a clock a year ahead, never wins for ever (review of part 3, R-8). A clock a few hours wrong (a time zone set wrong) still works with the others.
COMPUTER_QUIET
A computer whose news is this old (seconds), its table saying it is silenced, is waiting for its news: its Sioul may have stopped without a word (a crash), and its system’s do-not-disturb (Plasma’s) ended with it. A running computer exchanges each minute and writes its news at least every fifteen minutes (sioul-sync’s write_seen). A phone’s modes stay while Sioul is closed: its table holds.
FOCUS_GRACE
A focus session holds do-not-disturb this long past the time chosen (seconds): a session forgotten never keeps you unreachable for long.
FOCUS_OPEN
…and a session without a time chosen, this long (Sioul’s open-ended ceiling).
GONE_FILE
The devices gone from the sharing as this device last found them, beside the sharing’s memory (share/): ids only, never shared (gone_devices).
LIVE_DAYS
Other devices heard from within this many days count for “on every device”.
MARGIN_MS
Two presses on two devices closer than this (milliseconds), neither knowing of the other: “on” wins. Clocks of devices that set their time from the network differ by less than a second; this covers a clock left a little off.
PEOPLE_FILE
The list’s file, in the configuration folder; shared with the senders (“config/dnd-people.toml”).
REACHABLE_MOST
Reachable never lasts more than this after it was pressed (seconds), whatever its press says: the longest any of its lengths takes, a press by day “until tonight” (review of part 3, F2).
REACHABLE_RELEASE
What a device’s Reachable press is asked as among the release stamps (Switch::release_stamps): its id and this, apart from its own release.
RELEASE_FOLLOWED_MS
A release stamped further ahead than this (milliseconds) is not followed by the hybrid clock (R-3): a release asks nothing of the presses’ order.
SWITCH_FILE
The switch’s file, in the state folder; shared with the settings (“state/do-not-disturb.toml”).
VIA_SYSTEM
A press heard from the device’s own do-not-disturb, as Device::via and Press::via say it.

Functions§

address_key 🔒
An address as compared: its address part (“Jane jane@example.org”), trimmed, in lower case.
change_own
This device’s own table changed under the file’s lock, the file read again first: the other devices’ tables, brought by the sharing meanwhile, stay as they are. change says whether it changed anything; nothing is written otherwise. A file that does not read is left alone, an error.
change_people
The list changed under its lock, read again first: what the sharing brought meanwhile stays. A file that does not read is left alone, an error.
focus
A focus session as do-not-disturb reads it: counting (not paused), from its start until 30 minutes past the time chosen (three hours without one); none otherwise.
from_contact
Someone from a contact card: their name, numbers and addresses.
from_safe
People from the Safe list: each address, with its card’s name and numbers when a card has it; everyone whose card is in a category on it (category:Friends); a card on it (contact:<UID>); a number on it (tel:+33…). Patterns (@example.org, *@example.org, tel:+3319900*) name nobody: counted, left.
gone_devices
gone_path
The devices gone from the sharing by a sealed fact (they left, you forgot them, another replaces them), as this device’s window last found them: beside the sharing’s memory, ids only, never shared.
heard
A change of this device’s own do-not-disturb, heard as it happened, against what holds here (holds: do-not-disturb on, for any reason): the press it is, Some(on), when the two disagree; none when they agree, which is what Sioul’s own changes look like when they come back (docs/do-not-disturb.md, “Both ways”). A change found later, not heard as it happened, is never a press: its time is unknown, and another device may have pressed since.
held_by_system
Whether the switch’s mode is held on this device by its own system alone: the switch’s “on”, taken from this device’s own do-not-disturb (here, VIA_SYSTEM), is the only reason for that mode (the pause and Free time have modes of their own). Sioul then adds no mode of its own there: the system’s cause silences the device already, and a mode of Sioul’s would hide its end (Android shows an application only the effective state).
held_off_of
What a press of state carries of the press that held before it (Device::held_off): for Reachable, the As usual it found (its stamp), or the one the Reachable it follows carried; else nothing. A gone device’s As usual holds nothing off, so it gives nothing (review of part 3, R-5).
is_false 🔒
is_zero 🔒
new_id
A new id: the time and a hash keyed at random for this process.
now
Why do-not-disturb holds at now (Unix seconds), from the reasons’ sources, the settings and the switch’s latest press. A press “off” made after a reason began holds that reason off until it ends; the pause first, then Free time (never with the pause), sleep, focus, the switch.
now_ms 🔒
others
Each other device that counts (heard from in the last LIVE_DAYS days, by the sharing: heard, its id and when, Unix seconds), and how it follows while do-not-disturb holds here, since since (milliseconds): a table written before that (by more than MARGIN_MS, for clocks that disagree) says what held there before, not now. registered says whether a device has its entry in the devices’ registry (a Sioul that knows do-not-disturb). A computer as Sioul quit there is closed; a computer said silenced but not heard from for COMPUTER_QUIET is waiting for its news (a crash says nothing).
reachable_end
When Reachable pressed at at ends at the latest (Unix seconds), whatever its press says, as every reader reads it (decision 8; review of part 3, F2): its own end (until; none: an older, a later or a garbled press), and never past the first night’s start after it when pressed by day, the waking of the night it was pressed in when pressed at night (nights, as Health keeps them), nor REACHABLE_MOST after it.
reachable_until
When Reachable pressed now for length ends (Unix seconds), and whether it is “until you turn it off”: hours_end the end of the hours you are in, night the night’s start (by day: the next one), waking the end of the night you are in (none by day). Pressed at night, “until tonight” and “until you turn it off” last until waking. None when it cannot end: no night known, or an end already past.
read_switch
The switch as every reader on this device reads it: the file, the devices gone from the sharing read as Switch::counted says (here: this device’s id, kept as it is; “” where it is not known, the gone being others always). The window, the listener, the calls’ table, sioul remind --watch, sioul watch and the MCP read it so (F1, F7).
said
The words of do-not-disturb as it holds now: where (here, this device and its system’s answer; others, as others says), until when (until, already worded: “15:00”, “tomorrow at 07:00”), why. name_of names a device by its id, inside a sentence (“your phone”, a computer’s name, “another device”).
sources_at
What the reasons’ sources say at now, from the pauses’ overrides and Health’s blocks: every reader of the switch builds them so (the window, the listener, the calls’ table, sioul remind --watch, sioul watch, the MCP), a pause ending Reachable in all of them (review of part 3, F7).
sources_from_files
The same from the files alone, Health’s blocks without the day’s events: for what runs without the window (attention::dnd_from_files, the MCP).
take_off
Someone blocked comes off Always through (docs/attention.md, Q3: blocked beats Always through, and putting someone on one list takes them off the other): their address and number taken off the people on the list, the person of their card (card, its UID) taken off whole; a person left with nothing to reach them by goes. Whether the list changed.
write_whole 🔒
A file written beside its place under a hidden name, then renamed.
yes 🔒