You are not logged in.

#1 2016-03-19 22:56:51

chicknfangz
Member
Registered: 2016-03-19
Posts: 24

some conky help please

I followed these scripts. But need some help can anybody con firm if all is working.


where the conky is CLICK HERE


I copied the conky script and made it .conkyrc put it in folder and named it as i wished

then copied the lua script and named it as is in the conkyrc script brush_rings.lua

All is working fine. But the hands arnt showing
on the clock in the picture

and another thing is not sure how to get the colors to show up on either sides of the circle. not sure what we put in for DATA01 ,DATA02 in the conkyrc where it is listed says this.....{fs_used_perc /media/DATA02}%

But mine arnt showing so think have to put a location in not sure.

wasn't much instructions on it..  Please help thank you

#1256
2010-09-22 13:49:45

muzieca

Offline

#2 2016-03-20 00:09:38

damo
....moderator....
Registered: 2015-08-20
Posts: 5,006

Re: some conky help please

"{fs_used_perc /media/DATA02}%" - do you have a directory called "/media/DATA02", and is it mounted?

Double-check the path you have for your lua script. It should be either relative to the conkyrc location (I think), or the full path.

BTW The link you gave isn't very precise. Why not copy the conky code you are using and paste it here, using [ code ] tags....


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2016-03-20 00:11:59

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,440

Re: some conky help please

@chicknfangz

OK, that's pointing to a page over at CrunchBang ... You should find the post with the conky that you are talking about and click on the "date" of the post.  That will give you a direct link to that post you can use here as an aid.  smile

Like this... Post 1256

Now I need to know the changes you have made.  Please post 'your' conky and the LUA script you have now ... even though it doesn't work.

/media/DATA01 <<--- is a separate partition that muzieca is refering to on his system.  You need to replace that with one you have.

For example I could use /media/5 or /media/10 :

 19 Mar 16 @ 21:09:36 ~
  $ par
Partition: ID-1: / size: 20G used: 5.2G (28%) fs: ext4 dev: /dev/sda8
           label: N/A uuid: 9c8f5b02-2631-4eee-afec-71c40f5ba863
           ID-2: /media/5 size: 197G used: 104G (56%) fs: ext4 dev: /dev/sda5
           label: N/A uuid: 3139da3e-24b0-4b50-ae55-59a9cf65635e
           ID-3: /home size: 20G used: 2.5G (14%) fs: ext4 dev: /dev/sda9
           label: N/A uuid: 9f6ebf48-e240-4424-8224-604039145621
           ID-4: /media/10 size: 142G used: 2.5G (2%) fs: ext4 dev: /dev/sda10
           label: N/A uuid: 02087316-2479-4716-8ac1-31bbe326f01b
           ID-5: swap-1 size: 2.15GB used: 0.00GB (0%) fs: swap dev: /dev/sda3
           label: N/A uuid: d505d7c3-d985-4a30-b265-89f560c8efdc
 
 19 Mar 16 @ 21:09:40 ~
  $ 

BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#4 2016-03-20 00:52:14

chicknfangz
Member
Registered: 2016-03-19
Posts: 24

Re: some conky help please

Sector11 wrote:

@chicknfangz

OK, that's pointing to a page over at CrunchBang ... You should find the post with the conky that you are talking about and click on the "date" of the post.  That will give you a direct link to that post you can use here as an aid.  smile

Like this... Post 1256

Now I need to know the changes you have made.  Please post 'your' conky and the LUA script you have now ... even though it doesn't work.

/media/DATA01 <<--- is a separate partition that muzieca is refering to on his system.  You need to replace that with one you have.

For example I could use /media/5 or /media/10 :

 19 Mar 16 @ 21:09:36 ~
  $ par
