Closed andreiborisov closed 5 years ago
I think I've already got you covered here. The spoon allows you to assign a function to DarkMode.functionToCall
.
Here's the documentation for reference:
DarkMode.functionToCall (Function) Variable A function that accepts on boolean argument, which will be
true
when Dark Mode is enabled, andfalse
when it's disabled.
If you haven't had a look yet you might want to have a look at the docs. You can find them by running hs.doc.hsdocs.help()
and then going to the Spoons tab.
Oh, you're absolutely right, I've missed it because it's new one😳
FYI, in a recent commit, c0bad0f, I renamed this variable to callbackFn
.
In order to do custom things when theme is changing (for example, to change Sublime Text theme and color scheme or change macOS accent color), it would be very handy to subscribe to such event through watchers