Skip to content

Add a sleep timer#865

Open
juansegnana wants to merge 1 commit into
kyleneideck:masterfrom
juansegnana:feature/sleep-timer
Open

Add a sleep timer#865
juansegnana wants to merge 1 commit into
kyleneideck:masterfrom
juansegnana:feature/sleep-timer

Conversation

@juansegnana

Copy link
Copy Markdown

Adds a "Sleep Timer" menu with durations from 15 min to 2 h. When the timer expires, BGM pauses the selected music player and (optionally, on by default) mutes BGMDevice's output. The menu title shows the remaining time while open.

The mute-on-expiry choice persists via a new sleepTimerMutesOutput user default.

Testing

  1. Pick a duration from the Sleep Timer menu.
  2. Play some audio and wait for expiry → the music player pauses and the output mutes.

Add a "Sleep Timer" menu item, below the auto-pause item, with a submenu
of durations (Off, 15/30/45 minutes, 1/1.5/2 hours). When the countdown
ends, BGMApp pauses the selected music player and, if enabled, mutes
BGMDevice's output so everything goes silent.

The submenu also has a "Mute Output When Timer Ends" toggle, persisted in
BGMUserDefaults (default on). The parent item's title shows the remaining
time while a timer is active. The remaining time itself is not persisted
across app restarts.
@juansegnana juansegnana force-pushed the feature/sleep-timer branch from 3709b59 to 4992c21 Compare July 10, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant