ponchodelosrios98/screen-block — explained in plain English
Analysis updated 2026-05-18
Block distracting websites across every browser on your Mac at once.
Start a locked focus session where you cannot unblock sites early.
Toggle individual sites on or off from a terminal interface.
Set a timed block that survives reboots and manual hosts file edits.
| ponchodelosrios98/screen-block | aim-uofa/reasonmatch | airbone42/360-data-athlete | |
|---|---|---|---|
| Stars | 12 | 12 | 12 |
| Language | Python | Python | Python |
| Setup difficulty | easy | hard | hard |
| Complexity | 2/5 | 5/5 | 4/5 |
| Audience | general | researcher | general |
Figures from each repo's GitHub metadata at analysis time.
macOS only, and editing the hosts file requires sudo access.
Screen-block, called focus in its own documentation, is a website blocker for macOS built for people who know they will try to cheat their own blocklist. Instead of a browser extension you can just disable, it edits your Mac's system level hosts file, which means the sites you block stay blocked in every browser at once, with no extension to turn off and no app to force quit. The tool has two interfaces that share the same settings: a small command line tool called focus with no dependencies beyond Bash, and focus-tui, a full screen terminal interface built in Python with the Textual library, which shows a live list of sites you can toggle blocked or allowed with a keypress. You can block or unblock specific sites, turn blocking fully on or off, and see your current list and status at any time. The standout feature is lock mode. Running a command like focus lock 90m starts a timed session that cannot be cancelled early. A background process with root permissions checks every few seconds that the block is still in place, undoes any manual edits to the hosts file, and even survives a reboot. While locked, you can add more sites to the block but you cannot remove any, and you can only extend the timer, never shorten it. When the time runs out, the process removes the block and cleans up after itself automatically. Under the hood, both tools rewrite a clearly marked section of the hosts file and leave the rest of it alone, then flush the Mac's DNS cache so the change takes effect immediately. The lock feature works by installing a small system level background service that owns the enforcement files, so the user cannot simply delete them to escape early. It requires macOS specifically, since it depends on how that system handles the hosts file and DNS. The command line tool needs nothing extra, while the terminal interface needs Python 3.10 or newer with Textual installed, or can be run through the uv tool which handles its own dependencies. The project is released under the MIT license.
A macOS website blocker with a lockable timer mode so you cannot unblock sites, or quit the tool, before the time runs out.
Mainly Python. The stack also includes Bash, Python, Textual.
MIT license: use it for anything, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly general.
This repo across BitVibe Labs
double-check against the repo, no cap.