git404hub

what is screen-block fr?

ponchodelosrios98/screen-block — explained in plain English

Analysis updated 2026-05-18

12PythonAudience · generalComplexity · 2/5LicenseSetup · easy

tl;dr

A macOS website blocker with a lockable timer mode so you cannot unblock sites, or quit the tool, before the time runs out.

vibe map

mindmap
  root((focus))
    What it does
      Blocks sites at OS level
      Lockable focus sessions
      Survives reboots
    Tech stack
      Bash
      Python
      Textual
    Use cases
      Block distracting sites
      Start a locked session
      Toggle sites in a TUI
      Enforce a timed block
    Audience
      Anyone avoiding distraction

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Block distracting websites across every browser on your Mac at once.

VIBE 2

Start a locked focus session where you cannot unblock sites early.

VIBE 3

Toggle individual sites on or off from a terminal interface.

VIBE 4

Set a timed block that survives reboots and manual hosts file edits.

what's the stack?

BashPythonTextual

how it stacks up fr

ponchodelosrios98/screen-blockaim-uofa/reasonmatchairbone42/360-data-athlete
Stars121212
LanguagePythonPythonPython
Setup difficultyeasyhardhard
Complexity2/55/54/5
Audiencegeneralresearchergeneral

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

macOS only, and editing the hosts file requires sudo access.

MIT license: use it for anything, including commercial use, as long as you keep the copyright notice.

in plain english

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.

prompts (copy fr)

prompt 1
Explain how focus's lock mode prevents someone from unblocking sites early, including the reboot survival part.
prompt 2
Walk me through installing focus and blocking my first set of distracting websites on macOS.
prompt 3
What is the difference between using the focus CLI and the focus-tui terminal interface?
prompt 4
How does focus edit the hosts file without breaking the rest of my system's DNS settings?

Frequently asked questions

what is screen-block fr?

A macOS website blocker with a lockable timer mode so you cannot unblock sites, or quit the tool, before the time runs out.

What language is screen-block written in?

Mainly Python. The stack also includes Bash, Python, Textual.

What license does screen-block use?

MIT license: use it for anything, including commercial use, as long as you keep the copyright notice.

How hard is screen-block to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is screen-block for?

Mainly general.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.