Email or username:

Password:

Forgot your password?
Niki Tonsky

New macOS app! In case you were as annoyed as me toggling light/dark mode through System Settings or Control Center github.com/tonsky/DarkModeTogg

12 comments
Dieter Komendera

@nikitonsky please don't be mad if I create a PR to relabel those items “Choose the Dark Side" and “Chose the Light Side”

bouncepaw 🍄

@nikitonsky Cool! I bound a short script to something some time:

osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to not dark mode'

I see that you are using a similar spell in the code:

github.com/tonsky/DarkModeTogg

Ah, if only I didn't solve the problem myself some time ago! I want to use your app, but I don't need it...

Niki Tonsky

@bouncepaw crazy how there’s no system API but Apple Script saves the day once again

bouncepaw 🍄

@nikitonsky I think Apple Script is the system API. I actually think there should be more Apple Script.

Hwee-Boon Yar

@nikitonsky when do you use it? For testing look & feel for WIP products?

Hwee-Boon Yar

@nikitonsky I see. Alfred/Raycast and friends for such utilities maybe? Since it'd just be a 1-2 liner script :)

M

@nikitonsky similarly Raycast also has commands for toggling dark/light OS themes raycast.com/extensions/system And it comes with an extra benefit that Raycast is great for other purposes too, just as an option :capyface:

Ilya Birman

@nikitonsky, isn’t the hotkey much easier? (It’s ⌘F12 in my case)

Niki Tonsky

@ilyabirman Let’s just say I didn’t think it much through

Go Up