Skip to main content

Module everywhere

Module everywhere 

Source
Expand description

Do-not-disturb on every device, as this device applies and says it (docs/do-not-disturb.md; the rules are sioul_core::everywhere). The one caller of the do-not-disturb layer (crate::dnd): the pauses (pauses::apply), the switch, the focus timer and the minute all come here, and every device reads the same shared files: quiet.toml (the pauses), time/running.toml (focus), Health (the night), state/do-not-disturb.toml (the switch) and the [dnd] settings.

  • Apply: the system’s do-not-disturb on for each reason that holds, off for each that does not; nothing redone when nothing changed (the layer keeps what it did). On Android, only in the window’s process (where the layer’s modes are kept): the background service asks it to (steps), and an alarm comes back at the next end (steps::next).
  • Say: this device’s table in the switch’s file tells the others what holds here and whether its system is silenced; the status line, the phone’s card and the service’s notification say where it holds.
  • The list: Always through (« Passent toujours »), edited in Settings ▸ Do not disturb; its people get through as its rows of the matrix of what reaches you say (sioul_core::attention), and on a phone Sioul says who is not starred there.
  • Both ways: a change of this device’s own do-not-disturb, heard as it happens, presses the switch when it disagrees with what holds here (heard_from_system); Sioul’s going off here turns the system’s own off too, where Sioul can (apply), and says what stays.

Structs§

Gated 🔒
Do-not-disturb holding from its switch or a focus session (gated): when it ends, when that is known, and which of the two holds.
Look 🔒
What is read for one look: the settings, the pauses, the switch, why it holds, and what now is for (the time under do-not-disturb’s layer).

Statics§

AGAIN 🔒
Asked again while an apply runs: it goes once more, with what changed meanwhile.
BUSY 🔒
GONE_NOTED 🔒
When the devices gone were last noted (milliseconds; note_gone).
HEARING 🔒
One heard change at a time: two words of the same change (Android’s status and its filter, two of Plasma’s) press once.
REACHABLE_KEPT 🔒
Reachable as last read, with what it was read from (reach_inputs); forgotten at a press here.
WINDOW 🔒
The window, when it runs in this process: what is heard or pressed outside it shows there at once, and is sent with its exchange.

Functions§

