Skip to main content

Module quiet

Module quiet 

Source
Expand description

The time now, and what comes then (docs/areas.md). Five times: work and admin, the hours you set; meals and sleep, from Health; and leisure, every other time: evenings, days without hours, time off, a day closed early. Sleep first, then meals, then the hours. Two overrides, each until a time, kept in $XDG_STATE_HOME/sioul/quiet.toml: working late keeps work in view; done for the day brings leisure early, until work comes back. Outside work, work rests (quiet time); during sleep nothing disturbs, as usual: no notification but the doses you asked for. Two pauses come above them (docs/pauses.md, pause): the pause holds everything, whatever the time; Free time is leisure whatever the hour, sleep first, and may move the end of today’s work later.

What reaches you when, who and what, is one matrix (attention, docs/attention.md): its columns are these times, the pauses and two layers above them; the Porch’s mail is shown as it says (Attention::mail).

Detachment from work in the evening is what recovery needs most (Sonnentag & Fritz 2007, 2015); work cues in off-hours keep it from happening. Codes from verified senders still come at once: they are asked for.

Structs§

Blocks
What Health keeps free around now (docs/health.md, “Meals, rest and sleep”): the meals, naps and nights of today and tomorrow, each day’s changes applied, and which of them are set at all.
ByHours 🔒
What the hours alone say, meals and sleep aside.
Mode
What now is for, and until when.
Overrides
The overrides, each until a time (Unix seconds).
QuietTasks
What the task pages keep now (docs/areas.md): what the time is for, by each task’s area (its own, else its categories and projects). A call to an office fits work and admin hours, never leisure: offices keep business hours. In leisure (holidays, a day closed, evenings) and during a meal: only what is yours to enjoy, and what is yours either way (health). During sleep: no task at all.
Situation
What the task pages need of the moment: whether work rests, whether offices are open, the days without room for tasks.

Enums§

Reason
Why the time is what it is.

Functions§

after_today
When work comes back once you are done for today: the next working hours after today, past any time off; without hours, tomorrow at morning.
by_hours 🔒
The time by the hours, the overrides and time off: the hours of work and admin, leisure outside them. Meals and sleep come after (mode).
earliest 🔒
The earlier of two times.
end_of_next_workday
When “Work now” ends: once the next working day is over, today’s while its working hours are not; past any time off. Without working hours, at midnight. work are the working hours only.
mode
What now is for, and until when (docs/areas.md): sleep first (the night from winding down to waking, a nap), then meals, then the hours: “Done for today” is leisure, “A little longer” and “Work now” are work, time off is leisure, then working and admin hours; every other time is leisure. No working or admin hours at all: everything comes (Time::Any), meals and sleep aside. windows are the week’s hours of work and admin (Config::week_hours): an older Sioul’s free time is left aside.
next_work
When working hours next open after now, past any time off; None without hours.
personal_task
Whether a task is yours, outside work: one of its categories is among personal (case and accents aside), or one of its cases is marked as yours.
time_off_on
The time off that covers date, if any.
until_text
“17:00”, “tomorrow at 9:00”, “Monday 5 October at 09:00”.