Skip to content

crisbbc/sleepah

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sleepah

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.


Features

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

How it works

  1. Add the game-launcher processes you want to watch (e.g. steam, EpicGamesLauncher.exe).
  2. Set the activity threshold – the minimum disk-write speed (KB/s) that counts as "still downloading".
  3. Set the grace period – how many consecutive seconds of sub-threshold activity must pass before the action is triggered.
  4. Choose the post-download action: Shutdown, Restart, or Suspend.
  5. 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.
  6. 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.

Build & Run

Prerequisites

  • 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 support

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

Configuration

Settings are stored in:

  • Linux: ~/.config/sleepah/config.json
  • Windows: %APPDATA%\sleepah\config.json
  • macOS: ~/Library/Application Support/sleepah/config.json

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages