Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Custom LogoNew to Visual Studio Code? Get it now.
Custom Logo

Custom Logo

js2me

|
1 install
| (0) | Free
Per-project window icon in the OS window switcher (Alt+Tab) plus a per-project window title. Icon: Linux (GNOME/KDE, X11 and Wayland). Title: all platforms.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Custom Logo for VS Code

Shows a per-project icon for VS Code in the OS window switcher (Alt+Tab / Cmd+Tab) — so when you have five VS Code windows open, you can tell projects apart at a glance.

Drop a PNG into your project as .vscode/logo.png — that's it. Every project gets its own logo in the window switcher.

Platform support

Platform Alt+Tab icon Window title
Linux (GNOME/KDE, X11 and Wayland) ✅ ➖ not needed (switcher shows no titles)
Linux — VS Code as Snap/Flatpak ⚠️ limited (desktop file lives outside the lookup chain) ➖
Windows ✅ per-window, via WM_SETICON (PowerShell helper, no extra installs) ✅
macOS ❌ impossible from an extension — see below ➖

Installation

From a .vsix package

  1. Grab vscode-custom-logo-<version>.vsix (from Releases, or build it yourself — see below).

  2. Install it, either from the terminal:

    code --install-extension vscode-custom-logo-0.4.0.vsix
    

    or from the UI: Extensions view → ... menu → Install from VSIX... → pick the file.

  3. Reload every open VS Code window (Ctrl+Shift+P → Developer: Reload Window) — the extension activates on window start.

Build from source

git clone <repo-url> vscode-custom-logo
cd vscode-custom-logo
npm install
npx @vscode/vsce package --allow-missing-repository
# produces vscode-custom-logo-<version>.vsix, then install as above

For development, open the folder in VS Code and press F5 to launch an Extension Development Host. Note the extension only runs in windows where it is installed/enabled — the development host is a separate window.

Getting started

  1. Add the logo to your project: put a square PNG at <project>/.vscode/logo.png (256×256 recommended, must not exceed 256×256, PNG format).

    Prefer a different name/location? Set customLogo.iconPath (relative to the workspace root or absolute) in the project's .vscode/settings.json:

    {
      "customLogo.iconPath": "assets/app-icon.png"
    }
    
  2. Reload the window if the extension was just installed/updated.

  3. Focus the window — the icon applies on focus. Press Alt+Tab to see it.

  4. Verify (optional): open View → Output → Custom Logo channel — you should see Applied project icon ....

The logo file is watched: replace .vscode/logo.png and the switcher icon updates within a second. Remove the file and the stock VS Code icon comes back.

Behavior with multiple windows

  • Linux: desktop environments show one icon per application, so the icon reflects the VS Code window that was focused most recently.
  • Windows: the icon is set per window — every VS Code window keeps its own project icon in Alt+Tab simultaneously.

When the last window that applied an icon closes, the stock VS Code icon is restored automatically.

What the extension modifies (and how to undo it)

Nothing system-wide is ever touched; all changes are user-local and reversible:

