关于 mbp Battery

/ 0评 / 0

Battery:Apple Silicon MacBook 设备的电池充电限制器

工具简介

Battery 是一个适用于 Apple Silicon MacBook 设备的免费且开源的电池充电限制器。通过该工具,我们可以限制 MacBook 在插入电源时的充电行为,使得电池始终保持在 80% 电量,从而延长电池的使用寿命。

地址: https://github.com/actuallymentor/battery

安装方法

  1. 通过 Homebrew 安装
  2. 下载最新的应用程序 dmg 版本。
  3. 仅命令行安装(详情请见下文)

第一次打开该应用程序时,它会询问您的管理员密码,以便安装所需的组件。请注意,该应用程序:

使用说明

Battery 可以通过命令行工具或者 GUI 应用程序进行使用。命令行工具提供了多种功能,例如设置充电百分比、手动启用/禁用充电、查看电池状态等。

安装dmg包版本

https://github.com/actuallymentor/battery/releases

安装命令行版本

通过以下命令进行安装:

curl -s https://raw.githubusercontent.com/actuallymentor/battery/main/setup.sh | bash

brew命令行版本

brew install battery

使用示例

battery maintain 80

battery charging on

battery status

battery

Battery CLI utility v1.0.1

Usage:

  battery status
    output battery SMC status, % and time remaining

  battery maintain LEVEL[1-100,stop]
    reboot-persistent battery level maintenance: turn off charging above, and on below a certain value
    eg: battery maintain 80
    eg: battery maintain stop

  battery charging SETTING[on/off]
    manually set the battery to (not) charge
    eg: battery charging on

  battery adapter SETTING[on/off]
    manually set the adapter to (not) charge even when plugged in
    eg: battery adapter off

  battery charge LEVEL[1-100]
    charge the battery to a certain percentage, and disable charging when that percentage is reached
    eg: battery charge 90

  battery discharge LEVEL[1-100]
    block power input from the adapter until battery falls to this level
    eg: battery discharge 90

  battery visudo
    ensure you don't need to call battery with sudo
    This is already used in the setup script, so you should't need it.

  battery update
    update the battery utility to the latest version

  battery reinstall
    reinstall the battery utility to the latest version (reruns the installation script)

  battery uninstall
    enable charging, remove the smc tool, and the battery script
```

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注