All Projects → zackelia → Bclm

zackelia / Bclm

Licence: mit
macOS command-line utility to limit max battery charge

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Bclm

Battery Meter View
🔋 Material design battery meter (i.e. level, state) view for Android
Stars: ✭ 57 (-72.46%)
Mutual labels:  battery
Battstat
🔋 CLI battery status indicator for macOS, Linux, and OpenBSD ⚡
Stars: ✭ 132 (-36.23%)
Mutual labels:  battery
Airpodsbattery Monitor For Mac
Simple Widget to display your AirPods battery levels from the Mac Status bar
Stars: ✭ 165 (-20.29%)
Mutual labels:  battery
Power
Python module that allows you to get power and battery status of the system. Windows, Mac OS X, Linux
Stars: ✭ 58 (-71.98%)
Mutual labels:  battery
Ttgo T Beam Car Tracker
TTGO-T-Beam Arduino Car Tracker - ESP32 + LoRa + GPS + GSM (optional)
Stars: ✭ 106 (-48.79%)
Mutual labels:  battery
Easydeviceinfo
📱 [Android Library] Get device information in a super easy way.
Stars: ✭ 1,698 (+720.29%)
Mutual labels:  battery
Acc
acc
Stars: ✭ 55 (-73.43%)
Mutual labels:  battery
Battery State Card
Battery state card for Home Assistant
Stars: ✭ 184 (-11.11%)
Mutual labels:  battery
Battery.js
A tiny wrapper for the HTML5 Battery Status API.
Stars: ✭ 111 (-46.38%)
Mutual labels:  battery
Esp8266 Tiny Door And Window Sensor
Battery powered door and window sensor with ultra low standby power. Arduino, ESP-12, Reed switch, ATtiny, LDO
Stars: ✭ 146 (-29.47%)
Mutual labels:  battery
Pyeis
PyEIS: A Python-based Electrochemical Impedance Spectroscopy simulator and analyzer
Stars: ✭ 60 (-71.01%)
Mutual labels:  battery
Iglance
Free system monitor for OSX and macOS. See all system information at a glance in the menu bar.
Stars: ✭ 1,358 (+556.04%)
Mutual labels:  battery
Battery Monitor
An X-platform utility tool developed on Golang, notifies about charging, discharging, and critically low battery state of the battery.
Stars: ✭ 137 (-33.82%)
Mutual labels:  battery
Arcticfox Config
Configuration Tool for Vape Battery Mods with Arcticfox Firmware. ☁️ 🔧 Works on MacOS and Linux.
Stars: ✭ 58 (-71.98%)
Mutual labels:  battery
Battery
cross-platform, normalized battery information library
Stars: ✭ 170 (-17.87%)
Mutual labels:  battery
Rainbarf
it's like Rainmeter, but for CLI!
Stars: ✭ 1,087 (+425.12%)
Mutual labels:  battery
Rust Battop
Interactive batteries viewer
Stars: ✭ 133 (-35.75%)
Mutual labels:  battery
I3 Battery Popup
A script that shows warning messages to the user when the battery is almost empty. For i3wm users.
Stars: ✭ 190 (-8.21%)
Mutual labels:  battery
Battery Level
Get current battery level
Stars: ✭ 185 (-10.63%)
Mutual labels:  battery
Charge Limiter
macOS app to set battery charge limit for MacBooks
Stars: ✭ 140 (-32.37%)
Mutual labels:  battery

BCLM

BCLM is a wrapper to read and write battery charge level max (BCLM) values to the System Management Controller (SMC) on Mac computers. This project was inspired by several battery management solutions, including Apple's own battery health management.

The purpose of limiting the battery's max charge is to prolong battery health and to prevent damage to the battery. Various sources show that the optimal charge range for operation of lithium-ion batteries is between 40% and 80%, commonly referred to as the 40-80 rule [1][2][3]. This project is especially helpful to people who leave their Macs on the charger all day, every day.

Installation

The easiest method to install BCLM is through brew.

BCLM is written in Swift and is also trivial to compile. Currently, it can only be compiled on macOS Catalina (10.15) or higher but it can run on OS X Mavericks (10.9) or higher.

A release zip is also provided with a signed and notarized binary for those who do not have development tools or are on an older macOS version.

Brew

$ brew tap zackelia/formulae
$ brew install bclm

From Source

$ swift build
$ sudo swift test
$ cp .build/debug/bclm /usr/local/bin

From Releases

$ unzip bclm.zip
$ cp bclm /usr/local/bin

Usage

$ bclm
OVERVIEW: Battery Charge Level Max (BCLM) Utility.

USAGE: bclm <subcommand>

OPTIONS:
  --version               Show the version.
  -h, --help              Show help information.

SUBCOMMANDS:
  read                    Reads the BCLM value.
  write                   Writes a BCLM value.
  persist                 Persists bclm.
  unpersist               Unpersists bclm.

  See 'bclm help <subcommand>' for detailed help.

When writing values, macOS charges slightly beyond the set value (~3%). In order to display 80% when fully charged, it is recommended to set the BCLM value to 77%.

$ sudo bclm write 77
$ bclm read
77

Note that in order to write values, the program must be run as root. This is not required for reading values.

Persistence

The SMC can be reset by a startup shortcut or various other technical reasons. To ensure that the BCLM is always at its intended value, it should be persisted.

This will create a new plist in /Library/LaunchDaemons and load it via launchctl. It will persist with the current BCLM value and will update on subsequent BCLM writes.

$ sudo bclm persist

Likewise, it can be unpersisted which will unload the plist.

$ sudo bclm unpersist
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].