Repository navigation
Add an Apple Silicon battery charge limit command - #497
Conversation
scottjones
left a comment
There was a problem hiding this comment.
Reviewed 1cae68d2124635972fb2bf546d712f4317ab9caf. No blocking findings.
The command matches the macsmc driver's threshold semantics, writes only the end threshold, and verifies both values afterward. Status stays unprivileged, and invalid arguments, failed writes, and unexpected readback are handled correctly.
Focused charge-limit, battery-status, and powerprofiles tests passed, as did command metadata and parser-aware syntax checks. The full local suite passed CLI and 294/295 shell test files; the sole failure was the previously confirmed low-disk condition in the unchanged update-lock test. Hosted CI is green, including ARM installation. Local battery tests used temporary fixtures; hardware validation is as reported in the PR.
Optional follow-up: use the shared shell test helper and cover unavailable threshold files and the root execution branch.
Summary
omarchy battery charge limitto inspect and set SMC charge thresholds on supported Apple Silicon MacBooks.Validation
test/shell.d/battery-charge-limit-test.shbash test/shell.d/battery-status-test.shtest/shell.d/powerprofiles-set-test.sh./test/cli1cae68d2.The full local
./test/allsuite ran 295 shell test files; 290 passed and five environment-dependent tests failed. Four require the separateomarchy-pkgscheckout. The graphical animation test passes when the inheritedNO_COLOR=1is unset.