Standalone system tray utility to prevent Windows from sleeping.
A lightweight, dependency-minimal reimplementation of PowerToys Awake in Rust. Uses Bootstrap Icons (cup-hot / cup-hot-fill) for the tray icon.
- Keep awake indefinitely — prevents system sleep
- Keep screen on — optional display prevention checkbox
- Start at login — toggles HKCU registry Run key
- System tray — right-click context menu, state indicators, explorer restart resilience
- Single instance — duplicate launches show a warning
- Rust (stable)
- Windows SDK (for
windows-systargets)
rustup target add x86_64-pc-windows-gnu
sudo apt install mingw-w64
cargo build --target x86_64-pc-windows-gnu --releasecargo build --releaseLaunch Awake.exe. It sits in the system tray. Right-click the icon for the menu.
| Action | Description |
|---|---|
| Keep awake indefinitely | Toggle system sleep prevention |
| Keep screen on | Also prevent display from turning off (disabled when awake is off) |
| Start at login | Auto-start with Windows via HKCU\...\Run\Awake |
| Exit | Cleanly stops sleep prevention and exits |
src/
├── main.rs Entry, single-instance mutex
├── state.rs App state + SetThreadExecutionState
├── tray.rs Window class, Shell_NotifyIcon, WndProc, context menu
├── icons.rs ICO → HICON loading from embedded data
├── startup.rs Registry Run key read/write
└── util.rs Shared wide-string helper
Rendered icon data (Bootstrap Icons) is generated at build time via build.rs using resvg. No external icon files needed.
MIT