Automatically switches notification status to Sleep at a configurable
start hour and back at a configurable end hour. Includes a new settings
screen with enable toggle and start/end hour controls. Disabled by
default (21:00-09:00). Also adds moon glyph to the default UI font so
it displays in the settings menu.
This feature draws on extensive community discussion across several
related PRs. The following feedback was reviewed and incorporated:
Adopted:
- "Quiet hours" naming (kieranc, PR InfiniTimeOrg#1461): renamed from "sleep setting"
/ "auto sleep" to avoid confusion with the existing sleep mode.
- Preserve notification state across transitions (Itai-Nelken, PR InfiniTimeOrg#1461):
quiet hours now saves the user's notification status (On/Off/Sleep)
before entering and restores it when exiting, instead of unconditionally
forcing On. Uses transient (non-persisted) state following the existing
bleRadioEnabled/dfuAndFsEnabledTillReboot pattern.
- Previous state was Sleep edge case (FintasticMan, PR InfiniTimeOrg#1461): if the
previous state was already Sleep when quiet hours began, it is restored
faithfully. FintasticMan suggested restoring to Off instead, but
preserving the actual state is more predictable and consistent.
- Alarm overrides quiet hours (FintasticMan, PR InfiniTimeOrg#1461): when an alarm
fires, quiet hours are exited so the alarm can wake the user. This
ensures alarms are never silenced by scheduled quiet hours.
- Disable wrist-lower-to-sleep during sleep mode (kieranc, PR InfiniTimeOrg#2415,
approved by NeroBurner): wrist-raise wake was already suppressed
during sleep mode but wrist-lower-to-sleep was not, which is
inconsistent. Moved the lower-wrist check inside the existing
!= Sleep guard per mark9064's code review suggestion to avoid a
duplicate condition check.
- Respect explicit user choices (chmeeedalf, PR InfiniTimeOrg#2002): if a user
manually changes notification status via QuickSettings during quiet
hours, that works normally; the original pre-quiet-hours state is
still restored when quiet hours end.
- Chimes suppressed during quiet hours: the existing chime handlers
already gate on notificationStatus != Sleep, so setting Sleep during
quiet hours suppresses chimes automatically with no additional code.
Not adopted:
- Separate auto-start/auto-stop toggles (Boteium, PR InfiniTimeOrg#1461): would let
a user manually enter sleep early but still auto-wake. Adds UI
complexity for a niche use case; a single toggle is simpler and aligns
with the InfiniTime vision of "prefer solid defaults over
customisability" (mark9064, PR InfiniTimeOrg#2230).
- Sleep Bluetooth checkbox (escoand, PR InfiniTimeOrg#1461): BLE control during sleep
is a separate security concern that deserves its own feature, not a
quiet hours sub-option (mark9064, PR InfiniTimeOrg#2230).
- Configurable sleep mode behaviors -- AOD, chimes, notifications, step
tracking (JustScott, PR InfiniTimeOrg#2230): maintainer mark9064 noted that sleep
mode means the user is sleeping, so allowing notifications/chimes/AOD
contradicts its purpose. The author agreed this belongs in forks, not
mainline.
- Red/dim screen during sleep (minacode/lman0, PR InfiniTimeOrg#1261): a larger UX
change outside the scope of notification scheduling.
- Vibration priority system (minacode, PR InfiniTimeOrg#1328): a proper priority
queue (phone > timer > alarm > notification) would be ideal for
centralized DND management, but requires a motor controller rework
that is a much larger effort.
- 30-minute or 15-minute granularity for quiet hours times (LinuxinaBit,
PR InfiniTimeOrg#1461; zischknall, PR InfiniTimeOrg#2227): hour granularity is sufficient for
scheduling sleep/wake times and keeps the UI simple.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Automatically switches notification status to Sleep at a configurable start hour and back at a configurable end hour. Includes a new settings screen with enable toggle and start/end hour controls. Disabled by default (21:00-09:00). Also adds moon glyph to the default UI font so it displays in the settings menu.
This feature draws on extensive community discussion across several related PRs. The following feedback was reviewed and incorporated:
Adopted:
"Quiet hours" naming (kieranc, PR add auto sleep #1461): renamed from "sleep setting" / "auto sleep" to avoid confusion with the existing sleep mode.
Preserve notification state across transitions (Itai-Nelken, PR add auto sleep #1461): quiet hours now saves the user's notification status (On/Off/Sleep) before entering and restores it when exiting, instead of unconditionally forcing On. Uses transient (non-persisted) state following the existing bleRadioEnabled/dfuAndFsEnabledTillReboot pattern.
Previous state was Sleep edge case (FintasticMan, PR add auto sleep #1461): if the previous state was already Sleep when quiet hours began, it is restored faithfully. FintasticMan suggested restoring to Off instead, but preserving the actual state is more predictable and consistent.
Alarm overrides quiet hours (FintasticMan, PR add auto sleep #1461): when an alarm fires, quiet hours are exited so the alarm can wake the user. This ensures alarms are never silenced by scheduled quiet hours.
Disable wrist-lower-to-sleep during sleep mode (kieranc, PR Disable LowerWrist during sleep mode #2415, approved by NeroBurner): wrist-raise wake was already suppressed during sleep mode but wrist-lower-to-sleep was not, which is inconsistent. Moved the lower-wrist check inside the existing != Sleep guard per mark9064's code review suggestion to avoid a duplicate condition check.
Respect explicit user choices (chmeeedalf, PR settings: Add sleep/wake notification times #2002): if a user manually changes notification status via QuickSettings during quiet hours, that works normally; the original pre-quiet-hours state is still restored when quiet hours end.
Chimes suppressed during quiet hours: the existing chime handlers already gate on notificationStatus != Sleep, so setting Sleep during quiet hours suppresses chimes automatically with no additional code.
Not adopted:
Separate auto-start/auto-stop toggles (Boteium, PR add auto sleep #1461): would let a user manually enter sleep early but still auto-wake. Adds UI complexity for a niche use case; a single toggle is simpler and aligns with the InfiniTime vision of "prefer solid defaults over customisability" (mark9064, PR Add sleep settings #2230).
Sleep Bluetooth checkbox (escoand, PR add auto sleep #1461): BLE control during sleep is a separate security concern that deserves its own feature, not a quiet hours sub-option (mark9064, PR Add sleep settings #2230).
Configurable sleep mode behaviors -- AOD, chimes, notifications, step tracking (JustScott, PR Add sleep settings #2230): maintainer mark9064 noted that sleep mode means the user is sleeping, so allowing notifications/chimes/AOD contradicts its purpose. The author agreed this belongs in forks, not mainline.
Red/dim screen during sleep (minacode/lman0, PR Add sleep mode #1261): a larger UX change outside the scope of notification scheduling.
Vibration priority system (minacode, PR Vibration scheduler #1328): a proper priority queue (phone > timer > alarm > notification) would be ideal for centralized DND management, but requires a motor controller rework that is a much larger effort.
30-minute or 15-minute granularity for quiet hours times (LinuxinaBit, PR add auto sleep #1461; zischknall, PR Chime vibration patterns and 15 minute option #2227): hour granularity is sufficient for scheduling sleep/wake times and keeps the UI simple.