jaor/xmobar — pull request #176 by axel-angel (2014-07-30 15:20:14+00:00)
Title: Implement adaptive units for Net plugin

Hey,

If the suffix is enabled for the Net plugin, then we compute the highest byte unit, thus we can see MB/s or KB/s depending on the flow, it's easier to read and pretty. People who disabled suffix will continue to see the number in KB as usual.

I wished to features for some time now and I decided to give it a try. This version is the smallest I could come with. I have removed: the Ord/Read class for UnitPerSec, the inverse function netValByte.

Comments:
Adaptive units are computed only if suffix is enabled
Otherwise we fall back to the old computation (KB)