Put a fancy CPU/RAM usage chart in tmux status bar

Prologue

So, once upon a time I had a crazy idea: to put an almost complete resource meter into the tmux status bar. You know, the clock is so boring. Let's add a battery indicator there. And the load numbers. And the memory usage...

Needless to say, this resulted in an unbearable user experience:

a:2.96G c:4.37G f:5.41G i:2.98G l:0.65/1.73/1.41 23:47

Actually, the data is OK, the "gauges" work fine on every Unix I tested them. If only it was a bit fancier...

Puke rainbows!

Then I discovered Battery. And then, Spark. I just couldn't resist myself, so I revamped my messy Perl usage data parser to output this gorgeous ANSI art scrolling chart:

Screenshot

It was tested on Mac OS X 10.8.2, Ubuntu 12.04, Ubuntu 11.10, Debian 6.0.6 and works fine with the default system Perl; there are no external dependencies at all.

Liked it? Go ahead, grab your copy and follow the installation instructions: https://github.com/creaktive/rainbarf

3 Comments

Awesome stuff!

Hiya,
I can't get the bars to show up like you have (https://github.com/creaktive/rainbarf#iterm2-with-tmux-powerline-solarized-theme-and-terminus-font)

I am using OSX, iTerm2, Solarized, and tried terminus, but it still donesnt work.
Cheers
Ian

Leave a comment

About stas

user-pic Perl Programmer. Cloud Explorer.