BlockApps is a powerful Python script that blocks apps and websites based on a customizable schedule.
It works on Windows and MacOS, and is designed to be very hard to bypass β making it an effective tool for staying focused.
π Built to help people stay productive during studies and work, especially after being disappointed by the limitations (and paywalls) of existing solutions.
- π₯οΈ Cross-platform support: Windows & Linux
- π Schedule-based blocking system (set hours/days)
- π Website blocking (via hosts file manipulation)
- π¦ App blocking (based on process name)
- πͺ Designed to be resilient against tampering
- π§ Lightweight and no GUI β focus on simplicity and control
I created BlockApps because most existing focus tools are either:
- Behind a paywall πΈ
- Easy to bypass π«
This tool helped me focus intensely during study and work sessions, and I hope it can help others too.
- Python 3.7+
- Administrator/root privileges (required for blocking functionality)
For websites: Edits the system hosts file to redirect specified URLs to 127.0.0.1 For apps: Continuously checks for running processes and kills any that are on the blocklist Uses a user-defined schedule (examples in presets.py)
- Clone the repository:
git clone https://github.com/yourusername/BlockApps.git
cd BlockApps-
Edit presets.py to customize you schedule
-
Run the script with administrator privileges
Use pyarmor to crypt the python files and make it impossible to edit the presets.py or any file