barrettotte / screentime

A MacOS status bar item to show today's screen time for roughly tracking work hours.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

screentime

A MacOS status bar item to show today's screen time for roughly tracking work hours.

docs/screenshot.png

This is pretty much just an alternative display to System Preferencs/Screen Time. Uses macOS "Knowledge" SQLite database to find total app usage and displays in status bar with format of ##h ##m. Also, built without using xcode editor and only uses Swift Package Manager (SPM).

Tested on MacBook Pro M1 with macOS 12.6

Commands

# build
swift build

# run
swift run

Run on Startup

# screentime.applescript
do shell script "swift run --package-path $PATH_TO_REPO"
# compile AppleScript command to macOS app
osacompile -o ScreenTime.app screentime.applescript

Go to System Preferences > Users & Groups > Login Items, then press + and add ScreenTime.app.

References

About

A MacOS status bar item to show today's screen time for roughly tracking work hours.

License:MIT License


Languages

Language:Swift 96.4%Language:AppleScript 3.6%