Skip to content

JiashuaiXu/Blinko

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘οΈ Blinko / 明眸

ζ˜ŽηœΈε–„ηοΌŒεε¦‚ι’Ÿ | Blinko watches, so you can rest.

A lightweight, intelligent Windows desktop health reminder tool focused on protecting your eye and posture health.

Design Philosophy: Keep it Simple, Keep it Stupid


🌐 Languages

English | δΈ­ζ–‡


✨ Core Features

  • πŸ• Timer Reminder: Automatic 20-20-20 eye care rule reminders
  • πŸ‘οΈ Blink Detection: Camera-based detection to remind you to blink more
  • πŸͺ‘ Posture Detection: Real-time posture monitoring and reminders
  • πŸ‘€ Desktop Icon: Small eye icon displayed on Windows desktop top layer with low resource usage
  • πŸ“Š Statistics: Record your health habits
  • πŸ”” System Tray: Lightweight resident, non-intrusive but interactive
  • πŸ”’ Privacy First: All image processing done locally, no data uploaded

πŸ› οΈ Tech Stack

Pure Rust Implementation - Simple, efficient, low resource usage

  • Language: Rust 2021 Edition
  • Window System: Windows API (native)
  • Image Processing: OpenCV Rust (pure Rust, no Python required)
  • Async Runtime: Tokio
  • Data Storage: SQLite (rusqlite)
  • Configuration: TOML + Serde

Design Principles:

  • βœ… Pure Rust implementation, no external dependencies (except OpenCV)
  • βœ… Minimal dependencies, keep it simple
  • βœ… Low resource usage (memory < 50MB)
  • βœ… Native Windows experience

πŸ“¦ Project Structure

Blinko/
β”œβ”€β”€ src/                    # Rust source code
β”‚   β”œβ”€β”€ main.rs            # Main entry point
β”‚   β”œβ”€β”€ config.rs          # Configuration management
β”‚   β”œβ”€β”€ database.rs        # Database operations
β”‚   β”œβ”€β”€ detection.rs       # Blink/posture detection
β”‚   β”œβ”€β”€ reminder.rs        # Timer reminder
β”‚   β”œβ”€β”€ tray.rs           # System tray
β”‚   └── window.rs         # Desktop top layer window
β”œβ”€β”€ docs/                   # Project documentation
β”œβ”€β”€ Cargo.toml             # Rust dependencies
└── README.md              # This file

πŸš€ Quick Start

Requirements

  • Rust 1.70+ (recommended to install via rustup)
  • Windows 10/11
  • OpenCV 4.x (install via vcpkg or system package manager)

Installing OpenCV (Windows)

Method 1: Using vcpkg (Recommended)

# Install vcpkg
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat

# Install OpenCV
.\vcpkg install opencv4:x64-windows

# Set environment variable
$env:OPENCV_DIR = "C:\path\to\vcpkg\installed\x64-windows"

Method 2: Using Pre-built Version

Download OpenCV pre-built version and set OPENCV_DIR environment variable to the installation directory.

Build and Run

# Clone repository
git clone <repository-url>
cd Blinko

# Run in development mode
cargo run

# Build release version
cargo build --release

# Run release version
cargo run --release

First Run

  1. The program will display an icon in the system tray
  2. A small eye icon (64x64 pixels) will appear on the desktop top layer
  3. Default reminder interval: every 20 minutes
  4. Configuration file: %APPDATA%\blinko\config.toml
  5. Database: %LOCALAPPDATA%\blinko\blinko.db

βš™οΈ Configuration

Edit configuration file %APPDATA%\blinko\config.toml:

[reminder]
enabled = true
interval_minutes = 20

[blink_detection]
enabled = false
check_interval_seconds = 5
threshold_seconds = 30

[posture_detection]
enabled = false
sensitivity = "medium"

🎯 Feature Description

Timer Reminder

  • Default reminder interval: every 20 minutes
  • Follows 20-20-20 eye care rule
  • Adjustable interval via configuration

Blink Detection

  • Real-time blink frequency detection using camera
  • Reminds when no blinking detected for extended period
  • All processing done locally for privacy protection

Posture Detection

  • Detects head and shoulder positions
  • Alerts when abnormal posture detected
  • Adjustable detection sensitivity

Desktop Icon

  • Displays small eye icon on Windows desktop top layer
  • 64x64 pixels, low resource usage
  • Always on top, doesn't obstruct important content

πŸ“Š Performance Metrics

  • Memory Usage: < 50MB (idle)
  • CPU Usage: < 1% (idle), < 15% (detecting)
  • Startup Time: < 2 seconds
  • Detection Latency: < 500ms

πŸ”’ Privacy Protection

  • βœ… All image processing done locally
  • βœ… No image data saved
  • βœ… No data uploaded to servers
  • βœ… Statistics stored locally only
  • βœ… Fully offline operation

πŸ› οΈ Development

Code Style

Follow Rust official code style:

cargo fmt
cargo clippy

Testing

cargo test

πŸ“– Documentation

Detailed documentation available in docs/ directory:


🎯 Brand Positioning

  • Chinese Name: 明眸 - Elegant, culturally rich, focused on eye health
  • English Name: Blinko - Derived from "blink", light and friendly
  • Logo Concept: Half-closed owl/panda/robot with "bright eyes" shine

🀝 Contributing

Issues and Pull Requests are welcome!

Contribution Guide

  1. Fork this repository
  2. Create feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add some AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open Pull Request

πŸ“„ License

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


πŸ™ Acknowledgments

  • OpenCV community
  • Rust community
  • All contributors

Made with ❀️ for your eye health

Keep it simple, keep it stupid.

About

πŸ¦‰ A privacy-first, tiny, and secure Rust app for Windows that gently reminds you to blink and maintain good posture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages