Name Last Update
.gitignore Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
battery.c Loading commit data...

README.md

Battery indicator for tmux

This is is a little C program to indicate the current battery state and percentage in the tmux status bar. It is tmux specific as it generates status configuration colors according to the battery level.

It supports Linux (using /sys/class/power_supply) and FreeBSD with sysctl.

Requires a font that includes battery symbols. Iosevka and JetBrains Mono from NerdFonts have been tested. the output is generated in utf-8.

Compile with gnu make (gmake command in FreeBSD) and copy or link the executable into ~/.local/bin, which should be on your $PATH.

Edit ~/.tmux.conf and setup the status bar with something like

set-option -g status-right " #($HOME/.local/bin/battery)   %a, %d %b  %H:%M "

Reload tmux and enjoy!

Miguel