Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/gnrlleclerc/dynamic-base16-vscode

A VSCode extension to watch theme or colors files for dynamic theme reloading. Made for Flavours.
https://github.com/gnrlleclerc/dynamic-base16-vscode

base16-color theme vscode vscode-extension vscode-theme

Last synced: about 2 months ago
JSON representation

A VSCode extension to watch theme or colors files for dynamic theme reloading. Made for Flavours.

Awesome Lists containing this project

README

        

# 🎨 Dynamic Base16 VSCode theme

A simple VSCode extension to dynamically change VSCode's theme based on a json theme file or a json base16 colors file.
Made to work in tandem with [Flavours](https://github.com/Misterio77/flavours).

Inspired from [dlasagno/vscode-wal-theme](https://github.com/dlasagno/vscode-wal-theme).

Made for Linux by default, but should work on other OS by tweaking the paths settings.

## Features

This extension can watch and dynamically reload either a json theme file or a json base16 colors file.

### Settings

- `dynamic-base16-vscode.mode`: The mode to use. Can be either `theme` or `colors`, defaults to `theme`.
- `dynamic-base16-vscode.theme-path`: The path to the theme json file to watch. Defaults to `~/.config/Code/User/theme.json`.
- `dynamic-base16-vscode.colors-path`: The path to the colors json file to watch. Defaults to `~/.config/Code/User/colors.json`.

## Flavours configuration

The following [Flavours](https://github.com/Misterio77/flavours) configurations can be used together with this extension for dynamic theme reloads.

### Colors

Be sure to put the [`colors.mustache`](./templates/colors.mustache) file in your Flavours configuration folder (`~/.config/flavours/templates/colors/templates/json.mustache`).

```toml
[[items]]
file = "~/.config/Code/User/colors.json"
template = "colors"
subtemplates = "json"
rewrite = true
```

### Theme

```toml
[[items]]
file = "~/.config/Code/User/theme.json"
template = "vscode"
subtemplate = "base16"
rewrite = true
```

## Development Setup

Install the `bun` package manager:

```bash
npm install -g bun
```

Install the dependencies:

```bash
bun install
```

Then `Start Debugging` in VSCode (`F5`).