Menu

#11 fixed width for $variable display

open
nobody
None
5
2005-01-14
2005-01-14
No

I would like to be able to specify a fixed output width
for some variables like $downspeed and $upspeed so that
the global torsmo display width could remain constant.

Maybe something like ${upspeed eth0 3} to get the
upload rate constantly displayed using 3 characters
(left-padded with spaces) : " 0" and " 12" and "256",
instead of "0" and "12" and "256"

Beeing able to choose if the $variable should be left
or right-padded, and the padding character, could be a
good thing too. Maybe a new $format variable to achieve
this would be better: ${format "000" left}${upspeed
eth0} to get an left-padded output like "006" k/s.

Discussion


Log in to post a comment.