Focus with Alfred

One of things that kept bugging me at work was a problem a lot of may be familiar with: switching contexts far too often. Colleagues come and ask questions, mails arrive, notifications pop up – a typical workday for me is often interrupted by various things, some more, some less important.

Of course, this immediately kills productivity and concentration especially as a developer – there’s the one image describing it at its core:

Developer focus after an interruption

As a result of this I was hardly able to really progress in my tasks and needed to turn this over again.

Keeping Focus

The approach I took was to take myself certain time blocks, typically either 30 or 45 minutes. Then I’d go along and do the following:

  • disable notifications in macOS
  • start a timer to keep track when time is up
  • enable flight mode on my mobile
  • … and finally set /dnd mode in Slack and set my /status to indicate to my co-workers that I really don’t want to be interrupted

It turned out to be quite successful – I could definitely get more work done again but one thing was still odd: I was clicking a lot to enable and disable everything. What do you do as a lazy developer? Yes – you automate.

Alfred to the Rescue

Some of you may already be familiar with Alfred App – the handy and powerful brother of Spotlight. I have been using it for quite a while now so the decision was easy to create my own workflow for Alfred.

So, that is what happened and here’s how it looks:

Starting Focus Mode

Using focus 20 I can now start my focus time of 20 minutes, automatically have notifications disabled, Slack status set, and all reverted after the time is up. While it is active I can of course stop it manually by using focus again or just see the remaining time:

Stopping Focus Mode

I published this one alongside with another one to easily create screen captures and store them as GIFs – as used in this post.

Check them out here: and let me know what you think!

2 thoughts on “Focus with Alfred

  1. This is great! I found this post because I was looking for a way to have Alfred behave like SelfControl or Focus.

    Have you tinkered with enabling site blocking?

    1. Hey Brian, thanks for your comment! No not really – that’s what still works with some self control for me right now 😀 The problem there would be my mobile phone… but that’s something I can’t hide with Alfred probably…

Leave a Reply to rose-m Cancel reply

Your email address will not be published. Required fields are marked *