A Windows tray application for tracking time spent in user-selected applications, with global hotkey support, notifications, a settings GUI, and JSON server for hardware stats.
- Tray icon with right-click menu
- Register a global hotkey (default: Win+Shift+L) to add the current app to the tracked list
- Prompt for a custom name when adding an app
- Tracks time spent in each app (even if not focused)
- Notifications when apps are added
- Settings window to view/remove tracked apps and edit the hotkey
- Data is saved in
trackedapps.json - Serves hardware stats and tracked app info via JSON (for frontend dashboard)
- Windows 10/11
- .NET Framework 4.7.2+ or .NET 6+
- Visual Studio 2019/2022 or .NET CLI
- NHotkey.WindowsForms
- System.Text.Json
- Microsoft.VisualBasic (for InputBox prompt)
Install these via NuGet Package Manager or with the CLI:
dotnet add package NHotkey.WindowsForms
dotnet add package System.Text.Json
dotnet add package Microsoft.VisualBasic
- Open
OpenHardwareMonitorJsonServer.slnin Visual Studio. - Restore NuGet packages (right-click solution > Restore NuGet Packages).
- Build the solution (Ctrl+Shift+B).
- Run the project (F5 or Ctrl+F5).
- Open a terminal in the
openhardwaremonitor-json-server/OpenHardwareMonitorJsonServer/directory. - Run:
dotnet restore dotnet build dotnet run
- The tray icon will appear in the system tray.
- Press Win+Shift+L to add the currently active app to the tracked list. You will be prompted for a name (leave blank to use the window title).
- Right-click the tray icon and select Settings to view or remove tracked apps.
- Tracked time is saved automatically in
trackedapps.jsonin the app's working directory.
- The frontend dashboard (
hwmonitor/index.html) uses an IP address to connect to the backend for hardware stats and app info. - To change the PC IP:
- Open
hwmonitor/index.htmlin a text editor. - Find the line with the iframe or JavaScript URL, e.g.:
<iframe id="pc-stats-iframe" src="http://YOUR_PC_IP:8885/dashboard.html"></iframe>
- Replace
YOUR_PC_IPwith the local IP address of the PC running this backend. - Save the file and reload it in your browser.
- Open
- Change the default hotkey: Edit the registration in
TrayApp.cs. - Add more tracked app features: Extend
TrackedAppsManager.csandTrackedApp.cs. - Change notification behavior: Edit
TrayApp.csnotification logic. - Change JSON server port or endpoints: Update the backend code to serve on a different port or with different data.
- If you get errors about duplicate class or namespace definitions, make sure you have deleted any old versions of the files from your project.
- If the hotkey does not work, ensure no other app is using the same hotkey combination.
- If you see errors about missing dependencies, double-check that all NuGet packages are installed.
- If the frontend dashboard does not update, make sure the backend is running and the IP/port are correct in the HTML.
MIT