No description
Find a file
Andrii Hrushetskyi fa5af5a3be updated versions
2025-03-13 01:02:41 +01:00
.editorconfig use LF instead of CRLF (#28) 2022-04-15 14:13:31 -04:00
.eslintignore fix .eslintignore (#48) 2023-01-19 10:06:51 -05:00
.eslintrc add version bump script (#10) 2022-01-22 16:13:50 -05:00
.gitignore Update .gitignore (#25) 2022-01-28 10:34:53 -05:00
.npmrc add version bump script (#10) 2022-01-22 16:13:50 -05:00
esbuild.config.mjs build: minify prod build 2023-11-15 14:10:43 -05:00
LICENSE updated licence 2025-03-12 23:31:13 +01:00
main.ts fixed 2 typos 2025-03-12 23:00:59 +01:00
manifest.json updated versions 2025-03-13 01:02:41 +01:00
package-lock.json added suncalc to package.json 2025-03-12 00:01:00 +01:00
package.json updated versions 2025-03-13 01:02:41 +01:00
README.md updated readme file 2025-03-13 00:43:07 +01:00
styles.css Update sample css file. 2022-08-09 13:39:02 -04:00
tsconfig.json Fix inconsistent indentation 2024-01-19 21:14:58 +02:00
version-bump.mjs add version bump script (#10) 2022-01-22 16:13:50 -05:00
versions.json updated versions 2025-03-13 01:02:41 +01:00

Smart DayNight Switcher

What does this plugin do?

This plugin 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 doesnt allow plugins to access your geolocation, so youll need to input it manually.


How to find your coordinates?

Its 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), its 05:22 and 17:33. Quite a difference, right? Curious why? Check YouTube or this Wikipedia article for more!

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

What if I dont enter coordinates?

The plugin defaults to Londons 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. Ill check it out and do my best to help!