Sleepah is a Rust desktop app with a beautiful dark UI that monitors the network/disk activity of your favorite game launchers (Steam, Epic Games, etc.) and automatically shuts down, restarts, or suspends your computer the moment a download finishes.
| Feature | Description |
|---|---|
| 🎯 Process picker | Choose any running process to watch by name |
| 📊 Live activity monitor | Real-time disk-write throughput per watched process |
| ⏳ Grace period | Configurable idle countdown before the action fires |
| ⚙ Flexible actions | Shutdown · Restart · Suspend |
| 🖥 Turn Off Monitors | Instantly turn off displays while monitoring keeps running in the background |
| 🔒 Sleep prevention | System sleep is automatically blocked while monitoring is active |
| 💾 Persistent settings | Your watched list and preferences are saved automatically |
| 🌙 Dark UI | Custom dark theme built with egui |
- Add the game-launcher processes you want to watch (e.g.
steam,EpicGamesLauncher.exe). - Set the activity threshold – the minimum disk-write speed (KB/s) that counts as "still downloading".
- Set the grace period – how many consecutive seconds of sub-threshold activity must pass before the action is triggered.
- Choose the post-download action: Shutdown, Restart, or Suspend.
- Press ▶ Start Monitoring. The system is prevented from sleeping automatically. When all watched processes drop below the threshold for the full grace period, the chosen action executes automatically.
- Optionally press 🖥 Turn Off Monitors at any time while monitoring is active to switch the displays off — monitoring continues running in the background so the action still fires when the download finishes.
- Rust toolchain ≥ 1.75 (
rustup update) - Linux:
libxkbcommon-x11,libwayland-client,libGL(standard desktop packages) - Windows / macOS: no extra dependencies
# Debug build
cargo run
# Release build
cargo build --release
./target/release/sleepah| Platform | Shutdown | Restart | Suspend | Turn Off Monitors (button) | Sleep prevention |
|---|---|---|---|---|---|
| Linux | systemctl poweroff |
systemctl reboot |
systemctl suspend |
xset dpms force off |
systemd-inhibit |
| Windows | shutdown /s /t 0 |
shutdown /r /t 0 |
rundll32 powrprof.dll,SetSuspendState |
PostMessage SC_MONITORPOWER via PowerShell |
SetThreadExecutionState |
| macOS | AppleScript shut down |
AppleScript restart |
AppleScript sleep |
pmset displaysleepnow |
caffeinate -i |
Settings are stored in:
- Linux:
~/.config/sleepah/config.json - Windows:
%APPDATA%\sleepah\config.json - macOS:
~/Library/Application Support/sleepah/config.json