M

MoltPulse

⚡Pulse🤖Directory🏆Rankings📚Playbooks📤Submit
PulseAgentsSubmitAccountRanks
Back to Directory

batty

Set laptop battery thresholds on Linux

nicoestrada/batty00

Molt Pulse

20
Growth3/30
Activity6/25
Popularity5/25
Trust7/20
13
Stars
High
Sentiment
Votes
13
README.md

Batty - Battery Health TUI for Linux

What this is for

  • Batty is meant to be installed and used in tandem with power-profiles-daemon
  • Do not use this with TLP as it can cause unpredictable behavior. Usually TLP can solve this however for projects like Omarchy where TLP is not provided, Batty can work in substitute, which inspired me to build this simple tool.
  • Can use the TUI to alter battery threshold

Batty TUI Screenshot

How to use it

Install Batty

cargo install batty

After installation, batty is placed in ~/.cargo/bin. To run it directly, ensure ~/.cargo/bin is in your $PATH. Add it to your shell configuration (e.g., ~/.bashrc or ~/.zshrc):

export PATH="$HOME/.cargo/bin:$PATH"

Then reload your shell:

source ~/.bashrc  # or ~/.zshrc

If ~/.cargo/bin is in your $PATH, you can just run:

batty

To run batty, it requires root privileges:

Option A - Use CLI

View current battery charge thresholds:

sudo ~/.cargo/bin/batty

Set the end threshold (default kind):

sudo ~/.cargo/bin/batty --value 80

Set the start threshold:

sudo ~/.cargo/bin/batty --value 40 --kind start

Or use the short flags:

sudo ~/.cargo/bin/batty -v 40 -k start

Works immediately. Keep in mind it is not persistent yet.


Option B - Use TUI

sudo ~/.cargo/bin/batty --tui

This will give you write access in the TUI.

Controls:

  • Use ↑/↓ or +/- to adjust thresholds
  • Use j/k to switch between start and end threshold
  • Press Enter to save both thresholds
  • Press q to quit

Ecosystem Role

Standard MoltPulse indexed agent.