Crab 🦀 + Battery 🔋 = Crabattery
Program to control battery charge threshold for Linux.
systemd
dbus
session runningmake
cargo
git
Due to battery model diversity is possible that this program doesn´t work on your hardware.
At the moment of writing this, Crabattery
can set threshold to batteries that have name syntax like BAT[number]
.
For example: BAT0
(it seems the most common).
To check this you can run:
ls /sys/class/power_supply/
It should return something like this:
ls /sys/class/power_supply/
AC0 BAT0
First clone this repo and then cd into it.
git clone https://github.com/claaj/crabattery && cd crabattery
Now build the binaries (remember that make
and cargo
are required):
make build
With the binaries already built, now is possible to install.
sudo make install
Finally to run the app, you can type:
crabattery
To uninstall cd into the repo, wherever is located:
cd path/to/crabattery-repo
Then run:
sudo make uninstall
This program is being tested on ASUS X515 laptop running Fedora 37.