Skip to content

Latest commit

 

History

History
110 lines (74 loc) · 4.96 KB

File metadata and controls

110 lines (74 loc) · 4.96 KB

Wallust Theme

Visual Studio Code theme that syncs with your wallpaper palette in real time using wallust.

VS Marketplace Open VSX Downloads License

Preview

image1 image2 image3

Features

  • Real-time color updates: Instantly adapts the VS Code theme to your current wallpaper palette
  • Smart caching: Only regenerates themes when colors actually change (hash-based detection)
  • Reliable sync: Dual-strategy watching (file watcher + polling fallback) ensures updates are never missed
  • Two theme variants: Clean borderless look or bordered style for editor panes
  • Automatic light/dark detection: Theme adapts based on background color luminance
  • Atomic writes: Theme files are written atomically to prevent corruption
  • Zero configuration: Works out of the box with sensible defaults

Requirements

  1. Install wallust: This extension relies on wallust for generating color palettes.

  2. Copy templates: Copy the templates from the templates directory to your wallust templates folder.

  3. Configure wallust.toml: Add these entries to generate the required color files:

    [templates]
    vscode = { src = 'vscode.json', dst = '~/.cache/wallust/colors.json' }
    vscode2 = { src = 'vscode', dst = '~/.cache/wallust/colors' }
  4. Run wallust: Generate colors with wallust run <image> or let it run automatically with your wallpaper manager.

How It Works

The extension monitors ~/.cache/wallust/colors and ~/.cache/wallust/colors.json for changes:

  1. File Watcher: Primary detection using chokidar with write stabilization
  2. Polling Fallback: Secondary check every 5 seconds using hash comparison
  3. Hash-based Caching: Themes only regenerate when the color hash changes
  4. Startup Sync: Automatically syncs on VS Code startup if themes are outdated

Extension Commands

Command Description
Wallust Theme: Update Theme Force regenerate themes from current colors
Wallust Theme: Clear Cache Clear the theme cache (forces regeneration on next change)

Extension Settings

Setting Default Description
wallustTheme.autoUpdate true Automatically update themes when wallust colors change

Theme Variants

  • Wallust: Clean theme without borders (auto light/dark based on background)
  • Wallust Bordered: Theme with subtle borders between panels (auto light/dark based on background)

Troubleshooting

Theme not updating automatically?

  1. Check that wallust is generating files to ~/.cache/wallust/
  2. Verify the colors file contains 16 hex colors
  3. Try Wallust Theme: Clear Cache then Wallust Theme: Update Theme
  4. Check the Output panel (View → Output → select "Wallust Theme") for errors

Colors look wrong?

  1. Ensure your wallust templates match the ones in this repo's examples/wallust-templates/ folder
  2. The colors.json file is optional but provides better background/foreground colors
  3. Try regenerating with wallust run <your-wallpaper>

Extension not activating?

The extension activates after VS Code startup completes. Check:

  1. Extension is enabled in the Extensions panel
  2. No errors in Help → Toggle Developer Tools → Console

Technical Details

  • Cache location: <extension>/themes/.wallust-theme-cache.json
  • Debounce delay: 500ms (prevents rapid regeneration)
  • Polling interval: 5 seconds (fallback detection)
  • Write stabilization: 300ms (waits for file writes to complete)

Credits

  • Inspired by the excellent work on Wal Theme.