Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

monique

A tiny cross-platform focus tracker. A background daemon watches which window holds focus, records each stretch as a session in SQLite, and a live terminal UI shows where your time went today.

This particular fork runs the tracker in the background with an ability to open the UI in a separate terminal window from the tray.

How it works

active window  ──►  collector  ──►  tracker  ──►  SQLite
 (per-OS poll)      (FocusEvent)   (sessions)      │
                                                   ▼
                                    stats  ──►  Bubble Tea UI
  • collector polls the foreground window once a second. Platform logic sits behind build tags:
    • Linux — Hyprland IPC when available, else X11 via xprop
    • macOS — AppleScript (System Events); window titles need Accessibility permission
    • Windowsuser32.dll (GetForegroundWindow)
  • tracker collapses that stream into sessions: one row per continuous period a window held focus. It heartbeats every 30s and recovers any session left dangling by a crash.
  • stats / tui aggregate focused time per app since midnight and render it in a live-refreshing table.

Usage

go build -o monique ./cmd/monique # Name as monique.exe for Windows

./monique track   # run the tracker (leave it running in the background)
./monique ui      # view today's focus time

In the UI, press Tab to switch between grouping by window and application. Use d, w, m, and a to show today, the rolling last 7 days, the rolling last 30 days, or all recorded time.

Both commands read/write ./monique/monique.db relative to the working directory.

Requirements

  • Go 1.26+
  • Linux: Hyprland or an X11 session with xprop
  • macOS: grant Accessibility permission for window titles
  • No external services — storage is pure-Go SQLite (modernc.org/sqlite)

About

Monitor your desktop activity in background

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages