I hacked my clock to control my focus

64 rcarmo 25 5/11/2025, 11:12:42 PM paepper.com ↗

Comments (25)

KeybInterrupt · 10m ago
I've added an hourly chime to my work computer's clock, similar to a Casio wristwatch. It's a subtle reminder of the passing time, prompting me to pause, reflect, and reassess my actions to stay on track and avoid procrastination.

I like this constant on screen reminder though and might give it a try myself :)

bound008 · 1h ago
I built a simple SwiftUI/Swift Data app to do the same thing across my Apple Watch, iPhone, iPad and Desktop.

With the heavy lifting of SwiftUI/Swift Data, and iCloud providing automatic and private syncing, this is the cloc output for my project, (including widgets and all of the code and projects needed to target all of these platforms.)

-------------------------------------------------------------------------------

Language files blank comment code

-------------------------------------------------------------------------------

XML 13 0 0 579

Swift 19 131 142 548

JSON 4 0 0 115

YAML 1 7 0 43

-------------------------------------------------------------------------------

SUM: 37 138 142 1285

-------------------------------------------------------------------------------

If you live in the apple ecosystem and want to make a simple tool for yourself, you really should go ahead and do that.

It started as a desire to have a "focus" on my Apple Watch at all times, and in less than 10 hours, I have widgets, shortcuts (and Siri) integrations, and syncing across every apple platform (although I haven't yet tried it on tvOS).

I've thought about productizing it, and I might one day, but that would add orders of magnitude to the time of making this something that people should be asked to pay for.

And I'm not going to open source it, because it is ~500 loc, with no libraries plus a bunch of Xcode generated stuff.

rcarmo · 1h ago
You could post a gist of it, though. I’d love to do the same thing.
kazinator · 1h ago
Someone working mainly in a terminal could hack this into Basta.

https://www.kylheku.com/cgit/basta/about/

The stock Basta puts a clock (date + time) into a scroll-protected status line, host name and current working dir.

Basta works fine on MacOS, but you need to get a more recent build of Bash from somewhere (Homebrew ...). I should attempt a Zsh port one of these days; the name wouldn't change, though. :)

Brajeshwar · 3h ago
A timer is one of the most underrated ways to stay focused.[1]

We have all been there where you are supposed to work on that boring but critical bug for the project, where a few other team members are waiting, but you end up booking a domain, building a landing page, and launching a waiting list. By dinner, as you are talking to potential alpha users in your community and start spreading the word, you realize you have not touched that bug.

Anyway, I like timers; the only complication in my Watch is a timer.[2] At my desk, I use a physical hourglass regularly. The physical hourglass helps me not be constrained by the Pomodoro-ish restrictions and work past the finish line.

For distractions (that seem important and sometimes are) while I'm on a specific task, I usually have my handy notebook, and I write them down quickly with a pen so I can return to them later. That helps me prevent launching ideas into landing pages.

Once you are good with a process/pattern, whatever tool you build/buy/use, as a timer in this case, helps your focus on your current situation.

1. https://brajeshwar.com/2023/timer/

2. https://brajeshwar.com/2024/watch-tiny-handy-computer/

RandomWorker · 3h ago
I love the idea of hourglass! Thanks for sharing I’ve ordered mine on Amazon today. It’s about a foot tall. This is also a great way to signal to other people in the office that I’m busy.
gnarlouse · 6h ago
This is neat. Low cost, built from stolen parts. 10/10 engineering.
sheepscreek · 4h ago
Indeed! Using dconf to achieve this is very impressive. Is there a KDE plasma equivalent to this?
baby_souffle · 4h ago
Came here to ask this.

Most plasma widgets use a config file so this should be possible.

bflesch · 1h ago
Good idea, thanks for sharing. Happy to see fellow linux users modifying their system to improve productivity.
winrid · 5h ago
I like to set timers. I use the taskbar timer in xfce to set it to say 30mins, and then I work on getting something done in that time. It works really well. Not sure if this has a common name.

This was really helpful when I redid the FastComments admin area, as that was a big slog of UI work that I quickly got tired of. This was before Claude :)

hug · 5h ago
Sounds a lot like the Pomodoro Technique.
winrid · 5h ago
I don't take breaks per se, which is a core part of that technique iirc.
dexwiz · 4h ago
I think the break can be a reflection and note taking period. Unfocus a bit, but not too far.
winrid · 8m ago
Interesting. I use the timer thing just for long running tasks I want to make progress on every day. Then I go work on other stuff.
ThrowawayTestr · 1h ago
This kind of stuff makes me understand why people like Linux.
inatreecrown2 · 5h ago
is there something similar for macOS?
brianpan · 47m ago
If the something you are asking about is scripting/modifying, that something might be Shortcuts (or the older Automator).

If the something you are asking about is a pre-built tool, I would think the menubar is the MacOS place to put a reminder and it looks like someone has built that: https://lifehacker.com/tech/one-thing-app-turns-your-macs-me...

ajdude · 4h ago
This isn't quite the same thing, but I have my Mac set up to announce the time every 15 minutes. You can customize the voice, and the voice I'm using causes the computer to sing the time.

All of this is built into the OS, I think the settings are in the control center

hackermanve · 4h ago
I used this for something similar, and is very customisable

https://github.com/matryer/xbar

fitsumbelay · 4h ago
for MacOS bash, do:

` #!/bin/bash

# Set focus text from command line argument or prompt user if [ -z "$1" ]; then echo "What's your current focus?" read FOCUS else FOCUS="$1" fi

if [ -z "$FOCUS" ]; then echo -n "\033]0;$(date +'%b %d %H:%M')\007" else echo -n "\033]0;$(date +'%b %d %H:%M') Focus: $FOCUS\007" fi

echo "Focus set to: $FOCUS" `

for MaxOS zsh, uncomment `DISABLE_AUTO_TITLE="true"` in .zshrc and do:

` #!/bin/zsh

# Set focus text from command line argument or prompt user if [ -z "$1" ]; then echo "What's your current focus?" read FOCUS else FOCUS="$1" fi

if [ -z "$FOCUS" ]; then echo -n "\033]0;$(date +'%b %d %H:%M')\007" else echo -n "\033]0;$(date +'%b %d %H:%M') Focus: $FOCUS\007" fi

echo "Focus set to: $FOCUS" `

chthonicdaemon · 4h ago
macOS and iOS have a whole feature called Focus modes which allows you to choose a focus and do things based on this focus. Your current focus is shown in the menu bar.
inatreecrown2 · 3h ago
Yeah but that is just a small icon, no text.
beala · 3h ago
A sticky note stuck to your monitor?
fitsumbelay · 5h ago
Very cool