A lightweight Java desktop application that helps prevent digital eye strain by implementing the scientifically-backed 20-20-20 rule: Every 20 minutes, look at something 20 feet away for at least 20 seconds.
- π₯οΈ System Tray Integration - Runs silently in the background
- π Beautiful Overlays - Semi-transparent, non-intrusive notifications
- β° Precise Timing - Automatic 20-minute work intervals
- π¨ Custom Graphics - Hand-drawn icons with smooth animations
- πͺΆ Lightweight - <1MB memory footprint, 0% CPU when idledle
- βοΈ Simple Controls - Right-click menu with start/pause/test options
- π Cross-Platform - Works on Windows, macOS, and Linux
- Java 8 or higher
- Operating system with system tray support
- Download the latest release or clone this repository
git clone https://github.com/sriram-dev-9/EyeProt-App.git
cd eyeprot- Compile the application
javac EyeProtApp.java- Run EyeProt
java EyeProtApp- Look for the eye icon in your system tray - EyeProt is now protecting your vision! ποΈ
- Silent Guardian - EyeProt sits quietly in your system tray
- Smart Reminders - Every 20 minutes, a gentle overlay appears
- Guided Breaks - Follow the countdown timer for your 20-second break
- Auto-Dismiss - Notification fades away automatically or click "Dismiss"
- Repeat - The cycle continues to keep your eyes healthy
Right-click the EyeProt icon in your system tray to access:
- Start Timer - Begin the 20-minute work intervals
- Pause Timer - Temporarily stop notifications
- Test Notification - Preview the break reminder
- About - Learn more about the 20-20-20 rule
- Exit - Close the application
- SystemTray Integration - Native OS tray icon with popup menu
- Timer Management - Precise interval scheduling with Java Timer
- Custom Overlay System - Semi-transparent JWindow notifications
- Graphics Rendering - Hand-drawn icons using Graphics2D
- Thread Safety - Proper UI updates with SwingUtilities
- Java Swing/AWT - Desktop GUI framework
- Graphics2D - Custom icon rendering
- SystemTray API - Background operation
- Timer/TimerTask - Precise scheduling
The subtle eye icon sits in your system tray:
Beautiful, calming reminder that doesn't break your focus:
- Semi-transparent background
- Clear instructions
- Live countdown timer
- Easy dismiss button
Want to modify the intervals or appearance? Key constants in EyeProtApp.java:
private static final int WORK_INTERVAL = 20 * 60 * 1000; // 20 minutes
private static final int REST_DURATION = 20 * 1000; // 20 secondsOverlay colors can be adjusted in the createNotificationWindow() method.
Contributions are welcome! Whether it's:
- π Bug fixes
- β¨ New features
- π Documentation improvements
- π¨ UI/UX enhancements
This project is licensed under the MIT License - see the LICENSE file for details.
- Built during Hack Club's Summer of Making
- Inspired by the scientific research on digital eye strain
- Thanks to the ophthalmologists who discovered the 20-20-20 rule