A powerful application that uses your webcam to detect when you're looking down at your phone (aka doomscrolling) and triggers a Rickroll punishment to get you back to focus!
Note
This project is inspired by and based on kristelTech/Doomscrolling_Blocker. This version adds a premium web interface, improved detection smoothing, and a "Back to Work" cooldown mechanism.
The Web Edition provides a premium, glassmorphism-style dashboard with real-time feedback and a state-of-the-art detection visualization.
- Premium Dark Mode UI: Modern glassmorphism aesthetic with smooth animations.
- Real-time Visualization: Bounding boxes for face and eye detection.
- Stateful Smoothing: Prevents false triggers from brief glances; triggers only after 2 consecutive "bad" detections.
- "Back to Work" Mechanism: Manual dismissal with a 10-second cooldown period.
- Cloud Ready: Optimized for deployment on Render.com.
- Install Dependencies:
pip install -r requirements.txt
- Run the Application:
cd web python -m uvicorn app:app --reload - Access the App: Open http://127.0.0.1:8000 in your browser.
- Fork/Push this repository to GitHub.
- Create New Web Service on Render.
- Build Command:
pip install -r requirements.txt - Start Command:
cd web && python -m uvicorn app:app --host 0.0.0.0 --port $PORT - Add Environment Variables: Ensure
PORTis set (Render does this automatically).
The original CLI/GUI version using AppleScript for macOS control.
- Install dependencies:
pip install -r requirements.txt - Run:
python main.py - Press 'q' to quit.
Customize behavior in config.json:
face_position_ratio: Increase for less sensitivity, decrease for more.roasting.messages: Add your own motivational insults.camera.preferred_index: If you have multiple webcams.
- Python 3.10+
- Webcam
- OpenCV
rickroll.mp4(included inweb/static/)
This project is licensed under the MIT License - see the LICENSE file for details. Stay focused! 💪