Toggle Command // Switch for Light/Dark mode instead of two commands

Now turning on Light/Dark mode can be achieved by setting two separate shortcuts. I would like to see it as one shortcut (switch), like the star/unstar option recently added.

30 Likes

Yeah anything like this should be simply “toggle” with a single command to do it.

2 Likes

Adding onto this, I’d love to see automatic toggling based on the current system theme. Not sure how prevalent this is on Windows/Linux, but at least MacOS will automatically switch between dark/light mode based on time of day.

7 Likes

FYI, I filed a separate feature request for auto light/dark mode, as per Silver’s recommendation.

5 Likes

Please allow one hotkey to toggle either dark or light themes. Currently these two options require two separate hotkeys.

This request is similar to the Star/unstar current file hotkey.

13 Likes

Came here to write exactly this.
No point of two hotkeys, when we are actually toggling between light and dark, we can’t use them both at the same time.
A toggle key serves a double purpose, while a “Use light theme” and “Use dark theme” serve only one and confuse me, as I need to ask myself the following:

  1. Which theme am I using?
  2. Which theme do I need to switch to?
  3. What was the hotkey for that?

Edit: this feature request is a duplicate of Switch for Light/Dark mode instead of two shortcuts

3 Likes

yes please

Present in Obs hotkey section.

1 Like

Agreed.

Came here to ask for this. No need for 2 shortcuts when we could use a single command/shortcut for the toggle.

1 Like

As there are only two colour schemes wouldn’t it make more sense to have a hotkey for “toggle colour mode” instead of two separate hotkeys for “use dark mode” and “use light mode”?

I just noticed GitHub - chrisgrieser/obsidian-theme-design-utilities: Some Utilities and Quality-of-Life Features for Designers of Obsidian Themes has a single command for toggling dark and light mode that you can set as a hotkey. :partying_face:

1 Like

Color schemes are theme-based.

If you are on Mac OS with Monterey or above installed there is a simple way to create a keyboard shortcut to toggle from dark to light globally (which is actually much better than toggling it only in Obsidian…).

Then you just have to set the base color scheme of Obsidian to “Adapt to system” and there you are.

Here is a screenshot of the shortcut

There are a few other functions that are entirely part of my obsidian workflow but that are actually set globally in the Mac OS shortcut app. For example looking for a word in a local or online dictionary, internet search or setting timers. It very practical because those functions can also be used in other apps.

1 Like

Use case or problem

My need for light and dark mode change throughout the day. I of course can use the discrete functions to turn on Dark mode or to turn on light mode.

Proposed solution

Single toggle function for dark/light mode. This can be bound to one key (thereby saving a precious hotkey!).

Current workaround (optional)

Use discrete functions. Toggle is not available, as far as I know.

Related feature requests (optional)

3 Likes

customizable sidebar adds an option in command palette for this, so you can assign it a hotkey, or add it to the sidebar. Hope this helps!

1 Like

Thanks. It is always a tight-walk between adding dependencies (plug-ins) and having functionality. Ironically, one of Obsidian’s tenets is to avoid these types of dependcncies.

In general, I try to absolutely limit my dependency on plugins, and I posted this becuase I think, fundamentallly, anything that is “on/off” should have a toggle function available.

1 Like

Hi so yeah right now there are two separate commands (“Use light mode” and “Use dark mode”) but I think it makes a lot more sense to combine them into the one and just make it a toggle (“Toggle between light and dark themes”). Just like vscode.

1 Like

Changed thread title to more clearly reflect the request (was “Toggle function for Dark Mode”).