Create focus_tracker.10s.py #2151
Open
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.
Adds a new plugin focus_tracker.10s.py that helps users maintain focus by monitoring their active window during work sessions. It acts as a system-aware timer that detects if the user has switched to a distracting application.
Features:
Active Window Monitoring: Uses osascript to detect the frontmost application.
Visual Feedback: The menu bar icon changes color (Green for work, Red for distraction) based on the active app.
Session Tracking: Tracks the duration of the current "Deep Work" session.
State Persistence: Uses a temporary file to ensure the timer persists across xbar refreshes.
Customizable: Users can easily edit the WORK_APPS and DISTRACTION_APPS lists within the script to match their workflow.