Partition: ID-1: / size: 20G used: 5.2G (28%) fs: ext4 dev: /dev/sda8
           label: N/A uuid: 9c8f5b02-2631-4eee-afec-71c40f5ba863
           ID-2: /media/5 size: 197G used: 104G (56%) fs: ext4 dev: /dev/sda5
           label: N/A uuid: 3139da3e-24b0-4b50-ae55-59a9cf65635e
           ID-3: /home size: 20G used: 2.5G (14%) fs: ext4 dev: /dev/sda9
           label: N/A uuid: 9f6ebf48-e240-4424-8224-604039145621
           ID-4: /media/10 size: 142G used: 2.5G (2%) fs: ext4 dev: /dev/sda10
           label: N/A uuid: 02087316-2479-4716-8ac1-31bbe326f01b
           ID-5: swap-1 size: 2.15GB used: 0.00GB (0%) fs: swap dev: /dev/sda3
           label: N/A uuid: d505d7c3-d985-4a30-b265-89f560c8efdc
 
 19 Mar 16 @ 21:09:40 ~
  $ 

Thank you sorry i did not know that. i thought members would now what conky i refer to. Know i know i see you found the conky this is it. let me know if i did this right. Post #1256

Offline

#5 2016-03-20 01:02:31

damo
....moderator....
Registered: 2015-08-20
Posts: 5,006

Re: some conky help please

@chicknfangz

If you run the command for the conky in a terminal, you will see any error messages. This may tell you why the script is failing. Open terminator, type the following command, and press enter (adjust the path to wherever your conky is)

conky -c /path/to/your/conkyrc

Stop all conkys from running with the command "killall conky"


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#6 2016-03-20 01:29:23

chicknfangz
Member
Registered: 2016-03-19
Posts: 24

Re: some conky help please

this is the scripts from the post of the conky by default just so we are on the same page.

I did not change anything in the lines of as nothing was stated what to do

{fs_used_perc /media/DATA01}%

{fs_used_perc /media/DATA02}%


the conky script

# — Conky settings — #
#background yes
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 1024
imlib_cache_size 0

# — Window specifications — #

own_window yes
#own_window_type override#
own_window_type normal
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

border_inner_margin 0
border_outer_margin 0

minimum_size 800 800
maximum_width 800

alignment top_middle
gap_x 1
gap_y 50

# — Graphics settings — #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# — Text settings — #
use_xft yes
xftfont Droid Sans:size=10
xftalpha 0.5

uppercase no

default_color 3E3E3E
color1 D23000

# — Lua Load — #
lua_load ~/.conky/brush_rings.lua
lua_draw_hook_pre clock_rings

TEXT
${voffset 8}${color 3399FF}${font Droid Sans:size=16}${time %A}${font}${voffset -8}${color FFFFFF}${font Droid Sans:size=32}${time %e}${font}
${color FFFFFF}${voffset -30}${color 3399FF}${font Droid Sans:size=18}${time %b}${font}${voffset -3} ${color FFFFFF}${font Droid Sans:size=20}${time %Y}${font}${color 3399FF}${hr}
${voffset 5}${font Zarautz:size=16}${time %H:%M:%S}${voffset 5}${font Droid Sans:size=10}${alignr}muzieca${font}
${font Droid Sans:size=12}${color FFFFFF}${alignr}${acpitemp}°C${font}
${color 3399FF}${voffset 6}${alignr}${sysname} ${kernel} ${machine}
${alignr}Uptime:${color FFFFFF}$uptime_short
${color FFFFFF}${goto 235}${voffset 135}${cpu cpu0}%
${color 3399FF}${goto 232}CPU
${color FFFFFF}${goto 540}${voffset -30}${memperc}%
${color 3399FF}${goto 540}RAM
${color FFFFFF}${goto 255}${voffset -230}${swapperc}%
${color 3399FF}${goto 245}SWAP
${color FFFFFF}${goto 390}${voffset 50}${fs_used_perc /}%
${color 3399FF}${goto 388}Root
${color FFFFFF}${goto 305}${voffset 355}${upspeed ppp0}
${color 3399FF}${goto 305}Up
${color FFFFFF}${goto 510}${voffset 75}${downspeed ppp0}
${color 3399FF}${goto 503}Down
${color FFFFFF}${goto 50}${voffset -170}${fs_used_perc /media/DATA01}%
${color 3399FF}${goto 43}Data01
${color FFFFFF}${goto 720}${voffset -33}${fs_used_perc /media/DATA02}%
${color 3399FF}${goto 712}Data02

lua script:

I did  not change anything with this script at all as shouldn't need too.

lua script

