smhg / sublime-suncycle

Sublime Text layout switch based on sunrise and sunset at your location.
MIT License
12 stars 6 forks source link

Unmaintained

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.

SunCycle

Sublime Text 3 layout switch based on sunrise and sunset at your location.

Sublime Text Console

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 freegeoip.net determines your location. So the switch is adjusted when you travel across timezones.

You can hardcode your coordinates in case you don't prefer an IP lookup or it fails.

Installation

Install with Package Control.

Default preferences

{
    "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.

Credits

Inspired by NightCycle and based on Michel Anders' blogpost. Thanks to Stijn Mathysen for contributing the IP lookup.