Track your usage in hyprland
  • TypeScript 72.7%
  • C++ 15.2%
  • CSS 8.9%
  • Shell 1.6%
  • Python 0.7%
  • Other 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alex af5a4328d0 fix(gui): color activity heatmap by relative intensity
Absolute 15/30/45-minute buckets painted week/month cells as Peak;
scale the ramp against the busiest cell and fill whole tiles again.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 11:34:01 +02:00
assets fix(gui): read matugen SCSS only, drop colors.json layer 2026-08-26 23:35:30 +02:00
LLM fix(gui): read matugen SCSS only, drop colors.json layer 2026-08-26 23:35:30 +02:00
scripts refactor(matugen): drop install script, watch palette output live 2026-08-26 23:31:22 +02:00
src fix(gui): color activity heatmap by relative intensity 2026-09-09 11:34:01 +02:00
third_party/nlohmann feat: add Niri compositor support and optional lock tracking 2026-09-07 20:45:17 +02:00
.claude chore: desktop-only repo hygiene — drop Nix, unify TODO, centralize archives 2026-08-26 18:06:20 +02:00
.gitignore chore: gitignore delegation.md session handoff scratch 2026-08-26 23:56:58 +02:00
AUTOCOLOR_GUIDE.txt feat: M3 UI overhaul, daemon JSON logging, Lua-era IPC, PKGBUILD 2026-05-18 16:10:52 +02:00
CLAUDE.md chore: desktop-only repo hygiene — drop Nix, unify TODO, centralize archives 2026-08-26 18:06:20 +02:00
CMakeLists.txt add: readme, license, flake.nix and assets & update: build script 2026-02-17 18:57:56 +05:30
GEMINI.md chore: desktop-only repo hygiene — drop Nix, unify TODO, centralize archives 2026-08-26 18:06:20 +02:00
install.sh feat: M3 UI overhaul, daemon JSON logging, Lua-era IPC, PKGBUILD 2026-05-18 16:10:52 +02:00
LICENSE add: readme, license, flake.nix and assets & update: build script 2026-02-17 18:57:56 +05:30
PKGBUILD feat(gui): lock/unlock card and fix empty time chart 2026-09-07 21:16:51 +02:00
README.md feat: add Niri compositor support and optional lock tracking 2026-09-07 20:45:17 +02:00
TODO.md feat(gui): resolve Steam app IDs to game titles via Store API 2026-08-26 23:53:37 +02:00

hyprwatcher

"Big Brother, but you asked for it."

hyprwatcher

License Platform Language

A time-tracking suite for Hyprland and Niri. You're already glued to your screens — at least now you can feel guilty about it in a visually coherent way.

Three components, one purpose: record what you're doing all day.

Component What it is
hyprwatchd C++20 daemon. Auto-detects Hyprland or Niri, logs every focus change to SQLite. Optional lock/unlock tracking via quickshell/DMS (logind LockedHint).
hyprwatch ncurses TUI. For when you refuse to leave the terminal.
hyprwatcher Electron + React + Material 3 GUI. Charts, heatmaps, app icons, notes. The main thing.

Quick Install (Arch Linux)

curl -fsSL https://code.milfs.party/alex/hyprwatcher/raw/branch/master/install.sh | bash

This fetches the PKGBUILD, runs makepkg -si, and enables the daemon. Read it first if you don't blindly pipe internet scripts into bash (you shouldn't, but it's clean, I promise).


Manual Install

Arch Linux (via PKGBUILD)

git clone https://code.milfs.party/alex/hyprwatcher.git
cd hyprwatcher
makepkg -si
systemctl --user enable --now hyprwatchd
hyprwatcher        # launch GUI

From Source

Requirements: cmake >= 3.16, gcc/clang (C++20), ncurses, sqlite, systemd (libsystemd), node >= 20, npm

git clone https://code.milfs.party/alex/hyprwatcher.git
cd hyprwatcher

# Daemon + TUI
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
sudo cmake --install build --prefix /usr

# Enable user service
systemctl --user daemon-reload
systemctl --user enable --now hyprwatchd

# GUI (dev mode)
cd src/gui && npm install --legacy-peer-deps && npm run dev

What It Tracks

  • Every window focus change (Hyprland class / Niri app_id + title + timestamps)
  • Per-app session duration in SQLite at ~/.config/hyprwatch/usage.db
  • Hourly breakdown, daily/weekly/monthly aggregates
  • Active vs inactive time balance
  • Optional lock/unlock sessions as session-lock — DankMaterialShell sets logind LockedHint when the quickshell lock screen engages; the daemon watches that (ScreenSaver ActiveChanged fallback). Enable Track locks / unlocks in the GUI overflow menu (trackLocks in ~/.config/hyprwatch/config.json).

The daemon keeps writing even when the GUI isn't running.


Architecture

Hyprland socket2  ─┐
                   ├──►  hyprwatchd  ──unix sock──►  hyprwatch (TUI)
Niri EventStream  ─┘         │      ──unix sock──►  hyprwatcher (GUI)
                             │
logind LockedHint ───────────┤  (quickshell / DMS lock screen)
ScreenSaver ActiveChanged ───┘
                             └──► ~/.config/hyprwatch/usage.db

Compositor is picked from NIRI_SOCKET (or a live niri.*.sock) / HYPRLAND_INSTANCE_SIGNATURE.


GUI Features

  • Material 3 Expressive design via m3e — dynamic color palette from your Material theme
  • Activity heatmap, stacked area chart, active/inactive donut
  • Per-app rename, custom icons (auto-fetched from Flathub/iTunes), blacklist, notes
  • Radial clock editor for manual time adjustments
  • Toggle for session lock tracking (overflow menu)

Because it doesn't know what kitty is. This one does.


License

MIT — see LICENSE.

Original project by Farhan291. This fork by alex.