This project is no longer maintained (except for PR's, which will still be merged). Feel free to create an issue in case you want to take over and I'll transfer the repository.
Sublime Text 3 layout switch based on sunrise and sunset at your location.
Some of Sublime Text's color schemes are at their best either during day or night. This package lets you automatically switch between 2 color schemes (and optionally a theme) based on your local sunrise and sunset (which takes DST into account).
By default, an IP address lookup with ip-api.com determines your location.
You can hardcode your coordinates in case you don't prefer an IP lookup or it fails.
Install with Package Control.
{
"ipStackAccessKey": "",
"day": {
"color_scheme": "Packages/User/Solarized (Light) (SL).tmTheme",
"theme": "Default.sublime-theme"
},
"night": {
"color_scheme": "Packages/User/Solarized (Dark) (SL).tmTheme",
"theme": "Default.sublime-theme"
}
}
The optional latitude
and longitude
configuration properties allow you to specify a fixed location.
The optional sunrise
and sunset
configuration properties allow you to specify fixed sunrise/sunset times. (Coordinates are still used for determining the current timezone.)
Inspired by NightCycle and based on Michel Anders' blogpost. Thanks to Stijn Mathysen for contributing the IP lookup.