The Problem
I forget to breathe while I work. That sounds absurd, but it is a real phenomenon. Linda Stone, a former Apple and Microsoft executive, coined the term “screen apnea” in 2008 after observing that roughly 80% of people unconsciously hold their breath or breathe shallowly while working at a computer. She also calls it “email apnea” because she first noticed it while watching people check email.
It is not that you stop breathing entirely. You take shallow breaths, hold your breath for a few seconds longer than normal, or tense up without noticing. Over hours, this adds up. You end up with tension in your shoulders, a foggy head, and that vaguely drained feeling at the end of a workday that you attribute to the work itself rather than to the fact that you have been oxygen-deprived for eight hours.
I noticed this in my own workflow. I would surface from a deep coding session and realize my shoulders were up near my ears and I had not taken a full breath in who knows how long. The fix is simple: just breathe. The problem is remembering to do it.
The Idea
I wanted something that would tap me on the shoulder at random intervals throughout the day and remind me to take a breath. Not an app with a subscription and a meditation library. Just a notification.
A shell script and a LaunchAgent cover it. No dependencies beyond what ships with macOS.
How It Works
breathe.sh loops in the background: it checks whether the current time is active, picks a random message, sends a macOS notification through osascript, and sleeps for a random interval.
The randomness matters. A notification every 30 minutes on the dot becomes background noise within a day. Random intervals between 20 and 45 minutes keep it unpredictable enough that each one actually registers.
A LaunchAgent starts it at login and restarts it if it crashes. The repository includes a small installer because launchd cannot reliably read from protected directories such as ~/Desktop.
One Gotcha
Modern macOS has TCC (Transparency, Consent, and Control) protections that block LaunchAgents from accessing files in certain directories like ~/Desktop. The script worked fine when run manually but failed with “Operation not permitted” when launched by launchd. The fix was having the install script copy everything to ~/.config/breathe/, which is not a protected location.
Takeaway
Screen apnea is one of those problems that is so subtle you do not realize it is happening. You cannot fix it with willpower because the whole point is that you are too focused to notice. The fix is an external interrupt, something outside your attention that breaks through periodically and reminds you to do the most basic thing your body needs.
A shell script that sends a notification is not a groundbreaking piece of software. But it solves the problem, it has zero dependencies, and it took an afternoon to build. Sometimes the best tool is the simplest one.