Repository navigation
Add screen-time health breaks, release 0.1.5 - #11
Merged
Merged
Conversation
Matinee now watches how long you've been at the Mac, independent of the focus timer, and shows the full-screen overlay when a break is due: look away for a one-minute countdown (every 20 min), drink water (45 min) and stand up (60 min). Each can be switched off or set to a different interval in the menu. Stepping away for a few minutes, or the Mac sleeping, counts as taking the break. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SxiPF75k29ZLVHYLDSZuFz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Nahid Hassan · project thread
Before: Matinee only reminded you when a focus timer ended, so if you weren't running a timer you could sit at the screen for hours without a break.
After: Matinee tracks continuous screen time in the background and shows the full-screen overlay when a break is due, whether or not a timer is running. "Look away" (every 20 min) shows a one-minute countdown and closes itself; "Drink water" (every 45 min) and "Stand up" (every 60 min) stay until you click Done. Each has an on/off switch, an interval picker and a preview button under "Screen-time breaks" in the menu. Stepping away for a few minutes (3 for eyes, 5 for the others) or the Mac sleeping counts as taking the break. The version goes to 0.1.5 so merging publishes a release.
How:
HealthBreakScheduleis a pure struct that adds the time between 30-second polls to each enabled break's count, resets a count when idle time (fromCGEventSource.secondsSinceLastEventType, no permission needed) passes that break's threshold, and returns the highest-priority due break while clearing the others due with it.HealthBreaksowns the polling, persists settings, and resets on sleep, display sleep and fast user switching.Remindergains an optionalduration(auto-dismiss with countdown) and an optional action. A health break is skipped if another overlay is already showing.To test on a Mac: use the eye preview button to see the countdown; set "Look away" to every 10 min and keep using the Mac; then leave it alone for 3+ minutes and check the count starts over.
Generated by Claude Code