--[[
Clock Rings by londonali1010 (2009) , mod by arpinux

This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. This script is based off a combination of my clock.lua script and my rings.lua script.

IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num>5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num>3; conversely if you update Conky every 0.5s, you should use update_num>10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.

To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
    lua_load ~/scripts/clock_rings.lua
    lua_draw_hook_pre clock_rings
    
Changelog:
+ v1.0 -- Original release (30.09.2009)
]]

settings_table = {
    {
            name='time',
            arg='%M.%S',
            max=60,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x3399cc,
            fg_alpha=0.4,
            x=400, y=400,
            radius=56,
            thickness=5,
            start_angle=0,
            end_angle=360
        },
        {
            name='time',
            arg='%S',
            max=60,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x3399cc,
            fg_alpha=0.6,
            x=400, y=400,
            radius=62,
            thickness=5,
            start_angle=0,
            end_angle=360
        },
        {
            name='time',
            arg='%d',
            max=31,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x3399cc,
            fg_alpha=0.8,
            x=400, y=400,
            radius=70,
            thickness=5,
            start_angle=-90,
            end_angle=90
    },
        {
            name='time',
            arg='%m',
            max=12,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x3399cc,
            fg_alpha=1,
            x=400, y=400,
            radius=76,
            thickness=5,
            start_angle=-90,
            end_angle=90
        },
    {
            name='cpu',
            arg='cpu0',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xffff00,
            fg_alpha=0.4,
            x=350, y=400,
            radius=200,
            thickness=50,
            start_angle=220,
            end_angle=320
    },
    {
            name='memperc',
            arg='',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x33ccff,
            fg_alpha=0.8,
            x=450, y=400,
            radius=200,
            thickness=50,
            start_angle=40,
            end_angle=140
    },
    {
            name='swapperc',
            arg='',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x33ccff,
            fg_alpha=0.8,
            x=400, y=305,
            radius=200,
            thickness=20,
            start_angle=-40,
            end_angle=40
    },
    {
            name='fs_used_perc',
            arg='/',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x3399cc,
            fg_alpha=0.3,
            x=400, y=350,
            radius=200,
            thickness=30,
            start_angle=-40,
            end_angle=40
    },
    {
            name='upspeedf',
            arg='ppp0',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xffff33,
            fg_alpha=0.3,
            x=400, y=440,
            radius=200,
            thickness=20,
            start_angle=140,
            end_angle=220
    },
    {
            name='downspeedf',
            arg='ppp0',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xccff33,
            fg_alpha=0.3,
            x=400, y=470,
            radius=210,
            thickness=20,
            start_angle=140,
            end_angle=220
    },
    {
            name='fs_used_perc',
            arg='/media/DATA01',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x3399cc,
            fg_alpha=0.8,
            x=380, y=400,
            radius=300,
            thickness=50,
            start_angle=220,
            end_angle=320
    },
    {
            name='fs_used_perc',
            arg='/media/DATA02',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xff4444,
            fg_alpha=0.8,
            x=420, y=400,
            radius=300,
            thickness=50,
            start_angle=40,
            end_angle=140
    },
}



require 'cairo'

