Clolid is a lightweight macOS menu bar app for closed-lid desk setups. It keeps the Mac awake while the lid is closed and immediately asks macOS to sleep the built-in display when the lid-close event is detected.
The app is intentionally small: it wraps the system power tools needed for this workflow instead of trying to replace a full power-management utility.
- Start and stop a closed-lid awake session from the menu bar.
- Run
pmset disablesleeponly for the active session. - Keep the system awake with
caffeinate. - Watch the lid state and call
pmset displaysleepnowwhen the lid closes. - Optional notifications for session start and lid-close display sleep.
- Optional start-at-login LaunchAgent.
- Settings for external-power requirement, polling interval, and menu-bar icon style.
- Optional session-scoped Screen Lock policy using macOS
sysadminctl.
- macOS 13 or newer.
- Xcode command line tools.
- Administrator permission when starting or stopping a session, because Clolid changes
pmset disablesleep.
Download the latest Clolid-*-macOS.zip from the GitHub Releases page. Unzip it and move Clolid.app to /Applications.
The app is currently distributed as an unsigned open-source build. On first launch, macOS may require opening it from Finder with Control-click -> Open.
swift build./script/build_and_run.shThe script builds the SwiftPM executable, creates dist/Clolid.app, copies the app resources, and opens the app.
For a quick launch check:
./script/build_and_run.sh --verify./script/package_release.shThe package script creates dist/Clolid.app and releases/Clolid-<version>-macOS.zip without launching the app. Attach that zip to the matching GitHub Release.
When a session starts, Clolid runs:
sudo pmset -a disablesleep 1
caffeinate -i -sWhile the session is running, Clolid polls AppleClamshellState through ioreg. When the lid changes to closed, it runs:
pmset displaysleepnowClolid can also apply a session-scoped Screen Lock policy using sysadminctl -screenLock, which is the source that matches macOS Lock Screen settings on current macOS releases. The app asks for your Mac login password in a Clolid-styled prompt when a non-System Screen Lock policy is applied during a session, passes it to macOS for that command, and does not store it.
Use System to leave the setting untouched. Use No lock only for trusted long-running local automation sessions where you accept that the user session stays unlocked while the display is off.
When the session stops, Clolid terminates its own caffeinate process and restores:
sudo pmset -a disablesleep 0Clolid is designed for setups with external power and, usually, an external display. If the Mac is closed in a bag or poorly ventilated space while a session is active, it can continue running and generate heat. Use the external-power requirement if you want an additional guardrail.
If you ever need to restore normal sleep manually:
sudo pmset -a disablesleep 0
pkill caffeinateIf Screen Lock was changed outside Clolid, configure “Require password after screen saver begins or display is turned off” in System Settings or check the effective value with sysadminctl -screenLock status.
Package.swift
Sources/Clolid/main.swift
Sources/Clolid/Resources/
script/build_and_run.sh
Clolid follows Semantic Versioning. See VERSIONING.md.
Issues and pull requests are welcome. See CONTRIBUTING.md.
Clolid is released under the MIT License. See LICENSE.
