A small macOS utility to help you control working time, stay focused using Pomodoro intervals, and understand your app usage.
FocusTimer is designed for individuals who work on their Macs and want to enhance productivity, manage distractions, and maintain a healthy work-life balance through structured work intervals.
- Overview
- ✨ Features
- 📸 Screenshots
- 🖥️ Requirements
- 🚀 Installation
- 🛠️ How to Use
- ⚙️ Configuration
- 🧑💻 For Developers
- 🛣️ Roadmap
- 🤝 Contributing
- 📜 License
FocusTimer is a native macOS application built with Swift and AppKit that provides a simple yet effective way to manage your work sessions. It combines a Pomodoro timer with active application tracking to give you insights into how you spend your time during focus blocks.
The core idea is to help you break down work into manageable intervals, separated by short breaks, encouraging concentration and preventing burnout.
- Pomodoro Timer: Customizable work, short break, and long break durations.
- Session Control: Manually start and stop overall work tracking.
- App Usage Tracking: Monitors the applications you use during your "work" intervals. (Your data stays local!)
- Notifications: Get alerted when it's time to switch between work and break periods.
- Minimalist Design: Unobtrusive interface that stays out of your way.
- Local Data Storage: All your session and app usage data is stored locally on your Mac in JSON format. (Located at
~/Library/Application Support/FocusTimer/data/cycles/) - Native macOS Experience: Built with Swift and AppKit for optimal performance and system integration.
Coming soon
- macOS 10.15 (Catalina) or later.
- Go to the Releases page of this repository.
- Download the latest
FocusTimer.dmgorFocusTimer.app.zipfile. - If you downloaded a
.dmg, open it and dragFocusTimer.appto your Applications folder. - If you downloaded a
.zip, unzip it and moveFocusTimer.appto your Applications folder. - Important: The first time you open the app, you might need to right-click (or Control-click) the app icon, select "Open," and then confirm in the dialog box, as the app might not be signed by an identified developer (unless you go through the Apple Developer Program).
- Permissions: The app will require permission for sending notifications. Please grant this when prompted for the best experience.
See the For Developers section below.
- Launch FocusTimer.
- (Optional) Configure Timer Durations: Access settings (if available in UI, or see Configuration for
preferences.json). By default, it might use standard Pomodoro timings (e.g., 25 min work, 5 min short break, 15 min long break). - Start a Pomodoro Session: Click the "Start" or "Start Pomodoro" button.
- The timer will begin counting down the first work interval.
- During work intervals, the app you are actively using will be logged.
- Follow the Prompts:
- When a work interval ends, you'll receive a notification to take a break.
- When a break ends, you'll be notified to start the next work interval.
- Pausing/Stopping: You can typically pause the current interval or stop the entire Pomodoro session.
- Viewing Data: Your activity data (Pomodoro cycles and app usage during work) is stored locally. (Currently, you might need to inspect the JSON files directly at
~/Library/Application Support/FocusTimer/data/cycles/. Future versions might include in-app reporting.)
FocusTimer stores its primary data and potentially its settings locally.
- Pomodoro Cycles & App Usage: Stored as individual JSON files in
~/Library/Application Support/FocusTimer/data/cycles/. Each filecycle_{UUID}.jsonrepresents one completed Pomodoro cycle, including app activity during work phases. - Application Settings: User-configurable settings (like Pomodoro durations, sound preferences) are managed via a
preferences.jsonfile located at~/Library/Application Support/FocusTimer/settings/preferences.json. You can manually edit this JSON file if needed (be cautious with formatting). Example structure:The application will use default values if this file is missing or corrupted.{ "workDurationMinutes": 25, "shortBreakMinutes": 5, "longBreakMinutes": 15, "soundEnabled": true }
This project is built using Swift and AppKit for macOS.
The source code is organized into logical groups:
App/: AppDelegate, Assets, Info.plist.Models/: Swiftstructs for data representation (e.g.,PomodoroCycleRecord,AppActivityLog).DataManagement/:DataManager.swiftfor handling local JSON data storage.PomodoroEngine/: Core logic for the Pomodoro timer states and transitions.AppTracking/:AppActivityMonitor.swiftfor tracking active applications.Utilities/: Helper functions and extensions.
- Prerequisites:
- macOS 10.15 (Catalina)
- Xcode 11 or later
- Swift 5.1 or later
- Clone the Repository:
git clone [https://github.com/marcusvx/FocusTimer.git](https://github.com/marcusvx/FocusTimer.git) cd FocusTimer - Open in Xcode:
Open the
FocusTimer.xcodeprojfile in Xcode. - Build and Run:
Select a target (your Mac) and click the "Run" button (or press
Cmd+R).
This is an early version. Potential future features include:
- In-app settings UI for Pomodoro durations and other preferences.
- Visual reports/charts for time spent and app usage.
- Customizable notification sounds.
- Task list integration for Pomodoro cycles.
- Optional cloud synchronization for data backup and cross-Mac usage.
- Menu bar integration for quick access.
- More detailed app usage statistics (e.g., time per app).
Contributions are welcome! If you'd like to contribute, please:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourAmazingFeature). - Make your changes.
- Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/YourAmazingFeature). - Open a Pull Request.
Please ensure your code adheres to the existing style and includes tests if applicable.
This project is licensed under the MIT License.