When I need to focus on work, I close all unnecessary programs and turn on Do Not Disturb mode. It’s like a horse’s blinkers, only I’m not looking at the road, but at a text editor, a lecture or an article. At such times, the rest of the world does not exist.
Focus mode has to be turned on several times a day. And in order not to waste extra time, I automated the process using “Alfred” and three keyboard shortcuts.
CapsLockH – closes Telegram, Slack, Messages and Mail;
CapsLockDelete – closes background applications, except for the current one;
CapsLockD – turns on the “Do not disturb” mode.
Now I will show you how you can set up such shortcuts on your own Mac.
You will need Alfred, a computer management program. In Alfred you can create your own mini-programs – workflows. But keep in mind that installation of workflow is only possible in the paid version of Alfred Power Pack.
Download my workflow for Alfred.
This walkflow consists of three scripts and three keyboard shortcuts to launch. A script is a block with program code that you will have to edit a little for yourself.
I also recommend changing the keyboard shortcuts to your taste. But if you liked my shortcuts, then first make a superbutton from CapsLock, otherwise they won’t work.
Script 1 – closes the application list
The first script closes time eaters: instant messengers, twitter, mail. To edit the list for yourself – double-click on its icon.
Program names must be accurate: not Telegram, but Telegram Desktop; not Airmail, but Airmail 2. Look for the correct names in the Applications folder of your Mac.
Script 2 – closes all applications except the current one
I use this script when I need to focus on a single program: a text editor, browser, or PDF document.
Besides the shortcut, you don’t need to configure anything.
Script 3 – turns on and off the “Do not disturb” mode
In Do Not Disturb mode, notifications and sounds are not received. This is convenient when mail and instant messengers are needed for work, but notifications are not.
By default, my script only works with Russian macOS localization. He searches Menubar for the Notification Center button by the keyword “notifications”, and then simulates clicking on it with the mouse held down Alt…
To make the script work in English localization, replace the keyword with “notification”, in Ukrainian – with “povidomlenny”, etc.
You now have three new shortcuts to control unnecessary windows and notifications. That’s enough for a start. But if you want more immersion, read the sequel: how to launch multiple applications with one shortcut.