{"slug": "show-hn-macsomnia-close-your-macbook-lid-while-keeping-long-jobs-alive", "title": "Show HN: Macsomnia – close your MacBook lid while keeping long jobs alive", "summary": "Macsomnia, a new macOS menu-bar app by developer iamdadzilla, lets users close their MacBook lid while keeping long-running light jobs such as AI agents, builds, and downloads alive by disabling clamshell sleep. The app, available via Homebrew or GitHub, requires macOS 13 Ventura or later and includes an auto-off timer, a red screen strip indicator, and a live countdown, with a warning that heavy sustained load with the lid closed may cause heat damage.", "body_md": "A macOS menu-bar app that stops your Mac from sleeping — including **clamshell\n(lid closed) with no external display** — to keep long-running light jobs (AI\nagents, builds, downloads) alive.\n\nWhen active, a red strip spans the top of every screen and the menu-bar label shows a live countdown, so you can never miss that it's on. An auto-off timer turns it off after a duration you pick.\n\nRequires macOS 13 (Ventura) or later.\n\nDisabling clamshell sleep defeats a thermal-protective behavior. Macsomnia is\nintended for **light** workloads. Running heavy, sustained CPU/GPU load with the\nlid closed and no external cooling can cause dangerous heat buildup and may\ndamage your hardware. Use the auto-off timer. Macsomnia is provided as-is, with\nno warranty; you use it at your own risk.\n\n```\nbrew tap iamdadzilla/macsomnia\nbrew install --cask macsomnia\n```\n\nRecent Homebrew asks you to trust a third-party cask tap the first time. If the\ninstall stops with an \"untrusted tap\" message, run the command it suggests\n(`brew trust iamdadzilla/macsomnia`\n\n) and re-run the install.\n\nUpgrade later with `brew upgrade --cask macsomnia`\n\n.\n\nGrab the `Macsomnia-<version>.zip`\n\nfrom the [latest release](https://github.com/iamdadzilla/Macsomnia/releases/latest),\nunzip it, and move `Macsomnia.app`\n\nto `/Applications`\n\n. Builds are signed and\nnotarized, so they open without Gatekeeper warnings.\n\n```\ngit clone https://github.com/iamdadzilla/Macsomnia.git\ncd Macsomnia\n./make-app.sh          # builds Macsomnia.app\n```\n\nThen move `Macsomnia.app`\n\nto `/Applications`\n\n. (Requires the Xcode command-line\ntools.)\n\n- Open Macsomnia. It shows a one-time danger/liability warning you must accept.\nA\n`zzz`\n\nicon then appears in the menu bar. - The first time you enable it, Macsomnia registers a small privileged helper\n(an\n`SMAppService`\n\nbackground daemon) that runs`pmset`\n\nas root. macOS asks you to allow Macsomnia's background item in**System Settings → General → Login Items & Extensions**(under \"Allow in the Background\"). Approve it, then enable again — after that it works with no further prompts.\n\n- Click the icon → choose a duration:\n**30 min · 2 h · 4 h · 8 h · until I turn it off**. - While ON: a red strip appears across the top of every display, the label shows a live countdown, and the auto-off timer will disable it.\n**Disable now** turns it off. Quitting the app also restores normal sleep.- If sleep gets disabled by anything else, Macsomnia detects it within ~5s, shows the red strip, and notifies you.\n\nA signed helper daemon runs these as root, reached over XPC — only Macsomnia's own signed app is allowed to talk to it:\n\n- Enable:\n`pmset -b sleep 0 ; pmset -b disablesleep 1`\n\n- Disable:\n`pmset -b sleep 5 ; pmset -b disablesleep 0`\n\n`disablesleep 1`\n\nis what keeps the Mac awake with the lid closed — stronger than\nthe idle-sleep prevention that `caffeinate`\n\nand similar tools use.\n\n```\nbrew uninstall --cask macsomnia          # or delete Macsomnia.app\n```\n\nUpgrading from 1.0 (which used a sudoers rule instead of the helper)? Remove the now-unused rule:\n\n```\nsudo rm -f /etc/sudoers.d/macsomnia\n```\n\nMIT — see [LICENSE](/iamdadzilla/Macsomnia/blob/main/LICENSE).\n\n[Promotion plan](/iamdadzilla/Macsomnia/blob/main/PROMOTION-PLAN.md)— launch and outreach notes", "url": "https://wpnews.pro/news/show-hn-macsomnia-close-your-macbook-lid-while-keeping-long-jobs-alive", "canonical_source": "https://github.com/iamdadzilla/Macsomnia", "published_at": "2026-08-14 23:13:11+00:00", "updated_at": "2026-08-14 23:41:28.464423+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["Macsomnia", "iamdadzilla", "Homebrew", "GitHub", "macOS"], "alternates": {"html": "https://wpnews.pro/news/show-hn-macsomnia-close-your-macbook-lid-while-keeping-long-jobs-alive", "markdown": "https://wpnews.pro/news/show-hn-macsomnia-close-your-macbook-lid-while-keeping-long-jobs-alive.md", "text": "https://wpnews.pro/news/show-hn-macsomnia-close-your-macbook-lid-while-keeping-long-jobs-alive.txt", "jsonld": "https://wpnews.pro/news/show-hn-macsomnia-close-your-macbook-lid-while-keeping-long-jobs-alive.jsonld"}}