function rgb_to_r_g_b(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function draw_ring(cr,t,pt)
    local w,h=conky_window.width,conky_window.height
    
    local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
    local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']

    local angle_0=sa*(2*math.pi/360)-math.pi/2
    local angle_f=ea*(2*math.pi/360)-math.pi/2
    local t_arc=t*(angle_f-angle_0)

    -- Draw background ring

    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
    cairo_set_line_width(cr,ring_w)
    cairo_stroke(cr)
    
    -- Draw indicator ring

    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    cairo_stroke(cr)        
end

function conky_clock_rings()
    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
    
    -- Check that Conky has been running for at least 5s

    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

Cheers.

Now i will show you what i have exactly with an image the lua seems to be working fine but the clock in the middle has no hand so not sure why that is.

Y76yadD.png


conky settings

# — Conky settings — #
#background yes
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 1024
imlib_cache_size 0

# — Window specifications — #

own_window yes
#own_window_type override#
own_window_type normal
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

border_inner_margin 0
border_outer_margin 0

minimum_size 800 800
maximum_width 800

alignment top_middle
gap_x 1
gap_y 50

# — Graphics settings — #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# — Text settings — #
use_xft yes
xftfont Droid Sans:size=10
xftalpha 0.5

uppercase no

default_color 3E3E3E
color1 D23000

# — Lua Load — #
lua_load ~/.conky/brush_rings.lua
lua_draw_hook_pre clock_rings

TEXT
${voffset 8}${color 000000}${font Droid Sans:size=16}${time %A}${font}${voffset -8}${color 000000}${font Droid Sans:size=32}${time %e}${font}
${color FFFFFF}${voffset -30}${color 000000}${font Droid Sans:size=18}${time %b}${font}${voffset -3} ${color 000000}${font Droid Sans:size=20}${time %Y}${font}${color 000000}${hr}
${voffset 5}${font Zarautz:size=16}${time %H:%M:%S}${voffset 5}${font Cantarell Bold:size=11}${alignr}TJ Wolf${font}
${font Droid Sans:size=12}${color FFFFFF}${alignr}${acpitemp}°C${font}
${color FFFFFF}${voffset 6}${alignr}${sysname} ${kernel} ${machine}
${alignr}Uptime:${color FFFFFF}$uptime_short
${color FFFFFF}${goto 235}${voffset 135}${cpu cpu0}%
${color 000000}${goto 232}CPU
${color FFFFFF}${goto 540}${voffset -30}${memperc}%
${color 000000}${goto 540}RAM
${color FFFFFF}${goto 255}${voffset -230}${swapperc}%
${color 000000}${goto 245}SWAP
${color FFFFFF}${goto 390}${voffset 50}${fs_used_perc /}%
${color 3399FF}${goto 388}Root
${color FF0000}${goto 305}${voffset 355}${upspeed p1p1}
${color FF0000}${goto 305}Up
${color FF0000}${goto 510}${voffset 75}${downspeed p1p1}
${color FF0000}${goto 503}Down
${color FFFFFF}${goto 50}${voffset -170}${fs_used_perc /media/DATA01}%
${color 3399FF}${goto 43}Data01
${color FFFFFF}${goto 720}${voffset -33}${fs_used_perc /media/DATA02}%
${color 3399FF}${goto 712}Data02

lua scrpit

--[[
Clock Rings by londonali1010 (2009) , mod by arpinux

This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. This script is based off a combination of my clock.lua script and my rings.lua script.

IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num>5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num>3; conversely if you update Conky every 0.5s, you should use update_num>10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.

To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
    lua_load ~/scripts/clock_rings.lua
    lua_draw_hook_pre clock_rings
    
Changelog:
+ v1.0 -- Original release (30.09.2009)
]]

settings_table = {
    {
            name='time',
            arg='%M.%S',
            max=60,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x3399cc,
            fg_alpha=0.4,
            x=400, y=400,
            radius=56,
            thickness=5,
            start_angle=0,
            end_angle=360
        },
        {
            name='time',
            arg='%S',
            max=60,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x3399cc,
            fg_alpha=0.6,
            x=400, y=400,
            radius=62,
            thickness=5,
            start_angle=0,
            end_angle=360
        },
        {
            name='time',
            arg='%d',
            max=31,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x3399cc,
            fg_alpha=0.8,
            x=400, y=400,
            radius=70,
            thickness=5,
            start_angle=-90,
            end_angle=90
    },
        {
            name='time',
            arg='%m',
            max=12,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x3399cc,
            fg_alpha=1,
            x=400, y=400,
            radius=76,
            thickness=5,
            start_angle=-90,
            end_angle=90
        },
    {
            name='cpu',
            arg='cpu0',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xffff00,
            fg_alpha=0.4,
            x=350, y=400,
            radius=200,
            thickness=50,
            start_angle=220,
            end_angle=320
    },
    {
            name='memperc',
            arg='',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x33ccff,
            fg_alpha=0.8,
            x=450, y=400,
            radius=200,
            thickness=50,
            start_angle=40,
            end_angle=140
    },
    {
            name='swapperc',
            arg='',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x33ccff,
            fg_alpha=0.8,
            x=400, y=305,
            radius=200,
            thickness=20,
            start_angle=-40,
            end_angle=40
    },
    {
            name='fs_used_perc',
            arg='/',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x3399cc,
            fg_alpha=0.3,
            x=400, y=350,
            radius=200,
            thickness=30,
            start_angle=-40,
            end_angle=40
    },
    {
            name='upspeedf',
            arg='ppp0',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xffff33,
            fg_alpha=0.3,
            x=400, y=440,
            radius=200,
            thickness=20,
            start_angle=140,
            end_angle=220
    },
    {
            name='downspeedf',
            arg='ppp0',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xccff33,
            fg_alpha=0.3,
            x=400, y=470,
            radius=210,
            thickness=20,
            start_angle=140,
            end_angle=220
    },
    {
            name='fs_used_perc',
            arg='/media/DATA01',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x3399cc,
            fg_alpha=0.8,
            x=380, y=400,
            radius=300,
            thickness=50,
            start_angle=220,
            end_angle=320
    },
    {
            name='fs_used_perc',
            arg='/media/DATA02',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xff4444,
            fg_alpha=0.8,
            x=420, y=400,
            radius=300,
            thickness=50,
            start_angle=40,
            end_angle=140
    },
}



require 'cairo'

function rgb_to_r_g_b(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function draw_ring(cr,t,pt)
    local w,h=conky_window.width,conky_window.height
    
    local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
    local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']

    local angle_0=sa*(2*math.pi/360)-math.pi/2
    local angle_f=ea*(2*math.pi/360)-math.pi/2
    local t_arc=t*(angle_f-angle_0)

    -- Draw background ring

    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
    cairo_set_line_width(cr,ring_w)
    cairo_stroke(cr)
    
    -- Draw indicator ring

    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    cairo_stroke(cr)        
end

function conky_clock_rings()
    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
    
    -- Check that Conky has been running for at least 5s

    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

Thank you guys for your help.  Thanks Sector11

Offline

#7 2016-03-20 02:30:17

damo
....moderator....
Registered: 2015-08-20
Posts: 5,006

Re: some conky help please

I did  not change anything with this script at all as shouldn't need too

Why would you think that? You should change what is needed for your own system. Filepaths and partitions won't necessarily be the same

{fs_used_perc /media/DATA01}%

This shows the "file system percentage used" of "/media/DATA01", and I doubt you have a directory or partition called /media/DATA01. Replace that with what you want to see on your system. (As I suggested to you in a previous post)

I did not change anything in the lines of as nothing was stated what to do

The lua script has

To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
    lua_load ~/scripts/clock_rings.lua
    lua_draw_hook_pre clock_rings

Did you change the path to wherever you have put the script?

There are several links to Conky configuration settings and variables in the menu ( Menu -> Help -> Conky -> ). Please have a look at those first.

PS Could you post thumbnails in future, instead of large images? See my sig for a link for Forums formatting wink


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#8 2016-03-20 02:55:54

chicknfangz
Member
Registered: 2016-03-19
Posts: 24

Re: some conky help please

damo wrote:

I did  not change anything with this script at all as shouldn't need too

Why would you think that? You should change what is needed for your own system. Filepaths and partitions won't necessarily be the same

{fs_used_perc /media/DATA01}%

This shows the "file system percentage used" of "/media/DATA01", and I doubt you have a directory or partition called /media/DATA01. Replace that with what you want to see on your system. (As I suggested to you in a previous post)

I did not change anything in the lines of as nothing was stated what to do

The lua script has

To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
    lua_load ~/scripts/clock_rings.lua
    lua_draw_hook_pre clock_rings

Did you change the path to wherever you have put the script?

There are several links to Conky configuration settings and variables in the menu ( Menu -> Help -> Conky -> ). Please have a look at those first.

PS Could you post thumbnails in future, instead of large images? See my sig for a link for Forums formatting wink


demo. Thats always in the lua file. That is not the file that runs. if you look at the conkyrc script it tells where the lua file needs to be which is in .conky and thats where i have it. named brush_rings.lua

# — Lua Load — #
lua_load ~/.conky/brush_rings.lua
lua_draw_hook_pre clock_rings

Offline

#9 2016-03-20 03:24:31

damo
....moderator....
Registered: 2015-08-20
Posts: 5,006

Re: some conky help please

Are the rings in the middle for the `fs_used_perc` variables? If so, until you sort out the filesystem paths, maybe they won't display properly.


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#10 2016-03-20 03:34:29

chicknfangz
Member
Registered: 2016-03-19
Posts: 24

Re: some conky help please

damo wrote:

Are the rings in the middle for the `fs_used_perc` variables? If so, until you sort out the filesystem paths, maybe they won't display properly.

the rings are in the middle as you see in the screenshot i gave but the hands arnt if you look at the post from crunchbang image and then mine you will see. so not sure what you mean

Last edited by chicknfangz (2016-03-20 03:36:18)

Offline

#11 2016-03-20 04:22:34

damo
....moderator....
Registered: 2015-08-20
Posts: 5,006

Re: some conky help please

DELETED - no longer relevant

Last edited by damo (2016-03-20 04:39:51)


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#12 2016-03-20 04:53:00

chicknfangz
Member
Registered: 2016-03-19
Posts: 24

Re: some conky help please

damo wrote:
chicknfangz wrote:
damo wrote:

Are the rings in the middle for the `fs_used_perc` variables? If so, until you sort out the filesystem paths, maybe they won't display properly.

the rings are in the middle as you see in the screenshot i gave but the hands arnt if you look at the post from crunchbang image and then mine you will see. so not sure what you mean

Yeah, and I can't read it very well, and I'm not going to chase around the crunchbang forums to find a better image, so I'll repeat: are those rings for the `fs_used_perc` variables?



What can't you read very well?  my image or the post in crunchbang alls you have to do is click on it up top it brings you right to the conky.

Is this what you mean i opened up the lua file. That showed this which i think are the rings. the other ones are for the /media/DATA0 i still need to change


name='fs_used_perc',
            arg='/',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x3399cc,
            fg_alpha=0.3,
            x=400, y=350,
            radius=200,
            thickness=30,
            start_angle=-40,
            end_angle=40
            name='fs_used_perc',
            arg='/media/DATA01',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x3399cc,
            fg_alpha=0.8,
            x=380, y=400,
            radius=300,
            thickness=50,
            start_angle=220,
            end_angle=320
    },
         name='fs_used_perc',
            arg='/media/DATA02',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xff4444,
            fg_alpha=0.8,
            x=420, y=400,
            radius=300,
            thickness=50,
            start_angle=40,
            end_angle=140

thats in the lua script

Offline

#13 2016-03-20 05:20:54

damo
....moderator....
Registered: 2015-08-20
Posts: 5,006

Re: some conky help please

That lua script doesn't have any functions for drawing the clock hands, or even getting the time. It would seem that the original sreenshot you are talking about isn't one that shows the script that is posted.

You could search for londonali's original cairo clock script (I think it is on deviantArt) and copy the relevant sections into your script. The same code is also available in some of the BunsenLabs default conkys (BL-Ellipses-Time-*.conkyrc), which you can get from our github. I guess you may not have them installed, because I think you are running Ubuntu?

The geometry of the rings in your screenshot is all wrong though - the arcs aren't concentric, and look ugly IMO.


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#14 2016-03-20 05:40:20

chicknfangz
Member
Registered: 2016-03-19
Posts: 24

Re: some conky help please

damo wrote:

That lua script doesn't have any functions for drawing the clock hands, or even getting the time. It would seem that the original sreenshot you are talking about isn't one that shows the script that is posted.

You could search for londonali's original cairo clock script (I think it is on deviantArt) and copy the relevant sections into your script. The same code is also available in some of the BunsenLabs default conkys (BL-Ellipses-Time-*.conkyrc), which you can get from our github. I guess you may not have them installed, because I think you are running Ubuntu?

The geometry of the rings in your screenshot is all wrong though - the arcs aren't concentric, and look ugly IMO.

I got the conky script and lua script here http://crunchbang.org/forums/viewtopic. … 752#p86752

Are you saying its missing stuff? And how does my rings and stuff look wrong in the screenshot looks the same to me as the original pic.


Yes i'm using Ubuntu based distro Linux lite. But that shouldn't matter any conky will run

Offline

#15 2016-03-20 05:50:23

damo
....moderator....
Registered: 2015-08-20
Posts: 5,006

Re: some conky help please

chicknfangz wrote:

....
Are you saying its missing stuff? And how does my rings and stuff look wrong in the screenshot looks the same to me as the original pic.

Yes i'm using Ubuntu based distro Linux lite. But that shouldn't matter any conky will run

You said it wasn't showing the clock hands. There is no code in the script for getting the time or drawing them.

And if you are asking for help on a BunsenLabs forum, it would be courteous to mention that you aren't using BL. Yes, conkys will run, but I could be wasting my time helping with a fix if you don't have the relevant files on your system. As was demonstrated in your bash script thread-hijack sad


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#16 2016-03-20 06:07:36

chicknfangz
Member
Registered: 2016-03-19
Posts: 24

Re: some conky help please

damo wrote:
chicknfangz wrote:

....
Are you saying its missing stuff? And how does my rings and stuff look wrong in the screenshot looks the same to me as the original pic.

Yes i'm using Ubuntu based distro Linux lite. But that shouldn't matter any conky will run

You said it wasn't showing the clock hands. There is no code in the script for getting the time or drawing them.

And if you are asking for help on a BunsenLabs forum, it would be courteous to mention that you aren't using BL. Yes, conkys will run, but I could be wasting my time helping with a fix if you don't have the relevant files on your system. As was demonstrated in your bash script thread-hijack sad

DUDE what are you saying you need to stop right now. And learn how to help people the proper way. so STOP right now enough!!! Don't try and help me dude if your going to be a dick about it. I'm done talking to you

Last edited by chicknfangz (2016-03-20 06:09:21)

Offline

#17 2016-03-20 12:40:37

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,440

Re: some conky help please

Guys guys ... please.  Sit back and OHM OHM OHM!

damo is/was trying to help you chicknfangz.  Whether or not you like how he accomplished that your statement:

DUDE what are you saying you need to stop right now. And learn how to help people the proper way. so STOP right now enough!!! Don't try and help me dude if your going to be a dick about it. I'm done talking to you

... is uncalled for and downright rude.

You both have elements of right and wrong in your posts.

1.  There is no code in the LUA script that "draws the clock hands".

2.  There is code that gets the some time elements but draws clock based rings with it: Month, Day, Minutes and Seconds.

settings_table = {
    {
            name='time',
            arg='%M.%S',
            max=60,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0xff0000, --3399cc, red = Minutes
            fg_alpha=0.4,
            x=400, y=400,
            radius=56,
            thickness=5,
            start_angle=0,
            end_angle=360
        },
        {
            name='time',
            arg='%S',
            max=60,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x00ff00,  --3399cc, green = Seconds
            fg_alpha=0.6,
            x=400, y=400,
            radius=62,
            thickness=5,
            start_angle=0,
            end_angle=360
        },
        {
            name='time',
            arg='%d',
            max=31,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x0000ff,  --3399cc, darkblue = Days
            fg_alpha=0.8,
            x=400, y=400,
            radius=70,
            thickness=5,
            start_angle=-90,
            end_angle=90
    },
        {
            name='time',
            arg='%m',
            max=12,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0xffff00,	--3399cc, yellow = Months
            fg_alpha=1,
            x=400, y=400,
            radius=76,
            thickness=5,
            start_angle=-90,
            end_angle=90
        },

2016_03_20_09_08_23_Scrot11.jpg

3.  The original screenshot at Crunchbang that muzieca used does not reflect the conky and LUA script posted.  It's close, for me the LUA script was edited to add the clock hands but the unedited script was uploaded to the forum.

4.  From the LUA script these: {fs_used_perc /media/DATA01}% and {fs_used_perc /media/DATA02}% are "machine specific" and need to be changed to match the machine the script is being used on.  IE one could be:
{fs_used_perc /home/<username>}%  Not all conkys run on all machines even within the same distros.  In my test of this setup I used: {fs_used_perc /media/5}% and {fs_used_perc /media/10}% since they exist here.

5.  Fonts - this conky uses: ${font Zarautz:size=16}${time %H:%M:%S} - I don't have that font on my system.  This will change the way the conky looks - the font obviously and quite possible spacing; a 90% chance of that.  So that will need to be changed and spacing adjusted or have the font installed.  I changed it to this: ${font Atomic Clock Radio:size=16}${time %T} just for fun.  BTW: %T = %H:%M:%S  Already I see other spacing problems.
2016_03_20_09_22_09_Scrot11.jpg

6.  It is important to know what "system" the conky is running on, conky settings need to be adjusted for different DE's and or WM's and or with different composite managers.  And I'll add today; it is also important to know what version of conky one is running, conky v1.10 is out and very different to conky v1.9 that we use here at BunsenLabs.  The Crunchbang conky  thread was a "home ground for people from many different distros to talk about conky", and ran very smoothly with all conky enthusiasts helping each other, unfortunately it is not wanted here but we can still play nice together.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#18 2016-03-21 19:58:28

chicknfangz
Member
Registered: 2016-03-19
Posts: 24

Re: some conky help please

OK yes it was rude of me to say that.  I'm sorry demo i was rude to you it won't happen again and thats not way to go about things getting help so sorry.


Can i start fresh slate start over.


Somebody can delete this thread

Offline

#19 2016-03-21 20:04:59

damo
....moderator....
Registered: 2015-08-20
Posts: 5,006

Re: some conky help please

^ Good of you to say that, thanks smile

PS it is "damo" wink


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#20 2016-03-21 20:20:08

chicknfangz
Member
Registered: 2016-03-19
Posts: 24

Re: some conky help please

made i new thread so we can start over. demo and sector11


https://forums.bunsenlabs.org/viewtopic.php?id=1579


somebody can delete this post


Oh ya by the way damo i got your conky at deviart and its working great   big_smile

--- MOD EDIT ---
We do not delete threads.

Last edited by Sector11 (2016-03-21 21:03:52)

Offline

#21 2016-03-21 23:01:28

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,440

Re: some conky help please

OK, I found a lua script that has clock hands and RINGS, lot's of rings.
I'm going to modify it to look line the "brush_rings.lua" discussed here.

chicknfangz, you better be willing to help here ...  What partitions do you have on your computer that can be used to replace /media/DATA01 and DATA02?

This is what the new script looks like now (says it's a LinuxMint mod ... but found it in the orange forum):
2016_03_21_19_57_41_Scrot11.jpg


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#22 2016-03-21 23:25:38

chicknfangz
Member
Registered: 2016-03-19
Posts: 24

Re: some conky help please

OK thank you very much sector11 indeed i will help. If it ends up not being able to work then thats OK i will go with another conky guys. I will post my gparted partitions here for you Thank you for taking the time out to help me. Very much appreciate it

Offline

#23 2016-03-21 23:37:58

chicknfangz
Member
Registered: 2016-03-19
Posts: 24

Re: some conky help please

here is the gparted layout

odc1roM.png

and this is the fdisk layout.

Disk /dev/sda: 1000.2 GB, 1000204884992 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525166 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x555e48ff

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        4094  1953523711   976759809    5  Extended
/dev/sda5            4096  1648011263   824003584   83  Linux
/dev/sda6      1920759808  1953523711    16381952   82  Linux swap / Solaris
/dev/sda7      1648013312  1920757452   136372070+  83  Linux

If you need to know more let me know

Offline

#24 2016-03-22 00:54:55

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,440

Re: some conky help please

Yea, I figured as much.  You won't be able to use the DATA01 and DATA02 rings as shown, they need to be mount points of partitions and you only have two partitions and /dev/sda5 (PointLinux) doesn't look like it's mounted with LinuxLite.

Two more questions,
1.  How you connect to the internet?  With eth0, wlan0 or something else (to get the up/down speeds)
2.  How many CPU's do you have?  The script only uses the average (CPU0) if you have a dual core we can use the DATA01/02 rings for CPU1 and CPU2


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#25 2016-03-22 01:40:37

chicknfangz
Member
Registered: 2016-03-19
Posts: 24

Re: some conky help please

Linux lite is what I'm on now. SO could i mnt point Linux to the one bar. I can install bunsenlabs also then can i mnt it to the other bar. I could mount them  would that work or Does it work like that or entirely different way

I connect to the Internet through Ethernet yes. But its not eth0 on Linux lite its p1p1

my cpu is i7 2600k 4 cores

Offline

Board footer

Powered by FluxBB