/crabattery

Program to control battery charge threshold for Linux.

Primary LanguageRustGNU General Public License v3.0GPL-3.0

Crabattery

Crab 🦀 + Battery 🔋 = Crabattery

Program to control battery charge threshold for Linux.

Requirements

  • systemd
  • dbus session running
  • make
  • cargo
  • git

⚠️ IMPORTANT ⚠️

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

Install

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

ezgif com-video-to-gif

Uninstall

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.