again 🔒
“Silence this device again”: each of Sioul’s modes that holds here left and entered afresh, the person’s earlier “off” in the system set aside. A switch “on” taken from this device’s own system becomes the switch’s own, so that Sioul’s mode silences the device whatever the system does.
apply 🔒
The system’s do-not-disturb as the reasons say now, on this device: on for each of Sioul’s modes that holds, off for the others (the layer does nothing when nothing changed); this device’s table written when what it says changed; the phone’s card told; on Android, an alarm at the next end. Called at the start, each minute, at once on a press, and after an exchange brought a change. Never in the background service’s process (Android), which asks the window’s process instead (steps).
apply_once 🔒
blocks 🔒
Health’s nights, naps and meals: as the window has them; in the background service’s process, without the day’s events (only the meals move for them, and reading every calendar at each step would cost a phone’s battery).
change 🔒
An action of the tab: the list changed, a contact opened, a permission asked… (verb, its JSON). Answers the tab again, with a line said, and whether something to share changed (the list, this device’s setting).
change_here 🔒
choose 🔒
One of the three states pressed here (rules::State; part 3 of “What reaches you”): Reachable for length (“30”, “60”, “120” minutes, “hours” until the hours you are in end, “tonight”, “off” until you turn it off: at the latest the night’s start, or waking at night), As usual, or Do not disturb for length minutes (“0” until turned off, “-1” until what now is for ends). Applied here, the status line shown again, the other devices told at once; a Reachable press releases what the phone holds (appnotes::review, at its next look).
closing 🔒
Sioul quits on a computer (its window closed, the tray’s Quit, SIGTERM): this device’s table as it then holds, for the other devices to say “On laptop: Sioul is closed.” and never “silenced” by an inhibition that ended with Sioul; sent by the exchange that follows (share::closing). Nothing on a phone, whose modes stay while Sioul is closed.
edit_people 🔒
The list changed; “” said, or why it could not be.
gated 🔒
While do-not-disturb holds from its switch or a focus session (a layer of the matrix of what reaches you): when it ends, when that is known (none: until turned off, or a session open-ended), and which of the two holds (the listener’s line in the phone’s log: “dnd (focus session)”); none otherwise.
gated_of 🔒
The same, of a reading already made (now).
gone_soon 🔒
A device forgotten, or its files removed, here: the devices gone noted again at the next exchange, not an hour later (review of part 3, I1).
heard 🔒
The other devices sharing, and when each was last heard from (Unix seconds).
heard_from_system 🔒
A change of this device’s own do-not-disturb, heard as it happened (Android’s receiver, Plasma’s Inhibited, GNOME’s switch), whatever caused it: a press of the switch here when it disagrees with what holds (rules::heard), applied, shown and sent at once; nothing when it agrees, which is what Sioul’s own changes look like when they come back (docs/do-not-disturb.md, “Both ways”). Whether it pressed. Any thread.
here_id 🔒
This device’s name in the sharing (share/here.toml), made once.
holds_others 🔒
Whether the switch or a focus session holds do-not-disturb now: a layer of the matrix of what reaches you (hours::attention_now), which says what waits then (as usual, the sites’ notifications and the suggestions to move; doses, codes asked for, events’ reminders and Health’s notices come, and Always through). Read again at most every five seconds: asked at every notification.
last_off 🔒
“Turned off on your phone at 14:02, outside Sioul.”: the switch’s latest press, when it is an “off” heard from a device’s own do-not-disturb within the last twelve hours; “” otherwise.
latest_press 🔒
The latest press of the switch known here (milliseconds): what a pause pressed now knew of (pause::start_pause), so that it ends that Reachable whatever the clocks (review of part 3, L2).
let_through 🔒
“Let what your phone holds through”, pressed on a computer (3.3): a release stamp in this device’s table; the phone lets through what it held before it, once, and the computer never learns what it was. Sent at once.
merge 🔒
moment 🔒
Do-not-disturb as the status line, the phone’s card and the background service’s notification say it: {on, why, global, manual, until, until_at (0: until switched off), line, why_line, details, everywhere, here, button, end_time, end_at}.
moment_of 🔒
name_of 🔒
A device named inside a sentence: “your phone”, a computer’s name, “another device”.
night_and_waking 🔒
When the night begins next (by day) and when the night you are in ends (at night), as Health knows them (Unix seconds): for Reachable’s ends.
note 🔒
The background service’s notification in words (steps::note): its title, what now is for and until when (“Leisure until 22:00”); then do-not-disturb here, as the status line says it while it holds, what this device’s own still holds while Sioul’s is off, else that it is off. And when what now is for ends (Unix seconds), for the service’s next step.
note_gone 🔒
At the window’s exchanges, at most once an hour (and at the one after a device was forgotten here: gone_soon): the devices the sharing has gone by a sealed fact written down (sioul_sync::share::asking), for the switch’s reading. Never on a dose’s path: the window’s own exchanges only.
now 🔒
Why do-not-disturb holds now, on every device alike.
phone_does 🔒
What this phone does itself, for whom Sioul’s modes let through: it screens calls (Sioul holds the role). A computer nothing. Nothing of the listener, though it may hold other apps’ notifications: Android plays a notification’s sound before any listener hears of it (docs/android.md, “Notifications from other apps”, Sound), so a contact’s message let through the mode and then held by Sioul would ring once in a pause or Free time; the mode is what keeps it silent. Calls differ: the screening answers before the phone rings.
press 🔒
The switch pressed here: on until until (Unix seconds; none, until turned off), or off; on every device once the sharing carries it. Applied by the caller (apply).
press_state 🔒
A press of one of the three states here, until until (Unix seconds), “until you turn it off” or not (open); applied by the caller.
press_via 🔒
A press here, saying where it came from (rules::VIA_SYSTEM: this device’s own do-not-disturb, heard as it changed; “”: the switch).
reach_inputs 🔒
What Reachable’s reading is made of beside the time: the switch, the pauses, the devices gone from the sharing, Health’s nights.
reachable 🔒
Reachable now, on every device alike (part 3 of “What reaches you”): since, until when, from which device. Asked at every notification: read again whenever one of its files changed or its end passed, never kept by time alone, so that a press brought from another device counts at once (review of part 3, F4).
reachable_ends 🔒
The ends Reachable may be pressed for now (Unix seconds; 0 none): the end of the hours you are in, the night’s start (or waking, at night), and whether it is night.
region 🔒
The numbers’ country, for numbers written without one.
release_stamps 🔒
What the phone is asked to let through, by the device that asks (rules::Switch::release_stamps): each device’s “Let what your phone holds through”, and the Reachable press that holds.
rest_now 🔒
Asleep (the night from winding down, a nap), and paused, now: for the background service’s rhythm, whatever the settings of do-not-disturb.
seen 🔒
setup 🔒
The tab’s own part, as JSON: what this device can do (the layer’s line and buttons, GNOME’s consent, Plasma’s word on the list’s mail), the list, and on a phone who is starred and the background service.
setup_with 🔒
sources 🔒
What the reasons’ sources say now (rules::sources_at, as every reader builds them).
stars 🔒
Who on the list is starred on this phone (READ_CONTACTS, never written): {permission, summary, people: [{id, name, state, contact}]}, the state “starred”, “not-starred”, “unknown” (no contact has their number), “no-number”.
stars_of 🔒
Java’s answer about the list’s people, in words: who is not starred here.
started 🔒
The window runs (at the start and each minute, from the pauses’ tick): kept, and this system’s own do-not-disturb followed (dnd::listen), once.
switch_here 🔒
The switch as this device reads it (rules::read_switch): the devices gone from the sharing read as As usual.
system_offers 🔒
The buttons beside a line of this device’s own do-not-disturb: on a phone, Android’s do-not-disturb settings, where the person turns it off or on again.
toggle 🔒
The switch pressed in the window: on for minutes (0: until turned off; -1: until what now is for ends), or off. Applied here, the status line shown again, and the other devices told at once.
toggle_here 🔒
The switch pressed from the phone’s quick settings (Sioul’s tile): on until turned off, or off, as it is not now; applied and sent at once.
told 🔒
A press made outside the window (a system’s change heard, the phone’s tile): the window’s status line at once and the other devices told; without the window (a phone’s receiver), the background service sends it.
tonight 🔒
Tonight: when the night begins next, by day, as Health knows it (Unix seconds); none at night, or with no night known (“Work until tonight”).
unblock 🔒
Someone put on Always through comes off the blocked list: blocked and Always through exclude each other (docs/attention.md, Q3). Whether they were on it.
wanted 🔒
What this device asks of its system now, in a few words, and the status line: the background service pokes the window’s process when either changed since it last did (steps).
when 🔒
“17:00”, “tomorrow at 07:00”.
with_unblocked 🔒
What a change said, and that someone came off the blocked list, when they did.
write_own 🔒
This device’s own table changed (its kind and name always set), under the file’s lock; written only when it changed. Sharing off, it is kept here all the same: the switch works on this device alone.

Type Aliases§

FileSeen 🔒
One file as a reading kept was read from: when it was last changed, its size, and on Unix its inode (each of these files is written beside and renamed: a new one at each change, even within the clock’s tick).