A cross-platform desktop application that prevents your computer from going to sleep. Keep your system awake during long downloads, presentations, or any task that requires uninterrupted operation.
- One-click toggle to prevent/allow system sleep
- System tray integration for background operation
- Real-time activity log
- Cross-platform: Windows, Linux, and macOS
- Lightweight and resource-efficient
- Download
SleepStopper-windows-x64.zipfrom the Releases page - Extract the zip file to a folder of your choice (e.g.,
C:\Program Files\SleepStopper) - Run
SleepStopper.exe
Optional: Create a shortcut to SleepStopper.exe on your Desktop or Start Menu for easy access.
Run at Startup (Optional):
- Press
Win + R, typeshell:startup, and press Enter - Create a shortcut to
SleepStopper.exein this folder
# Download and install
sudo dpkg -i SleepStopper-linux-x64.deb
# Run
sleepstopper# Download and install
sudo rpm -i SleepStopper-linux-x64.rpm
# Run
sleepstoppertar -xzf SleepStopper-linux-x64.tar.gz
cd SleepStopper-linux-x64
chmod +x SleepStopper
./SleepStopperOptional: Move portable version to a system location:
sudo mv SleepStopper-linux-x64 /opt/SleepStopper
sudo ln -s /opt/SleepStopper/SleepStopper /usr/local/bin/sleepstopper- Download
SleepStopper-macos-x64.dmg(Intel) orSleepStopper-macos-arm64.dmg(Apple Silicon) - Open the DMG file
- Drag SleepStopper to the Applications folder
- Launch from Applications
Note: On first run, macOS may block the app. Go to System Preferences > Security & Privacy > General and click "Open Anyway".
tar -xzf SleepStopper-macos-x64.tar.gz
cd SleepStopper-macos-x64
chmod +x SleepStopper
./SleepStopperRequires .NET 8 SDK.
# Clone the repository
git clone https://github.com/hokagedami/SleepStopper.git
cd SleepStopper
# Build and run
dotnet build
dotnet run --project SleepStopper
# Or publish a self-contained executable
dotnet publish SleepStopper/SleepStopper.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish SleepStopper/SleepStopper.csproj -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true
dotnet publish SleepStopper/SleepStopper.csproj -c Release -r osx-x64 --self-contained true -p:PublishSingleFile=trueLaunch SleepStopper.exe (Windows), SleepStopper (Linux/macOS), or run from source.
| Element | Description |
|---|---|
| ACTIVATE button (green) | Click to prevent system sleep |
| DEACTIVATE button (red) | Click to allow system sleep |
| Log panel | Shows activity history and status messages |
-
Prevent Sleep: Click the green ACTIVATE button
- Button turns red and shows DEACTIVATE
- Log displays: "System Auto-Sleep Deactivated"
- Your computer will now stay awake
-
Allow Sleep: Click the red DEACTIVATE button
- Button turns green and shows ACTIVATE
- Log displays: "System Auto-Sleep Activated"
- Normal sleep behavior is restored
The application minimizes to the system tray when you close the window:
- Double-click tray icon: Restore the main window
- Right-click tray icon: Opens context menu
- ACTIVATE/DEACTIVATE: Toggle sleep prevention
- Show: Restore the main window
- Exit: Close the application completely
- Clicking X (close button): Minimizes to system tray (app keeps running)
- Right-click tray > Exit: Fully closes the application and restores normal sleep
Uses the Windows API SetThreadExecutionState with ES_DISPLAY_REQUIRED and ES_CONTINUOUS flags to inform the system that the display is in use, preventing both display sleep and system sleep.
Spawns a systemd-inhibit process with --what=idle:sleep that creates an inhibitor lock, preventing the system from entering idle or sleep states while active.
Spawns a caffeinate -d process that asserts a "prevent display sleep" assertion, keeping the display and system awake.
- App won't start: Ensure you extracted all files from the zip, not just the .exe
- Sleep still occurs: Run as Administrator for full compatibility
- Permission denied: Run
chmod +x SleepStopperto make it executable - systemd-inhibit not found: Install systemd or use a systemd-based distribution
- No tray icon: Ensure your desktop environment supports system tray (may need an extension on GNOME)
- "App is damaged" error: Run
xattr -cr /path/to/SleepStopperto remove quarantine - Blocked by Gatekeeper: Go to System Preferences > Security & Privacy and allow the app
This project is open source.
Contributions are welcome! Please feel free to submit issues and pull requests.