I'm getting a bit seasick with the indicator-mulitload as it constantly cycles between cpu usage less than 10% and greater than 10% which means all the other icons in the tray get pushed back and forth as cpu usage drops in and out of greater or less than 10%.
Is there any way to force the cpu usage to be displayed at at least 2 digits, so 8% would be 08%, as this would stop the icons moving, unless of course it hits 100% but that's so rare I'm not not bothered about taking up the extra space to cover that rarity. I'm happy for it to move everything on that occasion and my guess I'll have more problems anyway if it does as the system will likely keep freezing until cpu cycles drop off again.
2 Answers
There's no way to specify the printf format unfortunately. To always have two digits displayed for CPU usage you need to compile indicator-multiload from source.
install the build dependencies:
sudo apt-get install bzr sudo apt-get build-dep indicator-multiloadbranch the project sources:
bzr branch lp:indicator-multiloadFix the print format for percent data:
cd indicator-multiload sed -i 's/%u%%/%02u%%/' src/function.valaBuild it:
./autogen.sh && make indicator-multiloadInstall the patched indicator in
/usr/local/bin:sudo cp indicator-multiload /usr/local/bin
Now below 10%, CPU usage is displayed like this:
If you don't mind the percentage notation, it's possible to format it to always use 2 decimals places within a [0-1] range:
CPU $(decimals(cpu.inuse,2))See this answer explaining where to use this configuration.