Changing theme by script


#1

I like to use light themes at times (like during the day), and dark themes at other times. Is there a way to write a script changing theme for Taskpaper? So I can bundle it together with the other appilcations I want to change the theme of with just one click.

Thanks!


#2

I think you could do this by just skipping the selection of a menu item? If so that’s possible with AppleScript already. Here are some links for how to script menu item clicking:

https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/AutomatetheUserInterface.html


#3

This worked well! Thanks

If anyone else wants to now, it looked like this:

click menu item “gruvbox_light.less” of menu of menu item “StyleSheet” of menu “Window” of menu bar 1


#4

Interesting, thank you! I wonder if anything similar is possible in FoldingText? As far as I can see, the themes are not available in the menu.


#5

I used a different approach - keeping the same file but changing its content by time of day - see