LidKeeper

LidKeeper

macOS lid-close sleep prevention

Description

Running a two-hour Claude Code session, you close the lid to grab lunch, and come back to find everything killed — MacBook sleeps the instant the lid shuts, and even caffeinate can't stop it.

LidKeeper adds one toggle to your menu bar: flip "Stay Awake" on, close the lid, and the display goes dark but the system stays alive. SSH sessions, downloads, AI inference — all keep running. It works by setting macOS's disablesleep flag directly, which caffeinate doesn't touch.

Features



Lid-closed wakefulness: With Stay Awake on, closing the MacBook lid turns off the built-in display but keeps CPU, network, and external monitors fully active.

Overheat protection: Reads thermal sensors every 5 seconds and forces sleep if the hottest chip exceeds 85°C — safe to toss in a bag. The threshold is adjustable from 60°C to 95°C, or can be turned off entirely.

Live temperature in the menu bar: Shows the current chip temperature right in the status area, no extra monitoring app needed.

One-click Lock Screen and Sleep: Both accessible from the dropdown menu, no keyboard shortcuts to remember.

State persistence: After an overheat sleep or manual sleep, Stay Awake automatically re-enables on wake — no need to toggle it again.

Clean uninstall: One menu click removes the sudoers rule, login item, and moves the app to Trash.