Script for Tmux battery indicator
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Script to get a Tmux battery indicator for laptops

  • Showing percent and time left when on battery charge
  • Showing only percent when plugged in


  1. Put the script somewhere you can find it
  2. Open your ~/.tmux.conf in your favorite editor
  3. Paste the following lines at the end of the document:
set -g status-right-length 50
set -g status-interval 2                           
set -g status-right "#[fg=blue,bg=black,bright]#(~/.tmux/[default]"

where ~/.tmux/ is the path to the script