focus-time

module
v0.0.0-...-84a99a9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2025 License: MIT

README

Focus Time

A cli tool that tracks window focus and provides simple reporting.

Originally designed to help backlog time tracking.

Features

  • Automatically tracks time spent in focused windows
  • Reporting
    • Grouped by suffix (typically application name)
    • Reasonable default filters
    • CSV export enables more advanced analysis
    • Console print enables other tools like grep
  • Relational sqlite ensures no wasted disk space

Limitations

  • ability to remove old records
  • os agnostic (low priority due to complexity of various window managers)

Install

With Go on your machine, install:

go install github.com/Isaac799/focus-time/cmd/focustime@latest

Usage

Thanks to go flags this command explains it all.

focustime --help

Directories

Path Synopsis
cmd
focustime command
Package main is the primary entry point for the cli application
Package main is the primary entry point for the cli application
internal
db
Package db keeps persistence syntax: https://github.com/mattn/go-sqlite3/blob/master/_example/simple/simple.go driver: https://pkg.go.dev/modernc.org/sqlite
Package db keeps persistence syntax: https://github.com/mattn/go-sqlite3/blob/master/_example/simple/simple.go driver: https://pkg.go.dev/modernc.org/sqlite
pkg
focusedwindow
Package focusedwindow is a windows implementation of determining the currently focused window using user32 and syscall
Package focusedwindow is a windows implementation of determining the currently focused window using user32 and syscall
watcher
Package watcher enables watching the focused window
Package watcher enables watching the focused window

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL