Find a way of switching between dark and light mode and switching the associated theme at the same time.
For example, for dark mode I prefer to use the Blackbird theme.
For light mode, I love the Primary theme.
Things I have tried
Creating a QuickAdd plugin macro
Creating a Commander plugin macro
I end up with a situation where a macro can bring up the theme selection dialog but then you need to pick the theme manually anyway.
Interesting.
There’s the theme design utilities plugin which allows to toggle between light and dark mode. I never understood why Obsidian adds two buttons to switch theme mode instead to add a simple toggle for the user interface.
However, to switch themes and theme mode at the same time, you’d need a plugin.
I’m trying to write a plugin doing this. In essence, settings to connect two different themes to Dark and Light mode. Then listening to dark/light mode changes to do the corresponding theme change.
Right now, I’m stuck at how change the theme in Obsidian from Typescript. Is there even an API for that? I’m looking at the theme switcher plugin GitHub - kenset/obsidian-theme-picker as an inspiration but I’m unable to find an API that actually does the switch in Obsidian.
OK, so I uploaded a first version here. I discovered a feature interaction with Obsidian’s Appearance dialog. If you pick two different themes, switching between Light/Dark in the “Base color scheme” drop down in fact changes the theme, though the “Themes” dropdown does not reflect the change. In the example, you can see the Primary theme and the “Themes” dropdown saying Blackbird.
I don’t know if there is a way of invalidating the current settings modal. Anyway, I’ll try doing a release and see if this is acceptable as a plugin contribution
would it be possible to have a hours and minutes input field in your plugin preferences to activate automatically light or dark mode? This would complete your plugin, imo.