An ultra-lightweight, native digital wellbeing and active screen time monitor for Windows. Runs unobtrusively inside Windows Explorer via Windhawk with zero background telemetry, minimal memory usage, and no external runtime dependencies.
- Overview
- Key Features
- Performance & Architecture
- Installation Guide
- Configuration Reference
- Data Storage & Schema
- Privacy & Security Guarantee
- Compiling from Source
- Author & License
Modern operating systems often obscure productivity data behind cloud sync services or cumbersome background suites. TimeTrack takes a minimalist, systems-first approach:
- Injected directly into
explorer.exeusing native Win32 APIs. - Operates strictly on your local machine with zero network activity.
- Generates transparent, human-readable JSON logs for personal analytics or integration with third-party dashboards.
Tracks the currently focused window using Win32 event queries. Session duration and switch counts are recorded per executable (e.g., chrome.exe, Code.exe).
- Input Inactivity: Automatically pauses duration accumulation when no mouse or keyboard events are registered within the user-defined threshold (default: 120 seconds).
- Session Locking (
Win + L): Accurately detects workstation lock states and secure desktop switches (OpenInputDesktop), ensuring locked screen hours are excluded from usage data.
Inspects Windows 10/11 Universal Windows Platform (UWP) host containers (ApplicationFrameHost.exe) to resolve underlying application binaries (such as SystemSettings.exe or CalculatorApp.exe) rather than generic container names.
- Real-Time Tooltip: Hover over the tray icon to view current daily screen time, active application, and idle state.
- Context Menu: Right-click to inspect today's top 5 most used applications, open the storage folder in File Explorer, or reset daily statistics.
- Dismissal Handling: Implements standardized Win32 menu dismissal routines (
WS_POPUPhierarchy withPostMessage(WM_NULL)) for seamless desktop interaction.
- Automatically detects midnight day transitions and archives the previous day's metrics to
history/YYYY-MM-DD.json. - Persists current metrics periodically to disk via atomic file replacement (
.tmpto.jsonrename), protecting against data corruption during abrupt shutdowns.
Unlike standalone tracking utilities built on Electron, Python, or the JVM, TimeTrack executes as a lightweight native C++ extension inside Windows Explorer.
| Metric | TimeTrack (C++ Windhawk Mod) | Typical Standalone Tracker |
|---|---|---|
| RAM Consumption | < 4 MB | 80 MB – 250 MB+ |
| CPU Utilization | ~0.0% (1s tick polling) | 0.5% – 2.0% |
| Network Requests | 0 (Strictly Offline) | Cloud analytics / telemetry |
| Startup Overhead | Native DLL Injection | Process bootstrap & window render |
| Dependencies | None (pure Win32 SDK) | Web runtimes / framework DLLs |
- Ensure Windhawk (v1.4 or later) is installed.
- Open the Windhawk user interface.
- Open the menu (⋮) in the upper right corner and navigate to Advanced > toggle Developer mode to ON.
- In the Mods tab, select Create New Mod.
- Set the mod ID to
timetrack. - Replace the boilerplate code with the complete contents of
timetrack.wh.cpp. - Click Compile and run.
- The TimeTrack indicator will appear in your system tray immediately.
Settings can be adjusted on the fly through the Settings tab in Windhawk. Changes are applied automatically via dynamic mod reloading.
| Setting Name | Key | Type | Default | Description |
|---|---|---|---|---|
| Inactivity timeout | idleThresholdSeconds |
Integer | 120 |
Duration (in seconds) of input inactivity required before screen time tracking pauses. |
| Auto-save interval | saveIntervalSeconds |
Integer | 30 |
Frequency (in seconds) at which active tracking metrics are flushed to local storage. |
| Show System Tray Icon | showTrayIcon |
Boolean | true |
Toggles the visibility of the TimeTrack icon in the taskbar notification area. |
All metrics are stored locally under your dedicated Windhawk storage path or %LocalAppData%\TimeTrack\.
%LocalAppData%\TimeTrack\
├── timetrack_today.json # Current active day's usage
└── history\
├── 2026-10-20.json # Archived historical records
├── 2026-10-21.json
└── ...
{
"date": "2026-10-23",
"totalScreenTimeSeconds": 14520,
"totalScreenTimeFormatted": "4h 2m 0s",
"lastUpdated": "2026-10-23 16:30:00",
"appCount": 3,
"apps": [
{
"exe": "Code.exe",
"seconds": 8400,
"formatted": "2h 20m",
"focusCount": 42
},
{
"exe": "chrome.exe",
"seconds": 5100,
"formatted": "1h 25m",
"focusCount": 65
},
{
"exe": "WindowsTerminal.exe",
"seconds": 1020,
"formatted": "17m",
"focusCount": 19
}
]
}- Zero Network Activity: TimeTrack contains no networking libraries and issues no socket connections, HTTP requests, or external telemetry pings.
- Local Sovereignty: All gathered metrics remain exclusively on your computer in standard JSON format.
- Non-Invasive Process Inspection: Window inspection utilizes restricted queries (
PROCESS_QUERY_LIMITED_INFORMATION), reading only module filenames and top-level handles without memory scanning or keystroke recording.
To verify or compile the mod directly using Windhawk's embedded Clang toolchain:
& 'C:\Program Files\Windhawk\Compiler\bin\clang++.exe' `
-DWH_MOD `
-DWH_EDITING `
-target x86_64-w64-mingw32 `
-I "C:\Program Files\Windhawk\Compiler\include" `
-c timetrack.wh.cpp `
-o timetrack.o- Author: Dev-StudioCode
- License: Licensed under the MIT License. Free for personal and commercial use.