I've got a strange issue with my Conky setup:What I'm looking to get rid of/fix is the fact that my CPU percentages (using ${cpu cpuX}) won't seem to pad properly. I'd like all values to be aligned vertically so that statuses never wiggle. Here's excerpts from my conky file:# ...pad_percents 3# ...${cpubar cpu1 6,135}$alignr${...}${cpu cpu1}%How can I right align and pad CPU percentage values so they stop throwing off my layout? The equivalent printf would be %3.0f so that values will appear like this:$ %3.0f % (1,) '  1'$ %3.0f % (13,)' 13'$ %3.0f % (100,)'100'How can I make this happen in Conky for my CPU percentage?
Creating Conky text variables with zero padding?
conky
A solution provided by @jasonwryan above:Create a Lua script for Conky to use. I created mine in a folder I made in ~/.config/conky/scripts, but you can create yours wherever you'd like:$ mkdir -p ~/.config/conky/scripts/$ vim ~/.config/conky/scripts/conky_lua_scripts.luaFill the file with the following Lua function:function conky_format( format, number )    return string.format( format, conky_parse( number ) )endImport your Lua script file into your Conky configuration file using the lua_load directive# ...lua_load ~/.config/conky/scripts/conky_lua_scripts.luaTEXT# ...Whenever you'd like to format a value, call the format function we defined earlier. Note that though we named it conky_format, we access it as format using the lua_parse variable:# ...lua_load ~/.config/conky/scripts/conky_lua_scripts.luaTEXT# ...${lua_parse format %3.0f ${cpu cpu1}}%This nice script allows you to call into Lua formatting engine with any value and format string. The output now looks as expected:If you're familiar with printf, you can use the utility to do other awesome formatting hacks. 