A Python-based productivity tool that helps you stay focused by detecting distractions and reminding you to get back to work with randomized YouTube videos.
- AI-Powered Phone Detection: Uses a Roboflow AI model to specifically detect when you're holding your phone.
- Instagram Monitoring: Automatically detects if you have Instagram open in Safari (macOS only).
- Randomized Reminders: Opens a random video from a curated list of YouTube reminders to keep things fresh.
- Duplicate Prevention: Intelligently skips opening a new video if you're already watching one in Safari.
- Secure Configuration: Uses environment variables to keep your API keys private.
- macOS (for Instagram detection and
opencommand support) - Python 3.x
- A Roboflow API Key (get one at roboflow.com)
-
Clone the repository:
git clone https://github.com/ben564885/get-off-your-phone.git cd get-off-your-phone -
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install opencv-python numpy requests python-dotenv pyobjc-framework-Cocoa
Create a .env file in the project root and add your Roboflow API key:
ROBOFLOW_API_KEY=your_api_key_hereRun the monitor:
python phone_monitor.py- Quit: Press
qwhile the camera window is focused. - Cooldown: There is a default 10-second cooldown between triggers to prevent spamming.
This project is licensed under the MIT License - see the LICENSE file for details.