Most productivity apps treat your focus like a marketing funnel. They track streaks, ping your phone with encouragement, and demand $12/month just to remind you to stretch. I got tired of browser extensions eating my memory and standalone desktop apps requiring an account. So I built a timer using bash and a pre-commit hook.
As engineers, we spend all day inside the terminal. Context switching away from that environment to manage energy levels creates friction. My solution sits entirely in a local script. When I want a deep work session, I run a simple shell command that sets a timestamp and locks in my current task. The real trick happens when I try to commit code before that timer expires.
By hooking into Git, my local environment pushes back against impatience. If I try to ship a quick fix five minutes into a twenty-five minute block, my pre-commit hook catches it. It doesn't block me completely since emergencies happen and you sometimes need to push a hotfix. Instead, it prints a quiet reminder asking if I'm breaking flow or just avoiding a hard problem.
This setup changed my relationship with focus because it respects my workflow. There's no cloud sync. No telemetry trackers log every keystroke. It's just a plain text file tracking time and a native script checking git status. Treating your habits with the same modular mindset you apply to code architecture turns self-improvement into an engineering problem you can actually solve.
Top comments (0)