A comprehensive Windows desktop application that monitors Light/Dark theme changes and provides theme persistence functionality.
- Real-time Theme Monitoring: Detects changes to Windows Light/Dark theme settings
- Process Detection: Identifies which process or service triggered theme changes
- Comprehensive Logging: SQLite-based logging system with detailed change history
- Theme Persistence: Enforces selected theme by continuously resetting registry values
- System Tray Integration: Runs in background with system tray icon
- Auto-startup: Optional Windows startup integration
- PySide6-based Interface: Modern, responsive GUI with tabbed interface
- Dashboard Tab: Current theme status and persistence controls
- Logs Tab: Sortable, filterable view of all theme changes
- Settings Tab: Startup configuration and log management
- Registry Monitoring: Monitors
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize - Background Service: Efficient background monitoring without impacting performance
- Portable Executable: Single-file executable via PyInstaller
- No Admin Rights Required: Runs with standard user privileges
- Ensure Python 3.11+ is installed
- Run
install.batto install dependencies - Execute:
python main.py
- Install dependencies:
pip install -r requirements.txt - Install PyInstaller:
pip install pyinstaller - Build:
pyinstaller --onefile --noconsole --icon=assets/icon.ico main.py - Run the executable from the
dist/folder
- View current theme mode (Light/Dark)
- Enable/disable theme persistence
- Select preferred theme for persistence mode
- Manual theme switching buttons
- View chronological list of all theme changes
- Sort by timestamp, theme mode, or source process
- Export logs to CSV for analysis
- Real-time updates as changes occur
- Configure Windows startup behavior
- Manage log database (clear logs)
- View application information
- Double-click tray icon to show main window
- Application continues running when main window is closed
- Right-click for quick access menu (if implemented)
When enabled, Persistence Mode:
- Monitors theme settings every 500ms
- Automatically resets theme if changed externally
- Logs all enforcement actions
- Effectively "locks" the theme to your preference
Use Cases:
- Prevent applications from changing your theme
- Override Group Policy theme settings
- Maintain consistent theme across all applications
- Block unwanted theme changes from system updates
AppsUseLightTheme: Controls app-level theme (0=Dark, 1=Light)SystemUsesLightTheme: Controls system-level theme (0=Dark, 1=Light)
SQLite database stores:
- Timestamp of change
- New theme mode (Light/Dark)
- Source process name
- Detailed change information
- Minimal CPU usage (< 1% on modern systems)
- Small memory footprint (< 50MB RAM)
- Efficient registry monitoring
- Non-blocking UI operations
- Registry Access Denied: Ensure running as standard user, not restricted account
- Theme Not Changing: Check Windows version compatibility (Windows 10/11)
- Persistence Not Working: Verify no Group Policy restrictions
- Build Failures: Update PyInstaller and dependencies
Application logs and database stored in:
C:\Users\<Username>\AppData\Roaming\ThemeMonitor\
- Windows 10 version 1903+ or Windows 11
- Python 3.11+ (for source execution)
- 50MB free disk space
- No administrator privileges required
ThemeMonitor/
├── main.py # Application entry point
├── theme_monitor.py # Core monitoring logic
├── service.py # Background service wrapper
├── ui/
│ ├── __init__.py
│ └── main_window.py # PySide6 main window
├── assets/ # Icons and resources
├── requirements.txt # Python dependencies
├── build_instructions.txt # Build guide
└── install.bat # Windows installer
ThemeMonitor: Core functionality for registry monitoring and persistenceThemeService: Service wrapper for background operationsThemeMonitorWindow: Main PySide6 UI windowStartupManager: Windows startup registry management
This project is provided as-is for educational and personal use.
This is a demonstration project. For production use, consider:
- Enhanced process detection using ETW (Event Tracing for Windows)
- Digital signing for the executable
- MSI installer creation
- Additional theme-related registry keys monitoring
- Group Policy integration