We had a major storm through here recently and we suffered damage to the house roof and ceilings. I just received the quote to repair. I’m hoping that a small fraction of the 80,000 odd people that download SDIO and/or Desktop Info every month won’t mind chipping in a few dollars to help out. Click on the big blue button at the bottom of the page to help us keep a roof over our heads, literally!
Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.
Hello,
Many thanks for the awesome app (just started using it after many years of bginfo). Will send some coffee money shortly.
I think I've run into a small number formatting issue in 3.21.0.4966. If I use the following item definition:
LOGICALDRIVES=interval:60,diskio:1,font-size:85%,text-align:l,\ alarms:(%7 ge 90 0070f0),\ row-text:,display:Drive %1: %7[2.1f]%\, %8[1.0B] Free
The resulting output is (also attached):
<snipped> Drive C: 37.4%, 171G Free Drive D: 0.1%, 275G Free
The manual indicates the floating point type (%7[2.1f]) should pad on the left with zeros. So shouldn't the output instead be(?):
<snipped> Drive C: 37.4%, 171G Free Drive D: 00.1%, 275G Free
Thanks again,
-ndfan77
P.S. It might also be useful if we could right justify number formats with leading spaces...
I think you've misread the manual unless you found a typo. On page 53, it states:The manual indicates the floating point type (%7[2.1f]) should pad on the left with zeros. So shouldn't the output instead be(?):
The four general number types are: d decimal w = minimum width left padded with zeros, p=not used f float w = minimum width left padded with spaces, p=decimal places n float same as 'f', commas inserted for thousands x hexadecimal w = minimum width left padded with zeros, p=not used
Where it refers to the width, that means the total width of the output including the decimal point and any digits following that. In your example, it states the total width should be at least 2 characters with one digit after the decimal place. If you wanted consistent output for a number that looks like "xx.x" you would want a width of 4 with one digit after the decimal place, or [4.1f]. This would left pad the output with spaces if the output is less than four characters wide.
Of course you've still got the issue of variable width fonts...
