How romboooo/ttracker works
ttracker records focused-window sessions from Hyprland, persists them in SQLite, and reports per-application durations through its CLI and Noctalia panel. The graph includes the documented live-status and icon capabilities. Source excerpts show the Go runtime calls; plugin internals were not sampled, so plugin wiring is represented only where documented or marked unverified.
Main entry points: cli CLI commands · run.go Event tracker · db.go SQLite storage · active.go Live status file
Components 11
CLI and service
- CLI commands
cli - User service
systemd/ttracker.service
Focus tracking
- Event tracker
tracker/run.go - Live status file
tracker/active.go
Statistics and display
- Period reports
report/report.go - Desktop icon lookup
desktop/icons.go - Noctalia panel
noctalia-plugin/ttracker
Session data
- SQLite storage
storage/db.go - Session model
model/session.go
Other components
- User
- Hyprland
Connections 14
- User → CLI commands: runs commands
README.md - User service → CLI commands: runs tracker
README.md - CLI commands → Event tracker: starts tracking
cli/run.go - CLI commands → SQLite storage: opens database
cli/stats.go - CLI commands → Period reports: requests periods
cli/stats.go - CLI commands → Live status file: reads live status
cli/stats.go - CLI commands → Desktop icon lookup: looks up icons
cli/stats.go - Event tracker → Hyprland: reads focus events
tracker/run.go - Event tracker → SQLite storage: saves sessions
tracker/run.go - Event tracker → Live status file: writes live status
tracker/run.go - SQLite storage → Session model: maps sessions
storage/db.go - Period reports → Session model: summarizes sessions
report/report.go - Noctalia panel → Live status file: reads live status
README.md - Noctalia panel → CLI commands: loads statistics