The goal of this software is to display battery information in the format most useful for inclusion in text-based interfaces (read: my tmux status line).
Although one can achieve this by piping output of any acpi tool through gnu toolchain, polling such chain has a bigger footprint and I need something to play with while learning C.
- Battery status indication:
- Discharge rate indicator
.
Sometimes, after s2ram my notebook starts eating through battery really fast, this
indicator designed to pop up after discharge rate exceeds specified limit (in watts). - Multiple batteries support!

- Don't like built in indicators? Define your own with command line arguments! See
tinybatt --helpfor details.
- tmux: insert
#(/path/to/tinybatt)somewhere in your status(-left/right) template
- Build from source:
tinybattis written in pure C and does not require anything abovelibc-devandcmaketo build. Run the following from the project root directory:cmake -G "Unix Makefiles" && make - Build packages: run
make package. You will get DEB, RPM and TGZ packages.` - Install package:
- Debian: run
sudo dpkg -i tinybatt*.deb - Red Hat: run
sudo rpm -i tinybatt*.rpm - Manual: binary will end up at
src/tinybatt
- Debian: run
The exact representation of Unicode symbols depend on your fonts.
My apologies. In order to help me figure out what's wrong please do the following:
- Build source with debug info:
cmake -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" && make - Run binary under GDB: execute
gdb src/tinybatt. You will be greeted with GDB prompt. Enterrun, tinybatt will be executed and after it crashes, show me the output ofbacktracecommand.
- v0.0.3: Added ability to fine tune output.
- v0.0.2: Added support for multiple batteries.
- v0.0.1: Initial version.



