July 11, 2020
I wanted a simple timer on my computer to help me focus during the work day. The goal was to be able to turn off Slack notifications and fully focus until my next meeting. I didn’t want to set a timer on my phone, and the research I did for getting a timer on my Mac involved the Reminders app or the Calendar app, which both sounded like they’d take a number of clicks and almost a minute to set up each one. I wanted something that would only take seconds.
I thought about making my own timer app in the terminal using C++ or Python, and decided Python would be a good choice. Instead of building my own, I did some Googling and forked termdown. This Python package had everything I needed, and way more.
Within seconds I can now set up a timer. I am always listening to music while working, so I wanted the program to play a sound or say a message when the timer ended. Termdown plays a bell/beep sound by default when the timer ends. I commented out the beep, and made it say a message using the Mac voice option
os.system('say "Jordan, your timer has finished. Way to focus."'). That’s a long enough message to grab my attention.
I updated my
bash_profile with this alias
alias timer="cd /project/directory && python3 termdown.py" to setup simple timers to run from the home directory like
timer 30m or
timer 13:58. I can now set quick timers to go off a minute or two before my next meeting, and fully focus on my work knowing I’m not going to miss anything.