Keep your Mac awake with the lid closed — for long AI-agent sessions, builds, and downloads. Without burning your battery.
English · Русский
If you code with AI agents (Claude Code, Cursor, Aider) or run long builds, closing the lid kills your session. The usual pmset disablesleep workaround keeps the Mac awake — but it also keeps the internal display awake under the closed lid, silently burning battery for hours.
Wedge does two things:
- Holds your Mac open — toggles
pmset -a disablesleep 1so the system stays awake when the lid is closed. - Turns off the internal display when the lid closes — saves battery, restores your previous brightness automatically when you open the lid again.
Download the latest Wedge.zip from the Releases page, unzip, and drag Wedge.app to /Applications/.
First launch: right-click the app → Open — Wedge is open-source and not signed with a paid Developer ID, so Gatekeeper will warn you on first run. After that it's silent.
If you'd rather skip the click-through, strip the quarantine attribute manually:
xattr -dr com.apple.quarantine /Applications/Wedge.appClick the menubar icon (a tiny side-view MacBook) to open the menu — or pull the cord:
- Drag the icon downward. A braided cord with a brass bead extends from the menubar, following your cursor with cord-tension physics.
- Past a small threshold you'll hear a click and the bead glows gold — that's the commit point.
- Release and the lid icon in the menubar latches open. The wedge is in.
- Pull again to release. The cord retracts, the lid closes, and the Mac is free to sleep.
While the wedge is in and you close the lid, Wedge sets the internal display brightness to 0. When you open the lid back up, it restores your previous brightness.
- 🪶 Lightweight — single Swift binary, no background daemons, no helper tools
- 🔒 Admin password lives in your Keychain, never touched after Wedge quits
- 🌍 Localized — English and Русский
- 🌒 Launch at login via
SMAppService - 🧯 Crash-safe — if the app dies mid-cycle, brightness is restored on next launch
- 🎯 No private daemons, no kexts. Just
pmset(driven by your Keychain-stored admin password) and a thin call intoDisplayServicesfor brightness control
| Setting | Default | Notes |
|---|---|---|
| Launch Wedge at login | off | Uses SMAppService.mainApp (approve once in System Settings → Login Items) |
| Turn off internal display when lid closes | on | The whole reason Wedge exists. Can be disabled if you want raw pmset behavior. |
| Saved password | stored in Keychain | "Forget" wipes it; Wedge will re-prompt next time you pull the cord |
| Language | System default | English / Русский. Switching prompts a relaunch. |
- macOS 14 Sonoma or later
- Apple Silicon recommended (Intel may work but is untested)
git clone https://github.com/wwaannttyy/Wedge.git
cd Wedge
./build.sh release
open build/Wedge.appTo regenerate the app icon:
swift run WedgeIcon- Wedge never makes a network connection.
- Your admin password lives in your Keychain, accessible only to Wedge.
- Wedge does not collect, transmit, log, or phone home with anything.
- Wedge depends on a private
DisplayServicessymbol to control brightness. This means App Store distribution is not possible — that's a hard trade-off for the lid-close brightness feature. - On Macs with no internal display (Mac mini, Studio, Pro), the brightness step is a no-op — the rest still works.
- macOS will sleep the Mac at very low battery regardless of
pmset(hardware-enforced). There is no workaround.
MIT. See LICENSE.
