Smart DayNight switcher

by Andrii Hrushetskyi
5
4
3
2
1
Score: 31/100

Description

The Smart DayNight switcher plugin automatically adjusts your Obsidian theme based on local sunrise and sunset times, offering a seamless transition between light and dark modes throughout the day. By entering your location coordinates manually, the plugin calculates accurate time changes and adapts the theme accordingly without sending data externally. This setup removes the need to manually switch themes as daylight changes. It works entirely offline and ensures your workspace aligns naturally with your environment.

Reviews

No reviews yet.

Stats

2
stars
815
downloads
0
forks
404
days
396
days
408
days
3
total PRs
0
open PRs
0
closed PRs
3
merged PRs
2
total issues
2
open issues
0
closed issues
9
commits

Latest Version

a year ago

Changelog

Implemented corrections from https://github.com/obsidianmd/obsidian-releases/pull/5684#issuecomment-2744079414 . Functionality left the same, but there were changes in code.

README file from

Github

Smart DayNight Switcher

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.

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Group Snippets
4 years ago by Mara-Li
Create folder of snippets to activate them in one click !
Day and Night
4 years ago by Kevin Patel
An Obsidian plugin to automatically switch between day and night themes based on a set schedule
Theme Toggler
4 years ago by larsmagnus
Toggle the theme in Obsidian's panels
Dynamic Background
4 years ago by Samuel Song
Adding dynamic background effects to the Obsidian editor
Callout Manager
3 years ago by eth-p
An Obsidian.md plugin that makes creating and configuring callouts easy.
Mermaid Themes
3 years ago by jvsteiner
mermaid themes for obsidian
Code Styler
3 years ago by Mayuran Visakan
A plugin for Obsidian.md for styling codeblocks and inline code
HelpMate
2 years ago by TfTHacker
HelpMate for Obsidian - providing help and documentation from within Obsidian
VARE
2 years ago by 4Source
This is a plugin for Obsidian (https://obsidian.md). Allows you to easily manage your plugins and themes inside Obsidian.
Fast Text Color
2 years ago by Leon Holtmeier
Obsidian plugin to enable colored text with a custom syntax.
Minimal Theme Settings
5 years ago by @kepano
Settings plugin to control colors and fonts in Minimal Theme
Style Settings
5 years ago by mgmeyers
A dynamic user interface for adjusting theme, plugin, and snippet CSS variables within Obsidian
Theme Picker
5 years ago by kenset
Auto Class
4 years ago by Nathonius
Automatically add CSS classes to notes based on file path.
Theme Design Utilities
4 years ago by pseudometa
Some utilities and Quality-of-Life features for designers of Obsidian themes.
Auto switch themes between dark/light mode
a year ago by Robert Storlind
Obsidian plugin for switching themes when toggling dark/light mode
Friday
a year ago by sunwei
Write anywhere. Publish everywhere. Sync your notes, publish instantly, turn Markdown into websites.
Obsifetch
a year ago by tabibyte
neofetch but for obsidian
Color Folders and Files
a year ago by Mithadon
Obsidian plugin to customize the appearance of folders and files through a context menu with color picker and style options.
Theme Controller
a year ago by Binaris
Set when and how the themes will be displayed
Theme toggle
a year ago by @gapmiss
Obsidian.md plugin … adds a ribbon icon and command for toggling between dark & light theme modes.
Rainbow-Colored Sidebar
a year ago by Kevin Woblick
Automatically color your sidebar like a rainbow. No configuration needed. 8 themes included.
Image Border Style
a year ago by Anurag Shenoy
An Obisidian plugin to configure rounded borders for images (both in-editor and in reading-mode).
Banners Reloaded
2 months ago by Dani García
A simple, fast, and lightweight way to add customizable banners to your notes.
Hide Traffic Lights
a month ago by Ben Phillips
Hides macOS traffic light buttons for a distraction-free experience. Hover over the top-left corner to reveal them.