Skip to content

xonoxc/mono

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mono - Screen Time Tracker (Linux Only)

Mono TUI Dashboard

A privacy-first screen time tracking application for Linux with a polished terminal-based user interface (TUI). Mono runs silently in the background to track your application usage while providing a beautiful, htop-inspired dashboard for visualization.


Features

  • Privacy-First: All data stored locally in SQLite, never leaves your machine
  • TUI Dashboard: Beautiful terminal interface inspired by htop, btop, and lazygit
  • Background Tracking: Runs as a daemon on system startup
  • Real-Time Updates: Live tracking of active applications
  • Weekly Overview: Visual bar chart of daily screen time
  • Application Stats: Detailed breakdown of time spent per application
  • Hyprland Support: Integrated with Hyprland window manager

Requirements

  • Linux only (tested on Arch Linux with Hyprland)
  • Rust 1.70 or later
  • Cargo (included with Rust)
  • SQLite (bundled with the application)
  • Hyprland (optional, for window title tracking)

Installation

git clone https://github.com/anomalyco/mono.git
cd mono
./install.sh

The install script builds the release binary, installs it to ~/.local/bin/mono-tracker, and sets up autostart via systemd (with XDG autostart as fallback).

Manual Installation

cargo build --release
./install.sh
mono # launch dashboard

Uninstall

./uninstall.sh

Binaries

Binary Purpose
mono TUI Dashboard
mono-tracker Background tracking daemon
mono-cli CLI management tool

Usage

TUI Controls

Key Action
j / Down Scroll down
k / Up Scroll up
h / Left Previous day
l / Right Next day
g Go to today
r Refresh data
Tab Switch between sections
q Quit

First Run

On first launch, Mono displays a consent prompt:

  • Enable Tracking: Starts the daemon and enables autostart
  • Skip for Now: Opens dashboard without tracking

CLI Commands

mono-cli status    # Check tracking status
mono-cli setup     # Enable tracking and autostart
mono-cli unsetup   # Disable tracking and remove autostart

Daemon Control

mono-tracker        # Start daemon manually
pkill mono-tracker  # Stop daemon
pgrep mono-tracker # Check if running

Architecture

src/
├── main.rs            # Daemon entry point
├── lib.rs             # Core library
├── tracker.rs         # Active window tracking
├── session_manager.rs # Session management
├── storage.rs        # SQLite database
├── autostart.rs     # Autostart registration
├── window_manager.rs # Window manager integration
├── ipc_server.rs    # IPC server
└── tui/
    ├── main.rs     # TUI dashboard
    ├── db.rs      # Database queries
    └── consent.rs # Consent handling

Data Storage

  • Database: ~/.local/share/mono/mono.db
  • Config: ~/.config/mono/
  • Consent: ~/.config/mono/consent

Development

cargo build           # Debug build
cargo build --release # Release build
cargo test            # Run tests
cargo run --bin mono  # Run TUI

Tests

cargo test           # All tests

Key Dependencies

  • ratatui: Terminal UI framework
  • rusqlite: SQLite bindings
  • sysinfo: System information
  • x11: X11 window bindings
  • chrono: Date/time handling

Troubleshooting

Daemon Not Running

mono-cli setup

View Database

sqlite3 ~/.local/share/mono/mono.db
sqlite3 ~/.local/share/mono/mono.db ".schema"

Hyprland Not Detected

The daemon falls back to basic tracking without window titles.

About

A privacy-first screen time tracking application for Linux with a polished terminal-based user interface (TUI).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors