Hi this is Gary with MacMost.com.
In this episode let me show you how you can create a keyboard shortcut or an icon in the
Dock so you can quickly switch between Light and Dark Modes on your Mac.
I couldn't do MacMost without its supporters.
Go to MacMost.com/patreon.
There you can read more about the Patreon Campaign.
Join us and get exclusive content.
So Dark Mode is a great thing and a lot of people like to use it.
But some people like to switch between light and dark modes frequently throughout the day.
Sometimes there's just some sort of task that are better suited towards one or the other.
Other times we just like to breakup the fatigue of just staring at the screen by switching
between light and dark modes.
So what would be great is to have a switch where you can quickly switch with either one
click or a keyboard shortcut between the two modes.
You can set that up using Automator.
Let's take a look.
So whether you're in Catalina or in Mojave if you go to System Preferences you can click
on General and then you get the option to switch between light and dark modes.
In Catalina you also get an Auto setting too.
But what if you want to switch manually.
If you just want to be able to switch quickly between light and dark and you don't want
to launch System Preferences, go to General, and then go and click one of these buttons.
Well you can get apps that can do this for you.
But you don't need to install anything new onto your Mac to do this because you can create
something very simple in Automator to do this and assign it to a keyboard shortcut even.
So just run Automator and then choose Quick Action.
We're going to set this up as a Quick Action first.
So Quick Action we're just going to Receive No Input from anything because we don't need
any input for this.
We're going to have it work in any application.
You can change the icon and color if you want.
I'll leave them as the defaults.
Now we're going to look in here, under Actions, and make sure Library is selected so you can
search everything.
We're going to search for Appearance.
There's one called Change System Appearance.
We're going to drag that in here.
What this allows us to do is to either toggle the Light and Dark modes, Switch to Dark,
or Switch to Light.
So we'll leave it on Toggle Light Dark.
Now this is all we want it to do.
So I'm going to go to File, Save and I'm going to give it a name.
This is the name that will appear then in the menu so I want to make sure it's something
good.
I'm going to do Light-Dark and Save it.
So now when I go to any application menu like this, go to Services, I'll see Light-Dark
there and I can select it to switch modes.
Now the first time you run this you may get asked permission.Like Automator wants permission
to access System Appearance.
You would have to say OK.
Now unfortunately you're going to be asked this permission the first time you run this
automated workflow in each app.
So if you get asked in Automator you won't get asked in Automator again.
If you then run another app, let's say Reminders, and I go to Services here and I switch then
it's going to ask me in Reminders but once I say OK it will never ask me in Reminders
again.
It's a little annoying but it's the price we pay to be a little more secure.
Now that we have this in a menu item here we can assign a keyboard shortcut to it.
So let's go into System Preferences and here I'm going to go to Keyboard and then Shortcuts
and then I'm going to go to Add Shortcuts and hit the Plus button.
I'm going to say in All Applications.
Let's do the menu title and we have to type exactly whatever we called this workflow.
It needs to match this perfectly.
So, Light-Dark.
Let's do the keyboard shortcut.
I'm going to do Command Shift F1 and add it.
Now you can see Light-Dark is Command Shift F1.
We'll exit from there.
Now when we go to Services we'll see Command Shift F1 for Light-Dark.
I can use that keyboard shortcut to quickly switch between light and dark modes.
So as a bonus if you wanted this in the Dock instead what you could do is create an Automator
workflow that is an Application instead.
Then add the same thing there.
Toggle Light Dark.
We'll Save it in the Applications folder.
We'll call it Light-Dark.
You can save this in your Documents folder.
Then if we go and look for that in the Finder, we'll go to the Applications folder here and
find Light-Dark and I can drag that to the Dock and you can see it appear there.
So now I can click that.
It's going to ask permission the first time and after that I can switch as much as I want
by hitting that in the Dock.
So two different ways to do it.