The asymmetry of a command that you can’t undo with another command from the command palette is really inconvenient.
This would make testing out themes and reverting to my base settings way easier.
If there was a command you could even assign a hotkey to it.
It changes the visual theme to adapt to the system theme. If you don’t believe me, change to either Light or Dark, whatever your system theme is not, and then run the command.
If you want to also change the setting in the dropdown menu in the config for whatever reason, then you’ll have to find the command to save the config.
I would like the dropdown to reflect the change too, and more importantly save the change to disk, which this code doesn’t do. Right now, the changes get lost on an app reload and don’t show up in version control.
I haven’t used Templater before, but to me it looks like it needs an active file, so I can’t use the command with no files open. I also haven’t found a way to use it directly from the command palette. Having to type the Templater command and then the template’s name is not really more convenient than going into the menu.
I had read your message. My primary use is not as a hotkey, but as a command.
I had just made four points on why I find this solution lacking for me. I appreciate your help though.
As a more experienced Templater user, do you know workarounds for the things I brought up, other than a hotkey?
You can’t execute templater scripts if there is no active file. However, you can add the scripts to the command palette in templater plugin setings under template hotkeys.
I found the User Plugins best suited for this.
I also found the way to save the setting to disk (persist). But for my use case, I only wanted it to save so that I go back to system every time. So I made all the variants for commands that don’t save (that are transient) too, if someone also finds them useful.