A tiny Windows system-tray utility for switching between Windows power plans and power modes with one click — without digging through Settings or memorising powercfg GUIDs.
Sits silently in the notification area. Left-click the lightning-bolt icon and you get:
- Power plan ▶ — every power scheme on the system (Balanced, High performance, Power saver, OEM/custom plans), with a check mark on the active one. Click to switch.
- Power mode ▶ — the three Windows 11 overlay modes (Best power efficiency / Balanced / Best performance), with a check mark on the active one. This is the slider exposed under Settings → System → Power & battery → Power mode.
- Settings ▶ Start with Windows — toggles a per-user
HKCU\…\Runentry so PowerConfig launches when you sign in. - Quit — exits.
Both submenus are rebuilt on every open, so newly-added power plans and external changes (e.g. someone runs powercfg /setactive) are reflected immediately.
The Windows 11 power-mode slider lives four clicks deep in Settings, and switching between custom power plans (laptop on battery vs. plugged-in workstation profiles, gaming profile, undervolted profile, etc.) normally requires the legacy Control Panel applet or the command line. This makes both a single tray click away.
- Windows 10 or Windows 11
- .NET 10 SDK to build (the published binary is self-contained or framework-dependent at your discretion)
# from the repository root
dotnet build -c Release
.\PowerConfig\bin\Release\net10.0-windows\PowerConfig.exeTo produce a redistributable single-file build:
dotnet publish PowerConfig\PowerConfig.csproj -c Release -r win-x64 `
--self-contained true `
-p:PublishSingleFile=true `
-p:IncludeNativeLibrariesForSelfExtract=trueThe result is a single PowerConfig.exe you can drop anywhere and run.
| Concern | Mechanism |
|---|---|
| Power plan list | PowerEnumerate + PowerReadFriendlyName (P/Invoke into powrprof.dll) |
| Active plan get/set | PowerGetActiveScheme / PowerSetActiveScheme |
| Power mode get/set | PowerGetEffectiveOverlayScheme / PowerSetActiveOverlayScheme |
| Tray surface | System.Windows.Forms.NotifyIcon + ContextMenuStrip (no third-party deps) |
| Autostart | HKCU\Software\Microsoft\Windows\CurrentVersion\Run value PowerConfig |
| Single instance | Named Mutex |
The three power-mode overlay GUIDs are stable across Windows installs:
| Mode | GUID |
|---|---|
| Best power efficiency | 961cc777-2547-4f9d-8174-7d86181b8a7a |
| Balanced (recommended) | 00000000-0000-0000-0000-000000000000 |
| Best performance | ded574b5-45a0-4f42-8737-46345c09c238 |
If PowerGetEffectiveOverlayScheme fails (very old Windows builds without overlay support), the Power mode submenu shows "Not supported on this system" instead of crashing.
PowerConfig.slnx
PowerConfig/
├── PowerConfig.csproj net10.0-windows, WinForms, WinExe
├── Program.cs entry point + single-instance mutex
├── TrayAppContext.cs NotifyIcon + menu wiring
├── PowerPlans.cs powrprof P/Invoke for plan list & switching
├── PowerModes.cs powrprof P/Invoke for overlay scheme
├── StartupRegistration.cs HKCU Run key read/write
├── app.manifest asInvoker, longPathAware
└── Resources/tray.ico multi-resolution lightning-bolt icon
build/
└── generate-icon.ps1 regenerate the .ico (run once at setup)
PowerConfig runs as the invoking user — no UAC prompt, no admin rights. Switching power plans and power modes only requires user-level privilege, and the autostart entry is per-user (HKCU), not machine-wide (HKLM).