PC Stats records mouse click and window activity on Linux and visualises it in a browser dashboard. The collector runs locally, writes data to a SQLite database, and the dashboard reads that database to show heatmaps, charts, and app usage statistics.
Your data never leaves your device. Collection happens locally, the database is stored locally, and the dashboard reads the selected database in your browser.
- Mouse click position across all detected monitors
- Click timestamp
- Click button: left, right, or middle
- Current monitor layout and monitor names
- Open application windows
- Active app and current desktop/workspace
- Window position and size snapshots
The collector writes data to:
~/.local/share/pc-stats/stats.dbCollector settings are stored at:
~/.local/share/pc-stats/config.yamlThe database contains:
clicks(id, timestamp, x, y, button)monitors(id, name, x, y, width, height)window_snapshots(id, timestamp, active, current_desktop)windows(ssid, name, pid, desktop, x, y, width, height)
The hosted dashboard is available at:
https://pc-stats.dubbyy.com
Use Import Data and select your stats.db file. The dashboard runs in the browser using sql.js; imported databases are cached locally in the browser so the last imported file can be reopened automatically. The database is not uploaded anywhere.
You can also load a database URL with the db query parameter:
https://pc-stats.dubbyy.com?db=https://example.com/stats.db
An example database is included at:
examples/stats.db
The dashboard currently includes:
- Click heatmap
- Timeline filtering
- Button filtering
- Button breakdown chart
- Monitor breakdown chart
- Hourly activity chart
- Daily activity chart
- Windows section
- App frequency, focus, and screen dominance statistics
- Window geometry visualisation
- Desktop/workspace breakdown
From the dashboard directory:
npm install
npm run devBuild the static dashboard with:
npm run buildThe static build is written to:
dashboard/buildThe collector runs in the background to collect the data. It also has a small status window.
The status window shows pending/stored clicks, the current mouse device, the last active app, and the number of window snapshots taken. It also includes:
- Snapshot interval setting
- Pause/resume tracking
- Stop button
Due to the low-level nature of the input monitoring, the collector is Linux only.
| Platform | Status |
|---|---|
| KDE Wayland | Supported |
| X11 | Supported |
| GNOME Wayland | Partial |
| Hyprland | Partial |
| Sway | Partial |
| Other | Unsupported |
KDE Wayland uses KWin scripting for window data. X11 uses Xlib/EWMH window properties. Hyprland uses hyprctl. Sway uses swaymsg. GNOME Wayland has limited support because global window information generally requires a GNOME Shell extension.
The collector needs permission to read input devices. Add your user to the input group:
sudo usermod -aG input $USERLog out and back in after running that command.
Some systems may also require python-xlib, PyYAML, and Qt/PySide runtime dependencies for source builds.
Clone the repository and install collector dependencies:
git clone https://github.com/dubbyy1/pc-stats.git
cd pc-stats/collector
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python main.pyFrom the collector directory:
source .venv/bin/activate
pip install pyinstaller
pyinstaller main.py --onefile --name pc-statsThe binary will be created at:
collector/dist/pc-statsRun it with:
./dist/pc-stats
