Skip to content

Repository files navigation

LidKeep

Keep a MacBook running with the lid closed, and see the current state at a glance.

LidKeep showing AWAKE in the macOS menu bar    LidKeep showing SLEEP in the macOS menu bar

LidKeep is a small native macOS menu-bar app. It has one control, KEEP AWAKE, and reads the current state directly from macOS instead of trusting cached application state.

Current release: v1.0.0 · Apple silicon · macOS 13 or later

Download

Download these two files from the latest GitHub release:

Verify the download in Terminal:

cd ~/Downloads
shasum -a 256 -c LidKeep-v1.0.0-macOS.zip.sha256

You should see:

LidKeep-v1.0.0-macOS.zip: OK

Unzip the archive, move LidKeep.app to /Applications, and open it.

First launch

LidKeep v1.0.0 is ad-hoc signed and is not notarized. If macOS blocks the first launch:

  1. Try to open LidKeep once.
  2. Open System Settings → Privacy & Security.
  3. Select Open Anyway only if you downloaded LidKeep from this repository and verified the checksum.

This is Apple's documented process for opening an app from an unidentified developer. LidKeep never disables Gatekeeper or removes quarantine attributes.

Use

The menu-bar label always reflects the state reported by macOS:

  • 🟢 AWAKE — closing the lid will not trigger normal sleep.
  • 💤 SLEEP — normal lid-close sleep is enabled.
  • ⚠️ UNKNOWN — LidKeep could not verify the setting, so the control is disabled.

Open the menu and select KEEP AWAKE to change the state. macOS requests administrator authorization for the first helper installation and for each ON/OFF change.

Safety

When LidKeep turns KEEP AWAKE on, a temporary safety monitor:

  • refuses to start at 10% battery or lower;
  • restores normal sleep when the battery reaches 10%;
  • restores normal sleep if LidKeep quits or crashes;
  • restores normal sleep after repeated unreadable power or battery state;
  • requests recovery if its monitor heartbeat is lost.

An AWAKE state created outside LidKeep remains visible, but the app does not claim that its safety monitor owns that state.

Do not place an awake MacBook in a bag or other enclosed space.

Permissions and privacy

LidKeep installs one fixed, root-owned helper for these operations:

/usr/bin/pmset -a disablesleep 1
/usr/bin/pmset -a disablesleep 0

It does not install a permanent daemon, sudoers rule, account, analytics, telemetry, update framework, or network service. See SECURITY.md for the privilege and threat model.

Build from source

Requirements: Apple silicon Mac, macOS 13 or later, and Apple Command Line Tools with Swift.

git clone https://github.com/nbatada/lidkeep.git
cd lidkeep
./scripts/test.sh
./scripts/build.sh
./scripts/check_release.sh

The app is created at build/LidKeep.app.

To install the local build:

./scripts/install.command

Uninstall

From a source checkout, run:

./scripts/uninstall.command

The uninstaller restores and verifies normal lid-close sleep before removing the app, helper, or transient state directory. It stops without deleting the app if SleepDisabled 0 cannot be confirmed.

Contributing

See CONTRIBUTING.md. Keep changes focused on the core lid-close workflow, state truthfulness, and safety.

License

MIT

About

Native macOS menu-bar app for keeping a MacBook running with the lid closed.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages