Skip to content
innocarpePublic

About

Keep the Mac awake with the lid closed.

Resources

Stars

16 stars

Watchers

0 watching

Forks

Repository files navigation

  DontSleep

English · 한국어 · 简体中文 · 日本語

License macOS Arch

Close the lid. Work keeps going. The screen and keyboard go dark.

A lot of people run pmset disablesleep so a closed MacBook stays awake. That works — and it leaves the built-in screen on inside a shut lid. The panel keeps making heat in a box that cannot vent well.

DontSleep does the same stay-awake switch from the menu bar, then turns off what you do not need once the lid is down: the built-in screen and the keyboard light. Open it again and both come back as they were. You do not dim first.

That is the point of the app. Not a prettier pmset. Less leftover heat while the machine keeps working — commute, a meeting room, a long job you do not want to stop.

Click the icon to turn it on or off. Right-click for the rest. Filled laptop means on. Outline means off.

DontSleep app icon: a Space Black MacBook with the lid slightly open and a warm glow from the keyboard

caffeinate and KeepingYouAwake only stop idle sleep. They do not stop a closed lid. This does. It is not signed with an Apple Developer ID.

Off before the bag. The machine is still awake in there.


Install

The release is ad-hoc signed, not notarized. On Tahoe, a downloaded copy only offers Move to Trash. Do not double-click it.

curl -fsSL https://raw.githubusercontent.com/innocarpe/dontsleep/main/install.sh | zsh

The first window asks for your password once. That writes /etc/sudoers.d/dontsleep for your account, two pmset lines only. It does not unlock all of sudo.

Read install.sh first if you prefer. Already have the disk image: zsh install.sh ~/Downloads/DontSleep-*.dmg.

Remove the helper later: sudo rm /etc/sudoers.d/dontsleep.

From source

git clone https://github.com/innocarpe/dontsleep.git
cd dontsleep
./build.sh

Finish setup in the first window. Or ./scripts/install-sudoers.sh.

Usage

First launch is setup. How to Use… in the menu opens it again.

Leave it in the menu bar. Close the lid at whatever brightness you were using. Right-click For… to stay awake for 30 minutes up to 24 hours; it turns itself off when the time is up. Click the icon for on/off with no timer. Open at Login writes ~/Library/LaunchAgents/com.innocarpe.dontsleep.plist.

Sleep on Overheat Warning is off unless you turn it on. If the Mac sends an overheat warning with the lid closed, DontSleep turns off and the machine sleeps immediately.

Watch the battery.

Building

Xcode Command Line Tools (Swift + hdiutil).

./scripts/build-app.sh            # dist/DontSleep.app
./scripts/package-dmg.sh          # DontSleep-<version>.dmg
./scripts/make-icons.sh           # icns / menu-bar PDFs

License

Apache License 2.0

About

Keep the Mac awake with the lid closed.

Resources

Stars

16 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages