Repository navigation
Clamshell 0.3.0
Pre-release
Pre-release
Blank the built-in panel when the lid closes, and align a session across restarts.
Added
clamshell reconcilere-aligns a pending session after a restart: a trigger still in the future is re-armed with the remaining time, and one that already passed restores sleep instead of leaving it disabled forever. The menu bar app runs it at launch.clamshell status --jsonandclamshell battery --jsonemit machine-readable state. The menu bar app reads the JSON form, falling back to the text parser for an older CLI.clamshell darkenblanks the display on demand, so the menu bar toggle also applies to a session that is already running.- The menu bar app remembers the chosen battery floor, duration, custom span and display toggle across launches.
clamshell onnow always starts the session watcher, including for an unlimited session with no time limit and no battery floor.
Fixed
- The built-in display is now blanked when the lid closes. With sleep disabled macOS does not do this on its own: the idle display timer normally handles it, and on battery that timer is off, so a shut lid could leave the panel lit. The session watcher blanks it again on every pass, and skips that when an external display is attached or any probe fails.
clamshell offrestores sleep before cancelling the timer, so a cancellation cannot leave sleep disabled with no trigger and no state file.- The watcher retries a failed restore, logs to
~/Library/Logs/clamshell.log, and keeps the state file so a refusedsudocannot let the battery drain unnoticed. - A duration longer than 30 days is rejected by the CLI, matching the limit the menu bar app already enforced.
- The menu bar no longer crashes when the status menu is rebuilt while it is still installed.
- The menu checks the duration that is actually running, and nothing is checked when a custom span is in use.
- A command that times out keeps the child's stderr in the error message, truncated so a runaway log cannot bloat the alert.
- The menu bar no longer hangs for the full command timeout when the CLI writes more than the ~64 KiB pipe buffer.
- A CLI error is now shown in front of the active app, and the countdown keeps ticking while the menu is open.
clamshell statusreports a reached battery floor even when a time limit is also active.- The helper rotates its log through a
mktempfile and keeps logging when a rotation step fails. - The version test compares both
Info.plistkeys throughplistlib, so a bundle whose version strings drifted apart is caught. package.shfails with a clear message when the version cannot be read and ships only the known modules.
Documentation
- README states the current version, documents the helper log and state-file paths, and no longer implies the helper copy under
~/Library/Application Support/clamshell/is what runs as root.
Notes
- Requires macOS 14 or newer on Apple Silicon.
- The app is an accessory (
LSUIElement): a moon glyph in the menu bar, no Dock icon. Clamshell-0.3.0.pkg(sha25638d8cee712165b5c347736c5d145b1634b3f4e6e24e1314e07061499701a863a) installs the CLI, the root-owned helper with its narrow sudoers rule, and the menu bar app.
See CHANGELOG.md for details.