$ show juv/vibranceGUI
VibranceGUI is a Windows desktop utility (C#, .NET Framework 4.0, Windows Forms) that automatically adjusts NVIDIA Digital Vibrance Control and AMD Saturation levels per application. It runs in the system tray, monitors foreground window changes via WinEventHook, and applies user-defined vibrance settings for each game or process. The architecture is a monolith with a main form (VibranceGUI), a settings controller (INI/XML persistence), and GPU vendor-specific proxies (NvidiaDynamicVibranceProxy, AmdDynamicVibranceProxy) that interface with native driver APIs (nvapi.dll, ADL). Key entry points are Program.cs (adapter detection and form creation) and the tray icon context menu. External dependencies include the native GPU driver DLLs and the Windows API for display changes and process enumeration. The codebase is functional but shows signs of age: no unit tests, legacy .NET patterns, hardcoded DLL paths, and x86-only compilation.
The LLM identified 3 files worth highlighting for reuse:
Defines the contract for GPU vibrance control (Get/Set Vibrance, Get/Set Saturation). Implemented by NvidiaDynamicVibranceProxy and AmdDynamicVibranceProxy. This interface decouples the GUI and settings logic from vendor-specific driver calls, making it reusable for any GPU vendor that exposes similar controls.
A singleton that wraps SetWinEventHook to listen for foreground window changes (EVENT_SYSTEM_FOREGROUND). Fires a C# event (ForegroundWindowChanged) with the new window handle. This component is self-contained (only P/Invoke dependencies) and can be extracted for any application that needs real-time foreground window monitoring.
Wraps the native DEVMODE structure for serialization and comparison. Provides methods to convert to/from a string representation and to compare resolution modes. This pattern is reusable for any project that needs to manage display settings via ChangeDisplaySettingsEx.