Settings architecture
PowerToys uses a distributed settings system where the Settings UI communicates with the PowerToys Runner and individual modules through inter-process communication (IPC).Components
Settings UI
WinUI application for configuring all PowerToys utilities
Runner
Main process that loads modules and handles hotkeys
IPC Communication
Named pipes for real-time settings synchronization
JSON Storage
Settings persisted as JSON files in LocalApplicationData
IPC communication
The Settings UI communicates with the Runner using JSON messages over named pipes:Send IPC message
Settings UI sends JSON message to Runner via named pipe at
src/settings-ui/Settings.UI/ViewModels/*ViewModel.csGeneral settings
General settings control PowerToys behavior across all utilities. These are defined inGeneralSettings.cs:
Startup and system behavior
Run at startup
Run at startup
Controls whether PowerToys starts when you log in to Windows. This creates a scheduled task for reliable startup.Registry key:
Software\Policies\PowerToys\ConfigureRunAtStartupCan be controlled by GPO: Yes (since v0.89.0)Run elevated
Run elevated
Determines if PowerToys runs with administrator privileges. Required for some features to work with elevated applications.Setting:
GeneralSettings.RunElevatedDefault: falseSystem tray icon
System tray icon
Controls visibility of the PowerToys icon in the system tray.Setting:
GeneralSettings.ShowSysTrayIconDefault: trueTheme adaptive tray icon
Theme adaptive tray icon
When enabled, the tray icon color adapts to Windows theme (light/dark).Setting:
GeneralSettings.ShowThemeAdaptiveTrayIconDefault: Varies by themeTheme settings
PowerToys supports three theme modes defined inGeneralSettings.cs:139-150:
- Dark - Force dark theme
- Light - Force light theme
- System - Follow Windows theme (default)
Updates and notifications
- Update settings
- GPO control
Experimentation and diagnostics
Experimentation
Allows participation in feature experiments (Windows Insider builds only)Setting:
EnableExperimentationGPO: AllowExperimentationDiagnostic data
Enables telemetry to help improve PowerToysGPO:
AllowDataDiagnostics (since v0.86.0)Quick Access
Quick Access provides fast access to PowerToys modules via a keyboard shortcut.Module enable/disable
Each PowerToys utility can be individually enabled or disabled. The enabled state is stored in theEnabledModules class:
Module state management
GPO-controlled module states
Administrators can enforce module states via Group Policy. Individual module policies override the global utility policy.GPO policies have the following precedence:
- Individual module policy (e.g.,
ConfigureEnabledUtilityColorPicker) - Global utility policy (
ConfigureAllUtilityGlobalEnabledState) - User preference
src/gpo/assets/PowerToys.admx:62-71:
Settings file locations
PowerToys stores settings as JSON files in the Windows LocalApplicationData folder.Primary locations
File structure
Settings file format
All settings files follow a consistent structure defined insrc/settings-ui/Settings.UI.Library/:
Accessing settings programmatically
Settings are accessed via theSettingsRepository pattern implemented in src/settings-ui/Settings.UI.Library/:
Settings backup and restore
Starting with recent versions, PowerToys includes settings backup and restore functionality:
Backup configuration is handled in
GeneralViewModel.cs:95-110.
Configuration via command line
Some settings support command-line configuration through theICmdLineRepresentable interface implemented by HotkeySettings and other types.
HotkeySettings.cs:253-288 for parsing implementation.
Settings validation
Settings are validated when loaded to ensure integrity:- Type checking - JSON deserialization validates types
- Range validation - Numeric values checked against valid ranges
- Conflict detection - Hotkeys checked for conflicts with system shortcuts
Related documentation
Keyboard shortcuts
Complete list of keyboard shortcuts for all utilities
Group Policy
Enterprise configuration via Group Policy