function conky_ring_stats()
local function setup_rings(cr,pt)
local str=''
local value=0
if pt.name~="" then
str=string.format('${%s %s}',pt['name'],pt['arg'])
value=tonumber(conky_parse(str))
else
value=tonumber(pt.arg)
end
pct=value/pt['max']
draw_ring(cr,pct,pt)
end
if conky_window==nil then return end
local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
local cr=cairo_create(cs)
local updates=conky_parse('${updates}')
update_num=tonumber(updates)
if update_num>6 then
if conky_parse("${if_mounted /home/grinder}y${else}n${endif}") == "n" then
for i,t in pairs(settings_table) do
if t.arg == "/home/grinder" then
t.name,t.arg="",0
break
end
end
end
for i in pairs(settings_table) do
setup_rings(cr,settings_table[i])
end
end
end

function conky_ring_stats()
local function setup_rings(cr,pt)
local str=''
local value=0
if t.name == "fs_used_perc" and conky_parse("${if_mounted " .. t.arg .. "}y${else}n${endif}") == "n" then
draw_ring(cr,0,pt)
return;
end
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
if conky_window==nil then return end
local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
local cr=cairo_create(cs)
local updates=conky_parse('${updates}')
update_num=tonumber(updates)
if update_num>5 then
for i in pairs(settings_table) do
setup_rings(cr,settings_table[i])
end
end
end

if pt.verif ~=nil then
if conky_parse("${if_mounted " .. pt.arg .. "}y${endif}") ~= "y" then
draw_ring(cr,0,pt)
return;
end
end

au final , ça donnerai :

function conky_ring_stats()
local function setup_rings(cr,pt)
local str=''
local value=0
if pt.verif ~=nil then
if conky_parse("${if_mounted " .. pt.arg .. "}y${endif}") ~= "y" then
draw_ring(cr,0,pt)
return;
end
end
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
if conky_window==nil then return end
local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
local cr=cairo_create(cs)
local updates=conky_parse('${updates}')
update_num=tonumber(updates)
if update_num>5 then
for i in pairs(settings_table) do
setup_rings(cr,settings_table[i])
end
end
end