| Crates.io | batty |
| lib.rs | batty |
| version | 0.4.2 |
| created_at | 2025-09-26 20:38:10.110651+00 |
| updated_at | 2025-11-06 20:36:59.450522+00 |
| description | Battery Health Tool for Linux |
| homepage | |
| repository | https://github.com/nicoestrada/batty |
| max_upload_size | |
| id | 1856589 |
| size | 121,552 |

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
batty
To run batty, it requires root privileges:
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.
sudo ~/.cargo/bin/batty --tui
This will give you write access in the TUI.
Controls: