No description
  • C++ 91.6%
  • CMake 4.3%
  • Nix 4.1%
Find a file
2026-02-25 18:28:46 +05:30
assets add: readme, license, flake.nix and assets & update: build script 2026-02-17 18:57:56 +05:30
src chore : update build scripts and service.in for systemctl 2026-02-17 15:51:12 +05:30
.gitignore chore: update build scripts 2026-01-31 21:14:17 +05:30
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
LICENSE add: readme, license, flake.nix and assets & update: build script 2026-02-17 18:57:56 +05:30
README.md update : aur build instructions 2026-02-25 18:28:46 +05:30

Hyprwatch

A lightweight time tracking daemon and TUI client for Hyprland window manager. Hyprwatch

License Language Platform

Features

  • Real-time window tracking - Monitors active window changes via Hyprland IPC
  • Time accumulation - Tracks time spent per application
  • TUI Client - ncurses-based interface

Requirements

  • CMake (>= 3.16)
  • C++17 compiler (gcc/clang)
  • ncurses
  • Hyprland (window manager)

Installation & Usage

Platform-specific installation instructions

Arch Linux

# Build from source
sudo pacman -S base-devel cmake ncurses git
git clone https://github.com/Farhan291/hyprwatch.git && cd hyprwatch
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build
sudo cmake --install build --prefix /usr/local

AUR

# Using yay
yay -S hyprwatch

# Or build manually
git clone https://aur.archlinux.org/hyprwatch.git && cd hyprwatch
makepkg -si

Ubuntu/Debian

sudo apt update && sudo apt install -y build-essential cmake libncursesw5-dev
git clone https://github.com/Farhan291/hyprwatch.git && cd hyprwatch
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build
sudo cmake --install build --prefix /usr/local

# Enable systemd service
systemctl --user enable --now hyprwatchd

# Run client
hyprwatch

Fedora

sudo dnf install cmake ncurses-devel gcc-c++ git
git clone https://github.com/Farhan291/hyprwatch.git && cd hyprwatch
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build
sudo cmake --install build --prefix /usr/local

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

# Run client
hyprwatch

OpenSUSE

sudo zypper install cmake ncurses-devel gcc-c++ git
git clone https://github.com/Farhan291/hyprwatch.git && cd hyprwatch
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build
sudo cmake --install build --prefix /usr/local

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

# Run client
hyprwatch

Nix

nix build github:Farhan291/hyprwatch

# Or install to profile
nix profile install github:Farhan291/hyprwatch

Usage

Start the daemon

# Using systemd (recommended)
systemctl --user daemon-reload
systemctl --user enable --now hyprwatchd

# Or run manually
hyprwatchd

Run the client

hyprwatch

Architecture

┌─────────────┐     IPC      ┌──────────────┐     Unix Socket     ┌─────────────┐
│  Hyprland   │◄────────────►│  hyprwatchd  │◄───────────────────►│  hyprwatch  │
│   (WM)      │   Events     │   (Daemon)   │    Data Request     │   (TUI)     │
└─────────────┘              └──────────────┘                     └─────────────┘

Hyprwatch uses a client-server architecture:

  • hyprwatchd (daemon) - Background service that connects to Hyprland's IPC socket, tracks window focus changes, and maintains time statistics
  • hyprwatch (client) - TUI application that connects to the daemon via Unix socket and displays real-time data

License

Apache License 2.0 - See LICENSE for details.

Copyright 2026 Farhan

References