mirror of
https://github.com/actuallymentor/battery.git
synced 2026-02-03 14:03:24 +00:00
1.1 KiB
1.1 KiB
This repository contains software that limits the battery charging level of apple silicon macbooks.
Project structure
./battery.shis the main CLI binary used under the hood./setup.shis the setup script for the binary./update.shis the script used to update the binary./app/contains an electron codebase for a GUI that wraps around the CLI./distcontains precompiled binaries that are shipped with the CLI
Development flow
- any changes made to
battery.shmust also increment the version number at the top ofbattery.shas this is what the update command relies on - any changes to
smccommands must update thevisudoconfigvariable inbattery.shas this updates the visudo entry on the client device to make sure smc may run commands without sudo - any changes to the
visudoconfigfile must add a corresponding line to thesmc_commandsvariable inapp/modules/battery.jsas this makes sure the GUI continues working when the visudo commands are changed
Mantatory checks
Before finishing any task, make sure that you:
- do a sanity check for bugs
- check that comments still reflect the changed code