This program tracks the runtime of specified applications, organizing sessions into projects for better management. Users can create multiple projects, each containing multiple tracking sessions, providing comprehensive time tracking and organization capabilities.
To install, follow the instructions for your platform found here:
- Add integrations with professional applications
- Optimize everything
- Add support for tracking more than one executable per session
- Add a better way to filter out non-GUI apps on macOS
- Full linux support with packages
AppUsageGUI is a cross-platform desktop application built with Python and Tkinter that monitors application usage time with project-based organization. The application works by:
- Project Organization: Users create projects to organize related tracking sessions, with each project containing multiple sessions
- Session Creation: Before tracking begins, users select a project and name their session, establishing clear organization upfront
- Process Monitoring: Uses the
psutillibrary to detect running applications and monitor their process status - Time Tracking: Implements a precise time tracker that runs in a separate thread, capable of pausing and resuming
- Session Management: Creates named sessions within projects that can be saved, loaded, and continued across application restarts
- Data Persistence: Saves session data with integrity checking using hash verification, organized by project directories
- Cross-Platform Support: Handles Windows and macOS differences in process detection and GUI application filtering
The application follows a Model-View-Controller (MVC) architecture with separate logic and GUI components, ensuring clean separation of concerns and maintainable code.
AppUsageGUI organizes your time tracking data using a hierarchical project-based structure. This allows you to group related sessions together and manage your time tracking more effectively.
AppUsageGUI/
├── Sessions/ # Standalone sessions (No Project)
│ ├── session1.dat
│ ├── session1.hash
│ ├── session2.dat
│ └── session2.hash
├── Projects/ # Project-organized sessions
│ ├── Web Development/ # Custom project
│ │ ├── frontend_work.dat
│ │ ├── frontend_work.hash
│ │ ├── backend_api.dat
│ │ └── backend_api.hash
│ ├── Design Projects/ # Another custom project
│ │ ├── logo_design.dat
│ │ ├── logo_design.hash
│ │ └── ui_mockup.dat
│ └── projects_metadata.json # Project information and metadata
└── User/
├── config.dat # User configuration
└── apps.dat # Tracked applications list
graph TD
A[AppUsageGUI Application] --> B[Sessions Directory]
A --> C[Projects Directory]
B --> B1[Session 1]
B --> B2[Session 2]
B --> B3[Session N...]
C --> D[Web Development]
C --> E[Design Projects]
C --> F[Other Projects...]
D --> D1[Frontend Work]
D --> D2[Backend API]
D --> D3[Database Design]
E --> E1[Logo Design]
E --> E2[UI Mockup]
E --> E3[Brand Guidelines]
B1 --> B1A[session1.dat]
B1 --> B1B[session1.hash]
D1 --> D1A[frontend_work.dat]
D1 --> D1B[frontend_work.hash]
style A fill:#e1f5fe
style B fill:#fff3e0
style C fill:#f3e5f5
style D fill:#e8f5e8
style E fill:#fce4ec
- Projects: Top-level containers that group related sessions together, stored in the
Projects/directory - Standalone Sessions: Sessions not assigned to any project, stored directly in the
Sessions/directory - "No Project": A UI label for sessions that aren't assigned to any project (not an actual project directory)
- Sessions: Individual time tracking instances that can belong to a project or exist standalone
- Session Files: Each session consists of a
.datfile (data) and.hashfile (integrity check) - Metadata: Project information is stored in
projects_metadata.jsonincluding creation dates and session counts
Each session file contains comprehensive tracking information:
{
'app_name': 'Visual Studio Code', # Application being tracked
'time_spent': 7200.5, # Total time in seconds
'session_version': '2.0.0', # App version when created
'config': {...}, # Tracking configuration
'time_captures': [...], # Detailed time capture data
'project_name': 'Web Development', # Project this session belongs to
'created_date': '2024-01-15T10:30:00', # When session was created
'last_modified': '2024-01-15T12:30:00' # Last modification time
}- Better Organization: Group related work sessions together
- Easier Management: Quickly find and manage sessions by project
- Project Analytics: View total time spent on specific projects
- Scalability: Handle many sessions without interface clutter
- Backup & Restore: Backup entire projects or migrate between systems
- Future Extensibility: Foundation for project-specific settings and reporting
- Project Management: Organize sessions into projects for better organization and management
- Session Tracking: Track the total runtime of any executable with named sessions
- Session Continuation: Continue from previous sessions within any project
- User Customizable Rules: Configure custom tracking rules and application filtering
- Cross-Platform Support: Works on Windows and macOS (macOS installation requires permissions)
- Data Integrity: Session data integrity with hash verification
- Pause/Resume: Pause and resume functionality during active tracking
- Smart Detection: Automatic detection of GUI applications vs background processes
- Project Analytics: View total time spent across all sessions within a project
- Migration Support: Automatic migration of existing sessions to the new project structure
The application now uses a streamlined workflow where users select their project and session name before starting the timer:
- Main Menu → "Start new session"
- Create Session Window → Select project and enter session name
- Select App Window → Choose application to track
- Tracker Window → Timer runs with pause/resume controls
- Save Window → Save session data
- Session Total Window → View results and statistics
- Main Menu → "Manage Projects" → View all projects with session counts and total time
- Create New Project → Set up new project containers
- View Project Sessions → Manage sessions within specific projects
- Delete Projects → Remove projects and all associated sessions (with confirmation)
- Main Menu → "Continue previous session" → Navigate through projects to find and resume sessions
- Sessions can be continued across application restarts with full state preservation
src/main.py- Application entry point that initializes the Tkinter root window, applies dark mode theming, sets up the application icon, and launches the splash screensrc/_version.py- Contains the application version numbersrc/_path.py- Handles resource path resolution for bundled applications
gui_root.py- Main GUI controller that manages the application's window system, initializes all screens, and handles navigation between different windowslogic_root.py- Central logic controller that coordinates all tracking components (AppTracker, TimeTracker, FileHandler, ProjectHandler, MouseTracker)
app_tracker.py- Monitors running processes using psutil, filters GUI applications from background processes, and maintains lists of available applications for trackingtime_tracker.py- Implements precise time tracking with pause/resume functionality, runs in a separate thread for accuracy, and captures timing data for analysisfile_handler.py- Manages session data persistence, handles file I/O operations with pickle serialization, and implements data integrity checking using hash verificationproject_handler.py- Manages project creation, deletion, and organization, handles project metadata and session countsuser_trackers.py- Contains additional tracking modules like MouseTracker for user activity monitoring and ResolveProjectTracker for specific application integration
main_window.py- Main menu screen providing options to start new sessions, manage projects, continue previous sessions, or configure settingsprojects_window.py- Project management interface for viewing, creating, and deleting projects with session counts and total timecreate_project_window.py- Project creation dialog with name validation and project setupproject_sessions_window.py- Project-specific session management interface for viewing and managing sessions within a projectcreate_session_window.py- Session creation dialog with project selection, name validation, and session setupselect_app_window.py- Application selection interface with search functionality and real-time app list updatestracker_window.py- Active tracking display showing elapsed time, pause/resume controls, and stop functionalitysessions_window.py- Global session management interface for loading, analyzing, and deleting saved sessions across all projectssave_window.py- Session saving interface with data confirmationsession_total_window.py- Session summary display showing total tracked time and statisticstracker_settings_window.py- Configuration interface for custom tracking rules and application filteringsplash_screen.py- Application startup splash screen with loading animation
file_utils.py- File system operations, directory management, session file handling, project directory management, and data integrity functionstime_utils.py- Time formatting utilities for displaying elapsed time in human-readable formatlogic_utils.py- Threading utilities and decorators for running functions in separate threadstk_utils.py- Tkinter-specific utilities including window centering and dark mode detection
icon.ico/icon.icns- Application icons for Windows and macOS respectivelyicon-resources/- Source files for application icons
setup.py- Python package configuration and installation setupbuild.py- Build script for creating distributable packagesrequirements.txt- Python dependencies listpytest.ini- Testing configurationtests/- Unit tests for application components including project management and session creation workflows