https://github.com/cdown/bats
Simple battery status tool
https://github.com/cdown/bats
Last synced: about 1 month ago
JSON representation
Simple battery status tool
- Host: GitHub
- URL: https://github.com/cdown/bats
- Owner: cdown
- License: other
- Created: 2013-11-05T10:50:16.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2022-03-13T22:52:31.000Z (about 3 years ago)
- Last Synced: 2025-02-06T07:31:04.276Z (3 months ago)
- Language: Shell
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bats is an extremely simple battery status printer written in bash. It uses
[sysfs][sysfs] to get the battery data, so right now it is Linux-specific.## Usage
$ # Will show information about all available batteries
$ bats
42DFF
$ # Explicitly choose a battery
$ bats BAT1
76C## Output
The output is in the following format ``. The percentage is
the remaining battery charge left, which is calculated by totalling all of the
battery capacities together and getting a percentage compared to the current
charge.### Status symbols:
The status symbols transparently represent the battery status as provided by
`battery.h`:- C: Charging
- D: Discharging
- N: Not charging (eg. due to battery threshold)
- F: Full
- U: Unknown[sysfs]: https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt