Nightlight, a VS Code extension.
31 January 2020
I’ve created an extension for Visual Studio Code that switches the color theme based on the time of day. By providing your GPS coordinates, you can use it to automatically switch to dark mode when the sun sets and switch to light mode when the sun rises. You can get it at the Visual Studio Marketplace.
Features
Nightlight has the following features:
- Set a night and day theme, for instance Night Owl at night and Atom One Light when it’s daytime.
- Switch themes when the sun rises or sets.
- Switch themes on predefined times.
- Switch themes manually by using your own shortcut (CTRL+ALT+N by default).
- Switch icon themes along with the color theme (since v1.3).
Configuration
Nightlight can be configured by setting the following settings:
nightlight.nightTheme
: The theme to be displayed when it’s nightnightlight.nightIconTheme
: The icon theme to be displayed when it’s night (default = your current icon theme)nightlight.dayTheme
: The theme to be displayed when it’s daynightlight.dayIconTheme
: The icon theme to be displayed when it’s day (default = your current icon theme)nightlight.dayTimeStart
: The time (format HH:mm) at which day time starts (if no GPS coordinates are configured)nightlight.dayTimeEnd
: The time (format HH:mm) at which day time ends (if no GPS coordinates are configured)nightlight.gpsLong
: The GPS longitude coordinate. This is used to determine the sunrise and sunset locally on your device.nightlight.gpsLat
: The GPS latitude coordinate. This is used to determine the sunrise and sunset locally on your device.
You can download the extension here and find the source code on GitHub.