Jump to content

macOS Mojave Dark Mode Workflow for Alfred v.0.5


Miko

Recommended Posts

Dark Mode Workflow for Alfred v.0.5

light-dark-sm

 

Enable Dark Mode or Light Mode on macOS Mojave using Alfred

 

Download Dark Mode WorkFlow

 

Or

 

Download Dark Mode WorkFlow (Alfred Theme + macOS Mojave)

This version includes the ability to switch Alfred theme to Alfred Mac OS and Alfred MacOS Dark.

 

Install

  1. Double click on the "Dark Mode Workflow for Alfred 0.5.alfredworkflow" workflow that you have just downloaded.
    More info: https://www.alfredapp.com/help/workflows/

 

Usage

  1. use darkmode to enable Dark Mode

  2. use lightmode to enable Light Mode

  3. use togglemode to toggle between Dark Mode and Light Mode

 

Optional

Within the WorkFlow settings in Alfred, you can add your custom Hotkey to trigger the three commands

 

License

MIT © 2018 Miko Magni

Edited by Miko
Updated version
Link to comment

Would be nice if this workflow can change the used Alfred theme as well when switching to dark mode <-> light mode,

 

Can this be implemented or can I add this to workflow on my own?

 

Solved it, it’s just on additional line at the end of your script. Just put in your preferred dark and light theme.

 

Exchange this on „lightmode“ -Script 

tell application "System Events"
	tell appearance preferences
		set dark mode to false
	end tell
end tell

tell application "Alfred 3" to set theme "Alfred macOS"

Exchange this on „darkmode“ -Script 

tell application "System Events"
	tell appearance preferences
			set dark mode to true
	end tell
end tell

tell application "Alfred 3" to set theme "Alfred macOS Dark"

 

Exchange this on „togglemode“ -Script

tell application "System Events"
	tell appearance preferences
 		set dark mode to not dark mode
	end tell
end tell

tell application "Alfred 3" to set theme "Alfred macOS"

 

Edited by Dasblatz
Update
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...