Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Smart DayNight switcher

andrii256andrii256842 downloads

Intelligently determines sunrise and sunset times and automatically switches the color scheme to light or dark mode.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates3

Calculates daily sunrise and sunset times for your location and automatically switches your Obsidian theme: light mode when the sun rises ☀️ and dark mode when it sets 🌒.

No more manual theme switching!

How to use it?

  1. Install the plugin and enable it.
  2. Go to the plugin settings and enter your approximate coordinates (latitude and longitude).
  3. Enjoy!

Note: Obsidian doesn’t allow plugins to access your geolocation, so you’ll need to input it manually.


How to find your coordinates?

It’s simple!

  1. Open latlong.net, gps-coordinates.net, or any similar tool.
  2. Type your city name or pick a spot on the map.
  3. Copy the coordinates and paste them into the plugin settings.

Why are coordinates needed?

Sunrise and sunset times vary by location and date due to latitude, longitude, and the time of year. For example, on March 12, 2025, the sun rises at 07:05 and sets at 16:16 in Madrid, but in Warsaw (same time zone), it’s 05:22 and 17:33. Quite a difference, right? Curious why? Check YouTube or this Wikipedia article for more!

Note: Obsidian doesn’t allow plugins to access your geolocation, that is why you need to input it manually.

What if I don’t enter coordinates?

The plugin defaults to London’s coordinates, switching themes based on sunrise/sunset there.

How does it use location data?

The plugin uses your latitude and longitude in a formula to calculate sunrise/sunset times locally on your device. No data is sent anywhere. Still worried? Feel free to use coordinates of a nearby city (within 200 km) instead—though the further away, the less accurate the timing.

Found a bug or have a feature idea?

Feel free to open an issue in this repository. I’ll check it out and do my best to help!

Future Features

If this plugin becomes popular enough (downloaded by over 5,000 people), I’ll make an effort to implement the following features:

  • Option to set an offset
    If you’d like the dark theme to activate, for example, 10 minutes / 20 minutes and etc. before sunset or after sunset, you’ll be able to specify this offset in the settings;
  • Option to switch not only the color scheme but also the theme itself (a separate theme for nighttime and one for daytime);
  • Smooth color transition
    The background color won’t abruptly turn dark black. As the sun begins to set, the plugin will gradually darken the background—slightly at first, then progressively darker until sunset;
  • Synchronization with the ambient light sensor (if the Obsidian API supports this; I haven’t checked yet);
  • Enable dark theme when the device switches to power-saving mode.
72%
HealthGood
ReviewSatisfactory
About
Switch Obsidian between light and dark themes automatically based on calculated local sunrise and sunset times. Enter your latitude/longitude (defaults to London if omitted); calculations run locally and no location data is sent.
ThemingAutomationDates
Details
Current version
1.0.3
Last updated
Last year
Created
Last year
Updates
3 releases
Downloads
842
Compatible with
Obsidian 1.8.9+
Platforms
Desktop, Mobile
License
OTHER
Report bugRequest featureReport plugin
Author
andrii256andrii256
github.com/Andrii256
GitHubandrii256
  1. Community
  2. Plugins
  3. Theming
  4. Smart DayNight switcher

Related plugins

Day and Night

Automatically toggle themes between day theme and night theme on a set time schedule.

Rollover Daily Todos

Rollover any unchecked checkboxes from your last daily note into today's note.

Vault Changelog

Maintain a changelog of recently edited notes.

Update modified date

Automatically update a frontmatter modified date field when the file is modified.

Minimal Theme Settings

Control the colors and fonts in Minimal Theme.

QuickAdd

Quickly add new notes or content to your vault.

Templater

Create and use dynamic templates.

Homepage

Open a note, base, or workspace on startup, or set it for quick access later.

Hider

Hide interface elements such as tooltips, status bar, titlebar, and more.

Day Planner

Day planning from a task list in a Markdown note with enhanced time block functionality.