--- name: "lidwatch" subtitle: "Sleeps a docked MacBook when you close the lid" date: 2026-07-13 link: "https://github.com/KristijanKocev/lidwatch" linkText: "GitHub" source: "Hacker News — Show HN" topics: [macos-apps, cli-and-automation] tags: [open-source, background-service, utility] description: "A lightweight background service that overrides macOS's default clamshell behavior so a MacBook with an external display actually sleeps when the lid closes." --- macOS deliberately stays awake in clamshell mode whenever an external display is connected and power is plugged in — lidwatch overrides exactly that one behavior, sending the Mac to sleep when the lid closes regardless. It runs as a `brew services` background daemon rather than a menu-bar app, by design: the author wanted something you enable once and forget, not another icon competing for space. It reacts to native macOS lid-state, power, and display-connection events directly instead of polling every few seconds, which is what caused a competing tool to occasionally sleep the Mac with the lid still open.