Insomnia is a modern macOS menu bar app that prevents your Mac from falling asleep, keeping your system or display active when you need it most.
Recently rewritten in SwiftUI using the modern MenuBarExtra API.
- Prevent Sleep: Keep your system awake indefinitely.
- Timed Wake: Set a timer to keep awake for 15, 30, or 60 minutes.
- Display Sleep: Option to allow the display to sleep while keeping the system running (useful for background tasks like downloads or music).
- Launch at Login: Automatically start Insomnia when you log in.
- Modern Design: Native macOS menu bar experience with custom icons.
Check the Releases page for the latest .dmg installer.
- Clone the repository.
- Run the install script:
./install_app.sh
- Move
Insomnia.appto your Applications folder.
Note
If you see a message that the app is "damaged" or "cannot be opened", run this command in Terminal to fix the quarantine attribute:
xattr -cr /Applications/Insomnia.appYou can also build using Swift Package Manager:
swift build -c releaseThis project uses Swift Package Manager.
- Open
Package.swiftin Xcode to start editing. - Core logic is in
SleepManager.swift(InsomniaCore target). - UI is in
InsomniaApp.swift.
- Iconography by Seerat Rana