A previous commit broke the traffic module by deleting widgets during
each iteration. This is fatal as the widgets contain the traffic
information from the previous iteration, for delta calculation.
Store previous traffic data in the module itself instead.
To avoid "stray" devices being kept in the list, empty the widgets list
during each iteration and re-populate it from the list of available
interfaces.
fixes#101
The optional parameter "states" can now be used to filter which
interfaces to display. "^" can be used for negation.
For example, to only show "up" interfaces:
-p traffic.states=up
To show all interfaces not in "down" state:
-p traffic.states=^down
fixes#98
Set the minimum width for uplink and downlink widgets to "down 1000MB",
which should be plenty, and change alignment to right (personally, I
find this looks nicer).
To not have the icons on the left side "jump around" depending on the
value, make them suffixes.
If this solution is not sufficient, alternatively, the widget itself
could perform value padding. In that case, the whole alignment and
min-width settings would be obsolete and the icons could remain on the
left side.
* use psutil instead of "ifconfig" in order to avoid external command
calls
* fix a small bug in the ascii theme (missing colon)
* show statistics per-nic