Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Display battery life in bash prompt, using acpi.
Shell
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.markdown
battery-prompt.sh

README.markdown

battery-prompt.sh

Display laptop battery life (in percentage) in bash prompt.

If the laptop is on AC power, the battery life is display without color.

If the laptop is running on battery power, it is displayed in color:

  • Green, if life is >= 75%
  • Yellow, if life is between 75% and 25% (both excluded)
  • Red, if life is 25% or below.

Dependencies

  • acpi
Something went wrong with that request. Please try again.