Termux-Battery

Displays the battery status of the device graphically along with its level and temperature.

release date: 2025-03-16

view on GitHub

about

Termux Battery Script is a Bash script for Termux that uses the capabilities of Termux API to display the current battery parameters of your Android device in a clear and aesthetic way.

The script fetches data from the API parses the JSON result and then prints an ASCII battery with appropriate fill and colors based on the current parameters and battery status.

features

After execution Termux Battery displays a silver or gray ASCII frame in the shape of a battery with five segments filled with colors depending on the current charge level.

Below the battery there is information about the battery status such as charging or discharging and its temperature.

The ASCII battery frame can be freely colorized using appropriate parameters It is also possible to center it in the terminal display it as a live indicator that updates in real time and emulate individual parameters such as manually setting the temperature or charge level.

Battery image

compatibility

Termux Battery is compatible with any current version of Termux that has Termux API installed along with the deb package termux api.

Only a configured API Bash jq and tput are required for data handling and formatting.