You are not logged in.

#1 2015-07-19 20:41:05

f3bruary
Member
From: /root
Registered: 2015-06-06
Posts: 58

[SOLVED] Conky Lua - How to add custom ring ?

I have a script that outputs my download client's speed which is on another server. I would like to have it represented by a ring in conky lua. I'm already using the clock rings script and it works for the bat, cpu, mem rings. But how can I add a ring that takes the output of the script ? I assume I have to write some code, but I have no idea where to start. If anyone could point me in the right direction I'd appreciate it.

Last edited by f3bruary (2015-07-20 19:00:11)


-f3b

Offline

#2 2015-07-20 16:32:40

renato_garcia
Member
From: Brazil
Registered: 2009-08-14
Posts: 24

Re: [SOLVED] Conky Lua - How to add custom ring ?

You probably have a

draw_ring(current_value, max_value)

function, or something like. If it's true you must translate your download speed script output to a (current_value, max_value) pair, and call the function on the right place. Anyway, to be able to give you any better answer you must before post your .conkyrc and scripts.

Offline

#3 2015-07-20 18:59:45

f3bruary
Member
From: /root
Registered: 2015-06-06
Posts: 58

Re: [SOLVED] Conky Lua - How to add custom ring ?

I solved it by doing:

    {
        name='exec',
        arg='~/.conky/scripts/script.sh',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0x2E70AA,
        fg_alpha=0.8,
        x=34, y=110,
        radius=27,
        thickness=5,
        start_angle=-90,
        end_angle=270
    }

And in the script I made sure it returned a percentage


-f3b

Offline

Board footer

Powered by FluxBB