Claude Tools / Plugins / lid-awake

Plugins · leonmelamud/lid-awake

lid-awake

Keep your Mac awake (even lid-closed) while any Claude Code session is working; sleep re-enables when the last session finishes.

CLEARED_STATICclaude-onlyv1.2.0

Pipeline results

Coverage

CLEARED_STATIC

Tests run

7 / 8

Portability

Claude-only

Type

Plugins

Tests & results

What the pipeline checked

TestStateResult or reason
eligibilityranall eligibility checks passed
dedupranunique -- no near-duplicate found
clocran640 code lines / 12 files
secretsranno secret patterns matched
egressranno egress patterns matched
injectionranno patterns matched (confidence: STANDARD)
required-fieldsranrequired fields present: name, version, description
behaviouraln/anot reached — prior gate did not pass

Coverage

Not assessed

  • behavioural execution not run

README

From the repository

# lid-awake

![Closed MacBook still glowing while the moon dissolves — Claude keeps working](assets/banner.png)

Keep a MacBook awake (lid closed or not) while any Claude Code session is working, and re-enable sleep the moment the **last** session finishes. Multi-session safe, O(1) per event, no daemons, no polling.

## How it works

Claude Code hooks call the script on session activity:

| Hook | Call | Effect |
|------|------|--------|
| `UserPromptSubmit` | `lid-awake.sh on` | touch `.lid-awake-flags/`, `pmset -a disablesleep 1` |
| `PostToolUse` | `lid-awake.sh on` | re-arm the hold once work resumes (no-op while already holding) |
| `Notification` | `lid-awake.sh off` | Claude is blocked on you (permission prompt / idle input) — stop holding |
| `Stop` / `SessionEnd` | `lid-awake.sh off` | remove the flag; if the flags dir is empty → `disablesleep 0` |

**Waiting on a human is not work.** `Stop` covers the end of a turn, and `Notification` covers the mid-turn case — a permission prompt can block for hours, and there's no reason to burn battery through it. `PostToolUse` puts the hold back the moment the tool actually runs, so approving a prompt and walking away still keeps the 

← Back to Plugins