|
Platform | Keybinding | Description |
---|---|---|
Windows | ctrl+alt+t | Toggles between your day/night theme. |
Mac | ctrl+cmd+t | Toggles between your day/night theme. |
Note: Whenever you use one of these keybindings, Sundial will be disabled.
Commands
Sundial contributes the following commands:
Command | Description |
---|---|
Sundial: Switch to night theme 🌑 | Switches to your night theme. |
Sundial: Switch to day theme 🌕 | Switches to your day theme. |
Sundial: Toggle Day/Night Theme | Toggles between your day/night theme. |
Sundial: Enable extension | Continues automation and enables extension. |
Sundial: Disable extension | Disables extension. |
Sundial: Pause until next circle | Pause until next day/night circle. |
Note: Whenever you use one of the first three commands, Sundial will be disabled.
Settings
Sundial contributes the following settings:
Setting | Default | Description |
---|---|---|
workbench.preferredLightColorTheme |
Default Light+ | Name of the theme of choice for your day work. |
workbench.preferredDarkColorTheme |
Default Dark+ | Name of the theme of choice for your night work. |
sundial.sunrise |
07:00 | Set a time when your day starts in 24 hours format. |
sundial.sunset |
19:00 | Set a time when your night starts in 24 hours format. |
sundial.dayVariable |
0 | Set a variable to change the theme X minutes before or after sunrise. |
sundial.nightVariable |
0 | Set a variable to change the theme X minutes before or after sunset. |
sundial.daySettings |
{} | An object of VSCode settings applied on the day. |
sundial.nightSettings |
{} | An object of VSCode settings applied on the night. |
sundial.interval |
5 | Set a interval in which sundial should check the time in minutes. |
⚠️ Don't forget to set
"window.autoDetectColorScheme": false
If you set the interval to zero (0) sundial will not periodically check the time but still when VS Code triggers some editor events.
On both
daySettings
andnightSettings
they will override your Workbench VSCode settings. Please make sure both have the same properties otherwise they will not change since Sundial is not remembering the settings you have set before!
Automatically set by current location
Sundial will get your geolocation from Free IP Geolocation API and check your internet connection via Cloudflares 1.1.1.1 DNS-Server.
Setting | Default | Description |
---|---|---|
sundial.autoLocale |
false | Updates your location based on your geolocation. |
Automatically set by latitude and longitude
You can get your geolocation here: Free IP Geolocation API
Setting | Default | Description |
---|---|---|
sundial.latitude |
⊘ | e.g. "50.110924" |
sundial.longitude |
⊘ | e.g. "8.682127" |
Automatically set by OS appearance
Since VS Code version 1.42.0 it is now build in so you don't need this extension for this options.
{
"window.autoDetectColorScheme": true
}
Read more about the implementation here:
- https://github.com/microsoft/vscode/issues/61519
- https://github.com/microsoft/vscode/pull/86600
- https://github.com/microsoft/vscode/pull/87405
Execution order
Sundial will check your settings in the following order and if one setting is present the next coming will be ignored.
sundial.latitude
andsundial.longitude
sundial.autoLocale
sundial.sunrise
andsundial.sunset
Examples
{
"window.autoDetectColorScheme": false, // required!
"workbench.preferredLightColorTheme": "Default Light+",
"workbench.preferredDarkColorTheme": "Default Dark+",
"sundial.interval": 20,
"sundial.autoLocale": true
}
{
"window.autoDetectColorScheme": false, // required!
"workbench.preferredLightColorTheme": "Default Light+",
"workbench.preferredDarkColorTheme": "Default Dark+",
"sundial.sunrise": "05:12"
}
{
"window.autoDetectColorScheme": false, // required!
"workbench.preferredLightColorTheme": "Default Light+",
"workbench.preferredDarkColorTheme": "Default Dark+",
"sundial.dayVariable": 43,
"sundial.latitude": "50.110924",
"sundial.longitude": "8.682127",
"sundial.daySettings": {
"editor.fontSize": 13
},
"sundial.nightSettings": {
"editor.fontSize": 15
}
}
Development
We are working with webpack to bundle Sundial to the smallest possible size to increase the load time in VSCode.
- Install packages via (your preferred package manager)
pnpm install
- Set
sundial.debug
to2
- Run debugger =>
Launch Extension
- View the Extension Host and adjust settings to test or
- Change a file and save it, let webpack compile
- Commit your changes with a detailed explanation
- Create a pull request
Commits
Sundial follows this spec:
Releases
Run the below to create a new release. This will increase the version based on your changes and create a new CHANGELOG.md section.
pnpm run release