Where What Reverted by
Linux: ~/.local/share/icons/hicolor/*/apps/vscode.png User-local theme override with the project logo Closing the window / the Restore command — files are deleted and the packaged icon returns
Linux: icon theme setting Briefly toggled to another theme and back to force GNOME to refresh (≤1s) Automatic — the original theme is always restored
Windows: the window itself WM_SETICON with the project icon Restore command / closing the window
Windows: project's .vscode/settings.json window.title template — only if the project does not define its own window.title Removed automatically when the extension is disabled/uninstalled or the setting no longer applies

To revert everything manually, run Custom Logo: Restore Default Icon and Title, then uninstall the extension.

Settings

Setting Default Description
customLogo.enabled true Enable the per-project window icon.
customLogo.iconPath "" PNG path, relative to the workspace root or absolute. Empty = use .vscode/logo.png.
customLogo.setWindowTitle true Windows only: rewrite window.title in workspace settings. Skipped if the project defines its own title.
customLogo.titleTemplate ${folderName}${separator}${activeEditorShort} Template written to window.title on Windows.
customLogo.linux.method auto iconTheme (= auto, refreshes live) or desktopFile (only applies after a full VS Code restart on GNOME).
customLogo.linux.forceShellRefresh true GNOME: briefly toggle the icon theme to force the shell to drop its icon cache. Short flicker when the icon changes.
customLogo.linux.iconName "" Icon name to override (code, vscode, codium...). Only for the iconTheme method. Empty = auto-detect.

Commands

  • Custom Logo: Apply Icon Now
  • Custom Logo: Restore Default Icon and Title

Troubleshooting

  • Nothing happens: make sure you reloaded the window after installing, and check the Custom Logo output channel for errors.
  • Linux, icon changes late or never: keep customLogo.linux.forceShellRefresh enabled on GNOME — without it the shell shows its cached icon. The desktopFile method only applies after a full VS Code restart.
  • Snap/Flatpak builds keep their desktop files outside the standard lookup chain — use the .deb build of VS Code.
  • Windows, icon does not change: the helper needs PowerShell (powershell.exe). If your environment blocks scripts entirely, ExecutionPolicy Bypass per-process is used, but restrictive AppLocker policies may still interfere — check the output channel.
  • VS Code Insiders / VSCodium / OSS builds: detected automatically; the desktopFile method follows the packaged desktop file, the iconTheme method follows customLogo.linux.iconName if auto-detection picks the wrong name.

How it works (Linux)

There is no API (especially on Wayland) to change a running window's icon, and GNOME Shell caches app icons aggressively. The combination that refreshes live (verified on Ubuntu GNOME/Wayland):

  1. The project PNG is written as a user-local icon-theme override: ~/.local/share/icons/hicolor/{256x256,48x48}/apps/<name>.png, where <name> is the icon name from VS Code's packaged desktop file (auto-detected, e.g. vscode). System files are never touched.
  2. gtk-update-icon-cache rebuilds the theme cache.
  3. The trick: the system icon theme is briefly toggled to another theme and back (gsettings ... icon-theme), which forces GNOME Shell to drop its in-memory icon cache and re-resolve — the new icon appears immediately. This causes a short icon flicker and only happens when the icon actually changes (content hash is tracked); disable via customLogo.linux.forceShellRefresh.
  4. On exit the override files are deleted and the stock icon returns.

An alternative desktopFile method (user-local copy of the .desktop file with an absolute Icon= path) is available via customLogo.linux.method — note GNOME does not re-read the desktop file of an already running app, so it only takes effect after a full VS Code restart.

How it works (Windows)

Windows Alt+Tab shows the window icon, which can be changed at runtime by sending WM_SETICON to the window's HWND:

  1. The extension wraps your project PNG into an .ico container (ICO supports PNG payloads — no re-encoding).
  2. It briefly puts a unique marker into the window title, and a bundled PowerShell helper (native/win/Set-WindowIcon.ps1, no extra installs — PowerShell ships with Windows) finds this exact window by that marker (all VS Code windows share one process, so PID matching is impossible) and sends WM_SETICON with the icon loaded via LoadImage(..., LR_LOADFROMFILE | LR_SHARED), so the icon stays valid after the helper exits.
  3. The stock icon (extracted once from Code.exe) is set back on restore.

Why not macOS

The Cmd+Tab icon is the application icon (NSApplication.applicationIconImage), which lives in VS Code's main process. Extensions run in a separate extension-host process and have no way to reach it — there is no API for this. The only workaround (rewriting Code.icns inside the .app bundle) breaks the app's code signature and is reverted by every update, so it is deliberately not implemented.

Development

npm install
npm run compile   # or: npm run watch
npm test          # unit tests for the non-VS-Code logic

Press F5 in VS Code to launch an Extension Development Host.

Roadmap

  • Linux/X11: true per-window icons via _NET_WM_ICON (helps KDE/XFCE window switchers).
  • Windows: fall back to a compiled helper if PowerShell is locked down by policy.
  • Marketplace publishing.

License

MIT (see LICENSE file).

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft