Batt 0.2.1 released!

Note: this post was migrated from my old Tumblr-backed blog

I just pushed version 0.2.1 of batt to rubygems.

This includes a new meter action which will draw some ascii art of a meter of your battery capacity. It supports tmux colour as well as customizable size.

For example:

$ batt capacity
83%
$ batt meter --size 10
[||||||||  ]

If you add color, the pipes above are replaced with spaces with the background-colour set to the capacity color.

This version also includes a new function for calculating what color the capacity translates to; rather than dividing into even thirds (with 0-33 being red, 34-66 being yellow and 66+ being green), I break it up as 0-19, 20-74, 75-100 as red, yellow, green, respectively.

Because of some refactoring with regard to using tmux colours, I should be able to do more with it in the future for some interesting results.

So, if you want to have your battery status in your tmux status bar, this is probably your best bet!

Install it!

gem install batt

That’s it! Now you can run batt help and get started!

Project page: