SKIP TO CONTENT

macOS app

Sleepless: keeps a MacBook awake with the lid closed

A MacBook sleeps when you close the lid, and apps built on caffeinate cannot change that. Sleepless is one menu-bar switch that keeps the Mac awake with the lid closed, on battery, with no external display.

Install

macOS app

Homebrew

brew install --cask aboudjem/tap/sleepless
/Applications/Sleepless.app/Contents/Resources/grant.sh

Other ways to install

Build from source

git clone https://github.com/Aboudjem/Sleepless.git && cd Sleepless && ./install.sh

What it does

  • Keeps the Mac awake with the lid closed, on battery, with no monitor plugged in.
  • Turns itself off after a timer of one or two hours, with a live countdown.
  • Turns itself off when the battery reaches the floor you set.
  • Steps aside when Low Power Mode is on, on battery.
  • Reads the system setting back, so the menu bar shows the real state.

How it works

  1. 1. Install the app with Homebrew.
  2. 2. Run the grant script once. It adds a sudo rule for exactly two pmset commands.
  3. 3. Click the cup in the menu bar, flip the switch and close the lid.
  4. 4. Sleepless turns the setting off again at your battery floor, at the end of the timer or on reboot.

Example

Check that the setting is on while Sleepless is active.

pmset -g | grep SleepDisabled

The line should read 1.

Limits

  • The behavior depends on the hardware and on the macOS version.
  • The app is not notarized. macOS asks you to approve the prebuilt app, unless you build it from source.
  • It needs one narrow sudo rule, limited to two exact commands.
  • Heavy work with the lid fully shut reduces airflow, so use judgement.
Good for
Overnight agent runs, builds, downloads or a shared hotspot, with the lid closed.
Not for
Windows or Linux: it is a macOS app.

Questions

What is Sleepless?

Sleepless is an open-source macOS menu-bar app. It keeps a MacBook awake with the lid closed, on battery, with no external display.

How do I install Sleepless?

Run brew install --cask aboudjem/tap/sleepless, then the grant script once. You can also download a release or build it from source.

Will Sleepless drain my battery?

The battery floor, Low Power Mode and the timer all turn it off before the Mac drains. A reboot also resets it.

Is Sleepless free?

Yes. It is free and open source under the MIT license. It has no daemon and no kernel extension.