A simple yet effective Python tool to boost productivity by blocking distracting apps for a set duration.
- 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
- 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.
pip install psutil
python focus_lock.py
Follow the on-screen prompts to enter:
- App names (comma separated)
- Duration format (minutes or hours)
- Time to block the apps
MIT License
Built with ❤️ by Parmeet Singh Bhamrah