https://github.com/parmeetbhamrah/focus-lock
A Python-based productivity tool to block distracting apps and stay focused on deep work.
https://github.com/parmeetbhamrah/focus-lock
app-blocker automation cli deep-work focus productivity psutil python system-tools
Last synced: 16 days ago
JSON representation
A Python-based productivity tool to block distracting apps and stay focused on deep work.
- Host: GitHub
- URL: https://github.com/parmeetbhamrah/focus-lock
- Owner: ParmeetBhamrah
- License: mit
- Created: 2025-04-23T20:29:40.000Z (30 days ago)
- Default Branch: main
- Last Pushed: 2025-04-24T03:52:26.000Z (29 days ago)
- Last Synced: 2025-04-24T04:30:54.244Z (29 days ago)
- Topics: app-blocker, automation, cli, deep-work, focus, productivity, psutil, python, system-tools
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Focus Lock ๐
A simple yet effective Python tool to boost productivity by blocking distracting apps for a set duration.
## ๐ Features
- Block one or multiple apps by name (e.g., `notepad.exe`, `chrome.exe`)
- Custom duration: choose hours or minutes
- Terminates running instances of selected apps
- Keeps monitoring in the background and blocks app relaunches
- Lightweight and command-line based## ๐ ๏ธ Tech Stack
- [Python](https://www.python.org/)
- [psutil](https://pypi.org/project/psutil/)## ๐ง How It Works
- The script prompts the user to input names of apps to block and a duration.
- It checks every 2 seconds if any of the selected apps are running.
- If found, it terminates the process.
- The process continues until the specified duration elapses.## ๐ฆ Installation
```bash
pip install psutil
```## ๐งช Usage
```bash
python focus_lock.py
```Follow the on-screen prompts to enter:
1. App names (comma separated)
2. Duration format (minutes or hours)
3. Time to block the apps## ๐ License
MIT License
---
Built with โค๏ธ by Parmeet Singh Bhamrah