Matt’s Tidbits #89 — Automating focus time

Matthew Groves
2 min readFeb 2, 2021

--

Last week, I wrote about Android Studio’s “Patch” feature. This time, I want to share what I’ve done to help myself have better focus time.

I’ve finally admitted that I easily get distracted. Slack, email, etc. all provide a nearly constant barrage of inputs, and sometimes it’s impossible to go even 5 minutes without a new message coming in.

The most surefire way to help myself focus is to quit all of my communication apps, but that isn’t always the best idea, as I don’t want to just cut myself completely off from the rest of my team.

There are lots of things you can do, but one of the most effective ones I have found is setting a status in Slack and marking myself as “Away”. (This lets other people know I’m trying to focus, and requires them to push an extra button if they want to notify me of a message — so they can still reach me, but only if they really need to). However, I have multiple Slack workspaces, and I personally find it a little time consuming to perform all of those steps for each workspace. I place a lot of value on automating repetitive tasks, so I got to work on writing some scripts to do this automatically.

I use a Mac for my work, so the first approach that came to mind was Automator or AppleScript. Unfortunately, Slack doesn’t have built-in support for Automator actions, but I did find a GitHub project with a library of AppleScript commands!

Using this, I was able to whip up a pair of scripts — one that sets a status and marks myself as away for all of my Slack workspaces, and another that clears my status and sets me as active!

You can find the scripts here:

To use, follow the instructions in the README for the project.

This is just one example of some time-saving automation you can write yourself! The possibilities are nearly endless! Do you have suggestions for how I could improve these scripts? Leave a note in the comments below or feel free to submit a pull request yourself! And, please follow me on Medium if you’re interested in being notified of future tidbits.

This tidbit was discovered on January 25, 2021.

--

--

Matthew Groves

Digital Products NE Mobile Capability Co-Lead & Senior Software Engineer in Boston, MA — https://www.linkedin.com/in/matthew-groves-85677631/