Skip to content

About

Toggle Windows light/dark theme in one click — portable tray app (PowerShell + WinForms, no install)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

RapidThemer

RapidThemer icon

Windows PowerShell MIT size portable

Toggle Windows light / dark theme in one click.
Lives in the system tray. No installer. No admin rights. Instant switch.


✨ Features

  • One-click toggle — double-click the tray icon or use the context menu
  • Instant apply — flips AppsUseLightTheme + SystemUsesLightTheme and broadcasts WM_SETTINGCHANGE
  • Tray-native — no window, no console flash (via RapidThemer.vbs launcher)
  • Lightweight — pure PowerShell + WinForms, ~66 lines, no dependencies
  • Portable — copy the folder anywhere and run

🚀 Quick Start

Option A — Run directly (30 seconds)

  1. Download or clone this repo:
    git clone https://github.com/Mefgner/RapidThemer.git
    cd RapidThemer
  2. Double-click RapidThemer.vbs — the icon appears in the system tray.
  3. Double left-click the tray icon → theme toggles Light ↔ Dark.
  4. Right-click the icon for Toggle theme / Exit.

Why .vbs and not .ps1? The VBS wrapper launches PowerShell with -WindowStyle Hidden so no console window flashes.

Option B — PowerShell only

powershell -NoProfile -ExecutionPolicy Bypass -File .\RapidThemer.ps1

⚙️ Autostart

Pick one:

1. Startup folder (simplest)

$startup = "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup"
Copy-Item .\RapidThemer.vbs, .\RapidThemer.ps1, .\RapidThemer.ico -Destination $startup -Force
# or just create a shortcut to RapidThemer.vbs inside that folder

Press Win+R → shell:startup to verify.

2. Task Scheduler (no UAC, runs at logon)

$action  = New-ScheduledTaskAction -Execute "wscript.exe" -Argument "`"$PWD\RapidThemer.vbs`""
$trigger = New-ScheduledTaskTrigger -AtLogOn
Register-ScheduledTask -TaskName "RapidThemer" -Action $action -Trigger $trigger -Description "Toggle Windows theme from tray"

3. Registry Run key

Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" `
  -Name "RapidThemer" -Value "wscript.exe `"$PWD\RapidThemer.vbs`""

🧠 How It Works

Tray double-click
      │
      ▼
Get-IsLightTheme  ──►  HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize
      │                       AppsUseLightTheme  (0 = dark, 1 = light)
      ▼                       SystemUsesLightTheme
Set-WindowsTheme  ──►  Set-ItemProperty + SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, "ImmersiveColorSet")
      │
      ▼
Explorer & UWP apps repaint instantly
  • No explorer restart, no logout required.
  • Affects Windows shell + UWP apps that respect ImmersiveColorSet. Some Win32 apps need restart.

📁 Project Structure

RapidThemer/
├── RapidThemer.ps1   # Main app — tray icon, toggle logic, registry + broadcast
├── RapidThemer.vbs   # Silent launcher — hides PowerShell console window
├── RapidThemer.ico   # Tray icon (16/24/32/48 px, BMP-encoded for .NET compat)
├── make_icon.py      # Dev tool — rebuilds .ico from PNG sources (Pillow)
├── LICENSE           # MIT
├── .gitignore
└── README.md

The repo is intentionally flat — just copy the three RapidThemer.* files and it runs anywhere.

🛠️ Development

Rebuild the icon

pip install Pillow
python make_icon.py              # writes ./RapidThemer.ico
python make_icon.py my-icon.ico  # custom path

Source PNGs expected by make_icon.py (not committed, optional):

icons8-black-and-white-windows-11-filled-16.png
icons8-black-and-white-windows-11-filled-32.png
icons8-black-and-white-48.png

Gotcha: ICO entries must be BMP-encoded, not PNG-compressed. .NET Framework's System.Drawing.Icon fails to render PNG-compressed ICOs at runtime. That's why make_icon.py uses bitmap_format="bmp" and limits sizes to < 256 px.

Requirements

  • Windows 10 / 11
  • PowerShell 5.1+ (preinstalled)
  • Python 3.8+ + Pillow — only if you rebuild the icon

❓ FAQ

Question Answer
Needs admin? No — writes to HKCU, not HKLM.
Why two registry values? AppsUseLightTheme = apps, SystemUsesLightTheme = taskbar/start. Setting both keeps them in sync.
Antivirus flag? .vbs launchers sometimes trigger heuristics. If flagged, launch the .ps1 directly or add an exclusion.
Uninstall? Right-click tray → Exit, delete the files, remove autostart entry.

📄 License

MIT © 2026 Yevhenii Prasol — see LICENSE.

Icon sources: Icons8 (Windows 11 filled style) — rebuilt into a multi-resolution ICO.


Built for people who switch themes 10× a day and are tired of digging through Settings.

About

Toggle Windows light/dark theme in one click — portable tray app (PowerShell + WinForms, no install)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages