Skip to content
Notifications You must be signed in to change notification settings

sriram-dev-9/EyeProt-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3666d69Β Β·Β Β· Sep 25, 2025

History

4 Commits
Sep 25, 2025
Sep 25, 2025
Sep 25, 2025
Sep 24, 2025
Sep 25, 2025
Sep 25, 2025
Sep 24, 2025
Sep 24, 2025
Sep 24, 2025
Sep 24, 2025
Sep 24, 2025
Sep 25, 2025
Sep 24, 2025

Repository files navigation

πŸ‘οΈ EyeProt - Digital Eye Guardian

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.

Java Platform License

✨ Features

  • πŸ–₯️ 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

πŸš€ Quick Start

Prerequisites

  • Java 8 or higher
  • Operating system with system tray support

Installation & Usagesage

  1. Download the latest release or clone this repository
git clone https://github.com/sriram-dev-9/EyeProt-App.git

cd eyeprot
  1. Compile the application
javac EyeProtApp.java
  1. Run EyeProt
java EyeProtApp
  1. Look for the eye icon in your system tray - EyeProt is now protecting your vision! πŸ‘οΈ

🎯 How It Works

  1. Silent Guardian - EyeProt sits quietly in your system tray
  2. Smart Reminders - Every 20 minutes, a gentle overlay appears
  3. Guided Breaks - Follow the countdown timer for your 20-second break
  4. Auto-Dismiss - Notification fades away automatically or click "Dismiss"
  5. Repeat - The cycle continues to keep your eyes healthy

πŸ› οΈ System Tray Controls

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

πŸ—οΈ Technical Architecture

Core Components

  • 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

Key Technologies

  • Java Swing/AWT - Desktop GUI framework
  • Graphics2D - Custom icon rendering
  • SystemTray API - Background operation
  • Timer/TimerTask - Precise scheduling

🎨 Screenshots

System Tray Icon

The subtle eye icon sits in your system tray:

Notification Overlay

Beautiful, calming reminder that doesn't break your focus:

  • Semi-transparent background
  • Clear instructions
  • Live countdown timer
  • Easy dismiss button

πŸ”§ Customization

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 seconds

Overlay colors can be adjusted in the createNotificationWindow() method.

🀝 Contributing

Contributions are welcome! Whether it's:

  • πŸ› Bug fixes
  • ✨ New features
  • πŸ“– Documentation improvements
  • 🎨 UI/UX enhancements

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages