Skip to content

Repository files navigation

Time Tracker

A desktop time tracking application built with PyQt5. Track how you spend your hours across multiple projects with daily, weekly, and monthly summaries and interactive charts.

Features

  • Multi-project tracking -- Create and delete projects. Switch between them with a single click.
  • Daily view -- Start/stop timer, quarter-hour activity bars for the last 5 days, navigate to any past day via the 📅 Jump to Date button or mouse wheel. Keyboard shortcuts: Left/Right arrow keys to shift days, Ctrl+G to open the date picker.
  • Weekly & monthly summaries -- Aggregated hours with averages and breakdowns by project.
  • Charts -- Daily, weekly, and monthly stacked bar charts powered by Matplotlib. Chart type switches automatically on selection.
  • System tray -- Minimize to tray, keep tracking in the background, restore with a double-click.
  • Auto-save & crash recovery -- Active sessions are periodically saved; recover gracefully after unexpected exits (including correct midnight splitting on recovery).
  • CSV export -- Export all tracked data to CSV for use in spreadsheets or other tools.
  • Session editing -- Right-click any session to edit start/end times or delete it.
  • Keyboard shortcuts -- Ctrl+Space to toggle tracking, Ctrl+15 to switch views, Ctrl+E to export, Ctrl+G to jump to date.
  • Customizable UI -- Configurable color themes, day/session time thresholds, and date format (European/American). Theme and thresholds apply consistently across all views.

Requirements

  • Python 3.9+
  • PyQt5
  • Matplotlib

Getting Started

pip install -r requirements.txt
python -m time_tracker

Project Structure

time_tracker/
├── __init__.py           # Package marker
├── __main__.py           # Entry point
├── app.py                # Main TimeTrackerApp class
├── constants.py          # Themes, button styles, default settings
├── utils.py              # Validation, data directory, icon helpers
├── dialogs.py            # Project selection dialog
├── data.py               # Data persistence, caching, project filtering
├── ui_setup.py           # Window setup, taskbar, view switching
├── daily_view.py         # Daily view with quarter-hour bars
├── weekly_view.py        # Weekly summary and day details
├── monthly_view.py       # Monthly summary with week breakdowns
├── charts_view.py        # Matplotlib charts (daily, weekly, monthly)
├── settings_view.py      # Settings UI with color and threshold config
├── tracking.py           # Start/stop tracking and timer
└── tray.py               # System tray, auto-save, recovery, export

Building a Standalone Executable

The included build script uses PyInstaller to create a single-file executable:

python make_executable.py

The executable will be placed in the dist/ directory.

Data Storage

Time tracking data is stored in a platform-appropriate location:

Platform Path
Windows %LOCALAPPDATA%\TimeTracker\
Linux ~/.local/share/TimeTracker/
macOS ~/Library/Application Support/TimeTracker/

Each project's sessions are stored in separate JSON files. Settings and project lists are stored alongside them.

License

MIT

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages