Image 01
profile-image

ColtonB

Colton B
Conky lua 2011 next generation

Conky 17 comments

Rating: 7.5
May 03 2011
When I first installed this, I ran into a little bug where the network ring was overflowing and running into the text.

Decided to share the fix with everyone.

Replace:
Quote:

local function setup_rings(cr,pt)
local str=''
local value=0

str=string.format('${%s %s}',pt['name'],pt['arg'])
str=conky_parse(str)

value=tonumber(str)
pct=value/pt['max']

draw_ring(cr,pct,pt)
end


With:
Quote:

local function setup_rings(cr,pt)
local str=''
local value=0

str=string.format('${%s %s}',pt['name'],pt['arg'])
str=conky_parse(str)

value=tonumber(str)
pct=value/pt['max']

-- Maximum should only be 1.000 (100%)
if (pct > 1) then
pct = 1
end

draw_ring(cr,pct,pt)
end


This makes sure that the rings always stay within the 100% boundary. - Jun 20 2012
Rating: 7.5
8   Jun 20 2012