A Chrome/Chromium browser extension that blocks distracting websites and apps for a set duration. One control point for both web and app blocking.
- Website blocking: Uses Chrome's
declarativeNetRequestAPI to redirect blocked sites to a "blocked" page with a countdown timer. - App blocking: A local Python server kills blocked app processes every 2 seconds. The extension communicates with the server via HTTP on
localhost:7532.
- Block websites and macOS/Linux/Windows apps from a single popup
- Configurable duration: 5, 10, 15, 20, 25, 30, 45, 60, 90, or 120 minutes
- Add/remove sites and apps while a blocking session is active
- Blocked websites show a countdown page
- Blocked apps are terminated every 2 seconds if reopened
- Open
chrome://extensionsin your Chromium-based browser - Enable Developer mode (toggle in top right)
- Click Load unpacked
- Select the
extension/folder from this repo
The kill server is a small Python HTTP server that handles app blocking. It requires Python 3.6+.
python3 server/install.pyThis will:
- macOS: Copy the server to
~/.webblocker/and register a LaunchAgent (auto-starts on login) - Linux: Copy the server to
~/.webblocker/and create a systemd user service (auto-starts on login) - Windows: Copy the server to
~/.webblocker/and create a Task Scheduler entry (auto-starts on logon)
If you prefer to run the server manually instead of auto-starting:
python3 server/server.py- Click the extension icon in the toolbar
- Sites tab: Add website domains to block (e.g.
reddit.com,x.com) - Apps tab: Add app names to block (e.g.
WhatsApp,Discord) - Set the blocking duration with the slider
- Click Start Blocking
macOS:
# Stop
launchctl unload ~/Library/LaunchAgents/com.webblocker.killserver.plist
# Start
launchctl load ~/Library/LaunchAgents/com.webblocker.killserver.plistLinux:
# Stop
systemctl --user stop webblocker.service
# Start
systemctl --user start webblocker.service
# View logs
journalctl --user -u webblocker.serviceWindows (PowerShell):
# Stop
schtasks /End /TN FocusGuardKillServer
# Start
schtasks /Run /TN FocusGuardKillServerextension/ Chrome extension (load this in your browser)
background/ Service worker for blocking logic
blocked/ "Blocked" page shown for blocked sites
popup/ Extension popup UI
icons/ Extension icons
server/ Kill server (handles app blocking)
server.py Cross-platform HTTP server
install.py Cross-platform auto-start installer