Add a floating focus Mini Timer#289
Open
caezium wants to merge 1 commit into
Open
Conversation
Adds an optional always-on-top pill that shows today's focused time and counts up live. Focused time is aggregated from analyzed timeline cards (everything that isn't idle or a distraction) using epoch timestamps, and the most recent focused segment is optimistically extended to now while the user is actively recording (not paused, not idle — a non-latching CGEventSource system-idle check). - Non-activating NSPanel, floats across Spaces incl. fullscreen, draggable, position remembered. Off by default. - Toggle from the menu bar (Show/Hide Focus Timer) and Settings > Other. New: ProductivityStats, ProductivityPreferences, MiniTimerWindowController, MiniTimerView, and a small epoch-based fetchTimelineActivity query.
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.
What
Adds an optional, always-on-top focus Mini Timer — a small floating pill that shows today's focused time and counts up live.
How it works
IdleorDistraction), using the epochstart_ts/end_tscolumns rather than the display text.CGEventSourcesystem-idle check). When the next batch lands, the processed total absorbs the gap, so the number stays smooth. The forward extension is capped so a stalled pipeline can't run it away.UX
NSPanelat floating level, joins all Spaces (incl. fullscreen), draggable, remembers its position. Off by default.Files
ProductivityStats,ProductivityPreferences,MiniTimerWindowController,MiniTimerView, and a small epoch-basedfetchTimelineActivityquery onStorageManager.AppDelegate(startup),StatusMenuView(menu toggle),SettingsOtherTabView(settings toggle).Builds against
main. The sharedProductivityStats/fetchTimelineActivityhelper is intentionally small so a companion distraction-nudges change can reuse it.