Track your usage in hyprland
  • TypeScript 79.7%
  • Python 10.2%
  • C++ 5.9%
  • CSS 2.3%
  • Shell 1.3%
  • Other 0.5%
Find a file
2026-06-15 01:17:57 +02:00
.claude/skills/design-system feat: M3 UI overhaul, daemon JSON logging, Lua-era IPC, PKGBUILD 2026-05-18 16:10:52 +02:00
assets feat: M3 UI overhaul, daemon JSON logging, Lua-era IPC, PKGBUILD 2026-05-18 16:10:52 +02:00
phone-watcher feat: migrate daemon to sqlite, fix data loss, and decouple phone tracking 2026-06-14 19:54:39 +02:00
scripts feat: migrate daemon to sqlite, fix data loss, and decouple phone tracking 2026-06-14 19:54:39 +02:00
src fix: resolve daemon deadlock and refine IPC handshake (GET command, non-blocking) 2026-06-15 01:17:57 +02:00
.gitignore chore: remove node_modules/dist from tracking, update .gitignore 2026-05-18 16:13:28 +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 feat: M3 UI overhaul, daemon JSON logging, Lua-era IPC, PKGBUILD 2026-05-18 16:10:52 +02:00
CMakeLists.txt add: readme, license, flake.nix and assets & update: build script 2026-02-17 18:57:56 +05:30
flake.nix add: readme, license, flake.nix and assets & update: build script 2026-02-17 18:57:56 +05:30
GEMINI.md feat: M3 UI overhaul, daemon JSON logging, Lua-era IPC, PKGBUILD 2026-05-18 16:10:52 +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 fix: launcher path and phone-gui asset resolution 2026-05-24 23:44:12 +02:00
README.md feat: M3 UI overhaul, daemon JSON logging, Lua-era IPC, PKGBUILD 2026-05-18 16:10:52 +02:00
TODO.txt feat: M3 UI overhaul, daemon JSON logging, Lua-era IPC, PKGBUILD 2026-05-18 16:10:52 +02:00

hyprwatcher

"Big Brother, but you asked for it."

hyprwatcher

License Platform Language

A time-tracking suite for the Hyprland window manager. 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. Listens to Hyprland IPC events, logs every focus change to ~/.config/hyprwatch/data/ in JSON. Never stops watching.
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, nlohmann-json, 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

Nix

nix run github:Farhan291/hyprwatch
# or
nix profile install github:Farhan291/hyprwatch

What It Tracks

  • Every window focus change (app class + title + timestamps)
  • Per-app session duration, persisted to JSON files at ~/.config/hyprwatch/data/HH-DD-MM-YYYY.json
  • Hourly breakdown, daily/weekly/monthly aggregates
  • Phone screen time (CSV import from your phone's Digital Wellbeing export)
  • Active vs inactive time balance

The daemon writes JSON logs even when the GUI isn't running. No data loss on restart.


Architecture

Hyprland  ──socket2──►  hyprwatchd  ──unix sock──►  hyprwatch (TUI)
                │                   ──unix sock──►  hyprwatcher (GUI)
                └──────────────────────────────────► ~/.config/hyprwatch/data/*.json

The daemon is the source of truth. The GUI reads live data via IPC and historical data from both SQLite and the JSON session logs.


GUI Features

  • Material 3 Expressive design via m3e — dynamic color palette pulled from your Hyprland Material theme
  • Navigation rail for Desktop / Phone mode switching
  • 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
  • Phone stats dashboard (Digital Wellbeing CSV)

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


License

MIT — see LICENSE.

Original project by Farhan291. This fork by alex.