Jump to content
Miko

macOS Mojave Dark Mode Workflow for Alfred v.0.5

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

Share this post


Link to post

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

Share this post


Link to post
8 minutes ago, deanishe said:

Long ago, I wrote a script to automatically change Alfred's theme at sunrise and sunset.

 

Perhaps someone might be interested in editing the AppleScript to also change Mojave's theme?

 

Or does Mojave take care of that itself?

Mojave doesn’t take care for this, but there is a small app called NightOwl which uses also Sunset/Sunrise

NightOwl Link

Share this post


Link to post

Thanks. I’ve been using F.lux, as it also changes the screen colour to make it easier to sleep or something. Makes it yellow at night, basically. 

Share this post


Link to post

@Dasblatz  including the Alfred theme switch.   The workflow is a separate install as I prefer using a custom Aflred theme :)

 

I didn't include the toggle as it was only changing the Alfred theme to light.

 

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...