This example shows how you can graph arbitrary data, in this case the output from $tcp_portmon
-- Conky Lua scripting example
--
-- This is a helper script to graph the output of tcp_portmon count
--
-- in your conkyrc, use something like so:
-- lua_load ~/portmon_graph.lua
-- ...
-- TEXT
-- ...
-- ${lua_parse update_count ${tcp_portmon 6881 6999 count}}${lua_graph get_count}
--
do
local count = 0
function conky_update_count(arg)
count = tonumber(string.match(arg, '(%d+)'))
return ''
end
function conky_get_count()
return count
end
end