Clarity is a minimalist and lightweight application that helps you protect your eyesight by enforcing the 20-20-20 rule. Built with Go and OpenGL(Go-gl), pops up when it's time to take a break.
Every 20 minutes, Clarity will play a sound signal and display a simple timer, reminding you to look at something 20 feet (6 meters) away for 20 seconds. This helps reduce eye strain caused by prolonged screen time.
- 20-20-20 Rule Enforcement: Accurate 20-minute work / 20-second break cycles
- Procedural UI: Renders clean, font-less graphics
- Audible Alerts: Clear sound signals embedded directly into the binary
- Single Binary Deployment: All assets (sound, config) compiled into executable - no external dependencies
- Configurable: Customize window size, position, colors, and timing via JSON configuration
- Lightweight: Minimal resource consumption
- Timer Window: Automatically appears when a break is due
- Automatic Dismissal: The break window closes automatically after 20 seconds with a sound
- Go - Primary programming language
- Go-gl - Graphics rendering
- Go-gl/glfw - Window management
- Faiface/beep - Audio playback and processing
- Hajimehoshi/go-mp3 - MP3 decoding for beep
- Ebitengine/oto - Low-level audio output for beep
-
Clone the repository:
git clone https://github.com/Votline/Clarity cd Clarity -
Download dependencies:
go mod download
-
Build the application:
go build -o clarity
-
Run:
./clarity
This project is licensed under MIT.
The full license texts are available in the licenses directory