We are already used to the dark mode and the Touch Bar of the MacBook Pro. It cannot be said that it is a novelty, however it is something we use on a daily basis. If you have not configured it to work automatically, you will have to do it manually. Sometimes it is too tedious to do it this wayHowever, it is the most effective, because I am the one who determines when it is activated and when not.
There is a way to be in complete control and not go through all the steps to activate dark mode manually. We only need to add an access to this mode in the Touch Bar of our MacBook. We show you how to do it.
Dark mode in the Touch Bar. Fast and efficient
The key is in Automator. That it is capable of performing any action automatically, even with the images. In this way we press a button on the Touch Bar and this causes an Automator action to be executed, which in turn causes an AppleScript to be executed that causes dark mode to be activated or deactivated, or any other action that we let us propose that it be done.
To add any action to the Touch Bar we must follow the following steps:
System Preferences> Extensions. Next, in the sidebar, we select Touch Bar andn this panel. At that moment we will see all the quick actions available. To add one to the Touch Bar, we simply check the box that interests us.
Now let's see how you can add a custom action. In this case the dark mode:
You already know that we are going to need to use the Automator application. We open it and we create a new workflow (No file> new) and select the quick action option. In this way, that new action that we are going to create through the application will appear in the Quick Actions panel.
To create the action in dark mode, what we have to do is introduce a simple AppleScript, that will alternate between one mode or another. A switch to turn off and on the dark mode, whenever we want. To do this you just have to copy and paste the following commands:
on run input, parameters
tell application "system Events"
tell appearance preferences
set dark mode to not dark mode
end tell
end tell
return input
end run
We save the quick action, assign a name and we can add it to the Touch Bar, in the way we have indicated previously. From now on and whenever you want to activate the dark mode, you can do it from the Touch Bar, without further complications.
Following these instructions, you can add any action you want. A very comfortable way and not at all difficult. We encourage you to try it out and share with us the ones you have created yourself.