A lightweight Windows tray app that prevents your PC from going into standby during working hours if connected to ac.
It runs silently in the system tray with a green/orange/red status icon and simple menu controls.
- 🟢 Green tray icon when supressing standby in working hours, 🟠 orange icon when active but not in working hours, 🔴 red icon when stopped , 🔵 Blue icon — if awake forced (even outside working hours)
- ⏰ Keeps your PC awake Monday–Friday, 08:00–18:00 (configurable)
- 📜 Logging with loguru (
keep_awake.log, rotated daily) - 🖱️ Tray menu options: Start / Stop / Exit
- 🚀 Build into a standalone
.exewith PyInstaller
The behavior of KeepAwake can be customized using a simple config.json file located in the same folder as the script or executable.
- start_hour: hour of the working week where the script should begin to avoid standby
- end_hour: hour of the working week where the script should end the avoid of standby
- sleep_after_min: configuration for the powerplan sleep after x minutes
- check_interval_sec: seconds to wait to check again if the powerplan must be changed based on time
- disable_if_workstation_locked: disables the function if workstation is locked, default is false
{
"start_hour": 8,
"end_hour": 18,
"sleep_after_min": 30,
"check_interval_sec": 300
"disable_if_workstation_locked": false
}Install with uv.
uv add loguru pystray pillow
▶️ Run from source
uv run python keep_awake_tray.py
🛠️ Build as EXE
Bundle into a Windows executable:
uv add pyinstaller --dev
uv run pyinstaller --onefile --noconsole keep_awake_tray.pyThe .exe will be generated in dist/keep_awake_tray.exe