Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/h1dd3n3y3/dynamicvscodetheme

A usefull PowerShell script to toggle between light and dark theme presets.
https://github.com/h1dd3n3y3/dynamicvscodetheme

automation dark-mode-toggle powershell vs-code

Last synced: about 1 month ago
JSON representation

A usefull PowerShell script to toggle between light and dark theme presets.

Awesome Lists containing this project

README

        

# Dynamic VS Code Theme

A PowerShell script to switch between preferred light and dark themes in Visual Studio Code based on the time of execution.
Pair that with Windows Task Scheduler and let the automation begin! 💯💪✈️

## Features

- Detects and updates the current theme in your VS Code settings.
- Works seamlessly with your existing VS Code setup.
- Customizable time thresholds for light and dark themes.

## Defaults

By default the script utilizes the below hour toggles:

- **Light theme:** 07:00.
- **Dark theme:** 17:00.

## Requirements

To use this script, ensure you have the following:

1. **Visual Studio Code**: Installed on your system.
2. **PowerShell Environment**: Either PowerShell 5.1 or 7.
3. **Access to VS Code's settings.json**: Located under `%APPDATA%\Code\User\settings.json`.
4. **Preferred light & dark theme properties in settings.json:**
- `"workbench.preferredLightColorTheme"`
- `"workbench.preferredDarkColorTheme"`

## Usage

1. **Setup**: Save the script to a location on your system.
2. **Run**: Execute the script in PowerShell:
```
powershell -Exec Bypass .\set_vs_code_theme.ps1