Ads Responsive Advertisement

Auto-Apply Temporary Themes to VS Code Windows

Auto-Apply Temporary Themes to VS Code Windows

 

Automatically Distinguish VS Code Windows with Temporary Themes or Status Bar Labels

I wanted a simple, automatic way to visually separate windows and instantly know which project I’m editing. That turned into a VS Code extension: Auto Themer — it automatically assigns each window a unique theme or color‑coded status bar label, and the assignments are temporary, resetting when you close the window or switch workspaces.

Install:
https://marketplace.visualstudio.com/items?itemName=seanz-hahaha.auto-themer

Auto Themer Feature

It supports two modes:

Mode 1: Theme-based separation

Give each window a distinct color theme so you can tell them apart at a glance:

by theme
by theme
  • • If Window A uses the default theme and you open Window B with the same theme, Auto Themer will automatically switch Window B to a different theme.
  • • Temporary settings are reset when you close the window or switch workspaces.

Mode 2: Status Bar magic

If you prefer to keep your editor theme untouched, use color-coded status bars with labels instead:

Status Bar labels per window
Status Bar labels per window
  • • When Window B conflicts with Window A, the extension assigns Window B a distinct status bar color and label.
  • • Temporary status bar settings reset on window close or workspace switch.

How to use

Install from the Marketplace and enable the extension.

  • • Set autoThemer.windowsThreshold — only when open windows exceed this number will Auto Themer assign unique visuals.
  • • Choose autoThemer.conflictResolution: theme or statusBar.
  • • Use the sidebar panel to switch themes, change status bar schemes, persist mappings, and view mapping info.
  • • On new workspace open, the extension applies a theme or status bar scheme into .vscode/settings.json. When you switch or close the workspace, it resets workbench.colorTheme.

How It Works

  • • Multi-window instance tracking: all VS Code windows coordinate using a shared global storage directory under context.globalStorageUri.fsPath/instances (macOS example: ~/Library/Application Support/Code/User/globalStorage)
  • • Theme application: writes workbench.colorTheme in the workspace's .vscode/settings.json; the value is removed when the window/workspace closes

Flow:

  1. 1. Delayed initialization on startup; scan and track active window instances
  2. 2. If a workspace is open and a persisted mapping exists, apply the mapped theme (highest priority)
  3. 3. If no mapping and multiple windows are detected, assign a unique theme or status bar scheme
  4. 4. Event-driven detection of theme conflicts, with real-time notifications in the sidebar notifications
  5. 5. On window close or workspace removal, reset the workspace .vscode/settings.json workbench.colorTheme to avoid residual temporary settings

Auto Themer solves a small but productivity-killing problem: mixing up windows. You can separate by theme or by status bar and optionally persist mappings when you need consistency.

more:
https://marketplace.visualstudio.com/items?itemName=seanz-hahaha.auto-themer

 

Coding Tech
Sean Tsang

About

is a writer for SeanTsang Write. Sharing stories and insights on technology, design, and life.

Comments (0)

Leave a Reply

Cancel Reply