StayAwake
A pragmatic system utility designed to provide granular control over Windows power states while maintaining an extremely low architectural footprint. Developed in pure C to eliminate the runtime overhead observed in managed environments, StayAwake achieves a memory footprint of approximately 1.4 MB.
The tool utilizes an event-driven Win32 message loop to handle system power requests and dynamic tray icon updates. It features two distinct operational modes: a persistent awake state and a timed display-off mode with a 5-minute threshold. Visual feedback is provided through GDI-rendered tray icons that reflect the current idle state and active mode without the need for external assets.
StayAwake demonstrates the application of Clean Architecture at the systems level, prioritizing direct OS interaction, minimal resource allocation, and simple state persistence via local configuration.