Page 950 of 2299 FirstFirst ... 4508509009409489499509519529601000105014501950 ... LastLast
Results 9,491 to 9,500 of 22981

Thread: Post your .conkyrc files w/ screenshots

  1. #9491
    Join Date
    Nov 2008
    Location
    Wirral, UK
    Beans
    277
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    I think I messed up, but don't know how or why, I am using a cut down version of Londonali's clock.lua script on my conky but it just won't display,

    Code:
        --[[
        Air Clock by londonali1010 (2009)
    
        This clock is designed to look like KDE 4.3's "Air" clock, but from inside Conky.
    
        You can adjust the clock's radius and placement, as well as the size and offset of the drop shadow. You can also choose whether to display the seconds hand. This clock updates every time Conky does, so if you want to show seconds, it is recommended that you set update_interval to no more than 0.5s. If you turn off seconds, you can set the update_interval to as long as 30s. The settings are in the "Settings" section, starting at Line 21.
    
        Call this script in Conky using the following before TEXT (assuming you save this script to ~/scripts/clock.lua):
        lua_load ~/scripts/clock.lua
        lua_draw_hook_pre draw_clock
        ]]
    
        require ‘cairo’
        function conky_draw_clock()
        if conky_window==nil then return end
        local w=conky_window.width
        local h=conky_window.height
        local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h)
        cr=cairo_create(cs)
    
        -- Settings
    
        -- What radius should the clock face (not including border) be, in pixels?
    
        local clock_r=80
    
        -- x and y coordinates, relative to the top left corner of Conky, in pixels
    
        local xc=195
        local yc=195
    
        -- Do you want to show the second hand? Use this if you use a Conky update_interval > 1s. Can be true or false.
    
        show_seconds=true
    
        -- Grab time
    
        local hours=os.date(”%I”)
        local mins=os.date(”%M”)
        local secs=os.date(”%S”)
    
        secs_arc=(2*math.pi/60)*secs
        mins_arc=(2*math.pi/60)*mins
        hours_arc=(2*math.pi/12)*hours+mins_arc/12
    
        -- Draw hour hand
    
        xh=xc+0.7*clock_r*math.sin(hours_arc)
        yh=yc-0.7*clock_r*math.cos(hours_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xh,yh)
    
        cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
        cairo_set_line_width(cr,5)
        cairo_set_source_rgba(cr,0,0,0,0.5)
        cairo_stroke(cr)
    
        -- Draw minute hand
    
        xm=xc+0.9*clock_r*math.sin(mins_arc)
        ym=yc-0.9*clock_r*math.cos(mins_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xm,ym)
    
        cairo_set_line_width(cr,3)
        cairo_stroke(cr)
    
        -- Draw seconds hand
    
        if show_seconds then
        xs=xc+0.9*clock_r*math.sin(secs_arc)
        ys=yc-0.9*clock_r*math.cos(secs_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xs,ys)
    
        cairo_set_line_width(cr,1)
        cairo_stroke(cr)
        end
        end
    this is how it is called

    Code:
    # -- Lua Load -- #
    lua_load ~/scripts/rings.lua
    lua_draw_hook_pre ring_stats
    
    lua_load ~/scripts/clock.lua
    lua_draw_hook_pre draw_clock
    and this is the error I get

    Code:
    Conky: llua_do_call: function conky_draw_clock execution failed: attempt to call a nil value
    if i comment out the clock parts of the Lua Load, then the rest of the script works, if it's allowed to run then neither script (rings.lua or clock.lua)will display
    Last edited by 5BallJuggler; October 3rd, 2009 at 05:39 PM.
    I'll never drink water again....Fish poo in it!
    XP for iTunes Only : Ubuntu10.04 : Crunchbang : DSL
    I'm Pushing Narcoleptic Numbat for ubuntu11.04
    Proper Funny Stuff

  2. #9492
    Join Date
    Dec 2008
    Location
    RIGHT BEHIND YOU
    Beans
    294
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by WorldTripping View Post
    Hi,

    I'm trying to figure out why I cannot 'alpha' out some on-screen text in Conky.

    I'm using:

    Code:
    # Use Xft?
    use_xft yes
    
    # Xft font when Xft is enabled
    xftfont Santana:size=8
    
    # Text alpha when using Xft
    xftalpha 0.8
    but it doesn't seem to make a difference no matter what I change (decrease); 'xftalpha 0.8' to.

    Can anyone advise ?

    Full Conky below.


    Code:
    # conky configuration
    
    # set to yes if you want Conky to be forked in the background
    background no
    
    # Use Xft?
    use_xft yes
    
    # Xft font when Xft is enabled
    xftfont Santana:size=8
    
    # Text alpha when using Xft
    xftalpha 0.8
    
    # Update interval in seconds
    update_interval 1.0
    
    # This is the number of times Conky will update before quitting.
    # Set to zero to run forever.
    total_run_times 0
    
    # Create own window instead of using desktop (required in nautilus)
    own_window no
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # Minimum size of text area
    minimum_size 425 600
    maximum_width 425
    
    # Draw shades?
    draw_shades yes
    
    # Draw outlines?
    draw_outline no
    
    # Draw borders around text
    draw_borders no
    draw_graph_borders yes
    
    # Stippled borders?
    stippled_borders 8
    
    # border margins
    border_margin 4
    
    # border width
    border_width 1
    
    # Default colors and also border colors
    default_color white
    default_shade_color black
    default_outline_color white
    
    # own window options
    own_window        yes
    own_window_transparent    yes
    own_window_type        override
    own_window_hints    undecorated,below,sticky,skip_taskbar,skip_pager
    
    # Text alignment, other possible values are commented
    alignment top_left
    #alignment top_right
    #alignment top_middle
    #alignment bottom_left
    #alignment bottom_right
    #alignment bottom_middle
    #alignment middle_left
    #alignment middle_right
    
    # Gap between borders of screen and text
    # same thing as passing -x at command line
    gap_x 10
    gap_y 10
    
    # Subtract file system buffers from used memory?
    no_buffers yes
    
    # set to yes if you want all text to be in uppercase
    uppercase no
    
    # number of cpu samples to average
    # set to 1 to disable averaging
    cpu_avg_samples 2
    
    # number of net samples to average
    # set to 1 to disable averaging
    net_avg_samples 2
    
    # Force UTF8? note that UTF8 support required XFT
    override_utf8_locale yes
    
    # Add spaces to keep things from moving about?  This only affects certain objects.
    use_spacer right
    
    # colours
    color1 white
    color2 grey
    
    text_buffer_size 2048
    
    # variable is given either in format $variable or in ${variable}. Latter
    # allows characters right after the variable and must be used in network
    # stuff because of an argument
    
    #lua load
    lua_load ~/.conkyLeftRingsWIFI.lua
    lua_draw_hook_pre ring_stats
    
    # stuff after 'TEXT' will be formatted on screen
    TEXT
    ${alignr 298}${voffset 10}CPU 1
    ${alignr 298}${voffset 40}CPU 2
    ${alignr 192}${voffset 30}${hr}
    ${alignr 25}${top name 1}${alignr} ${top pid 1} ${top cpu 1}
    ${alignr 25}${top name 2}${alignr} ${top pid 2} ${top cpu 2}
    ${alignr 25}${top name 3}${alignr} ${top pid 3} ${top cpu 3}
    ${alignr 25}${top name 4}${alignr} ${top pid 4} ${top cpu 4}
    ${alignr 25}${top name 5}${alignr} ${top pid 5} ${top cpu 5}
    ${alignr 292}${voffset 110}${execi 3600 wget -O - http://www.whatismyip.org/ | tail}
    ${alignr 315}${voffset 5}${wireless_essid wlan0}
    ${alignr 298}${voffset 5}${addr wlan0}
    ${alignr 236}${voffset 55}ROOT
    ${alignr 236}${voffset 20}SWAP
    ${alignr 240}${voffset 15}MEM
    Cheers.
    Well, I didn't know that option existed so I'm no expert here, but a quick google seems to suggest that xft is an actual type of font... so it may not work unless you are using an xft font? I'm going to play around with it, it would be cool if conky had text transparency (alpha) from within the program instead of with 3rd party hacks.

    [EDIT: scratch that, it works for me with truetype fonts... what version of conky are you using?]

    Quote Originally Posted by erictherev View Post
    Does the command in your signature really work?
    Maybe, maybe not... only one way to find out!
    Last edited by Sarai the Geek; October 3rd, 2009 at 05:51 PM.

  3. #9493
    Join Date
    Feb 2009
    Location
    UK
    Beans
    129
    Distro
    Ubuntu

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by 5BallJuggler View Post
    I think I messed up, but don't know how or why, I am using a cut down version of Londonali's clock.lua script on my conky but it just won't display,

    Code:
        --[[
        Air Clock by londonali1010 (2009)
    
        This clock is designed to look like KDE 4.3's "Air" clock, but from inside Conky.
    
        You can adjust the clock's radius and placement, as well as the size and offset of the drop shadow. You can also choose whether to display the seconds hand. This clock updates every time Conky does, so if you want to show seconds, it is recommended that you set update_interval to no more than 0.5s. If you turn off seconds, you can set the update_interval to as long as 30s. The settings are in the "Settings" section, starting at Line 21.
    
        Call this script in Conky using the following before TEXT (assuming you save this script to ~/scripts/clock.lua):
        lua_load ~/scripts/clock.lua
        lua_draw_hook_pre draw_clock
        ]]
    
        require ‘cairo’
        function conky_draw_clock()
        if conky_window==nil then return end
        local w=conky_window.width
        local h=conky_window.height
        local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h)
        cr=cairo_create(cs)
    
        -- Settings
    
        -- What radius should the clock face (not including border) be, in pixels?
    
        local clock_r=80
    
        -- x and y coordinates, relative to the top left corner of Conky, in pixels
    
        local xc=195
        local yc=195
    
        -- Do you want to show the second hand? Use this if you use a Conky update_interval > 1s. Can be true or false.
    
        show_seconds=true
    
        -- Grab time
    
        local hours=os.date(”%I”)
        local mins=os.date(”%M”)
        local secs=os.date(”%S”)
    
        secs_arc=(2*math.pi/60)*secs
        mins_arc=(2*math.pi/60)*mins
        hours_arc=(2*math.pi/12)*hours+mins_arc/12
    
        -- Draw hour hand
    
        xh=xc+0.7*clock_r*math.sin(hours_arc)
        yh=yc-0.7*clock_r*math.cos(hours_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xh,yh)
    
        cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
        cairo_set_line_width(cr,5)
        cairo_set_source_rgba(cr,0,0,0,0.5)
        cairo_stroke(cr)
    
        -- Draw minute hand
    
        xm=xc+0.9*clock_r*math.sin(mins_arc)
        ym=yc-0.9*clock_r*math.cos(mins_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xm,ym)
    
        cairo_set_line_width(cr,3)
        cairo_stroke(cr)
    
        -- Draw seconds hand
    
        if show_seconds then
        xs=xc+0.9*clock_r*math.sin(secs_arc)
        ys=yc-0.9*clock_r*math.cos(secs_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xs,ys)
    
        cairo_set_line_width(cr,1)
        cairo_stroke(cr)
        end
        end
    this is how it is called

    Code:
    # -- Lua Load -- #
    lua_load ~/scripts/rings.lua
    lua_draw_hook_pre ring_stats
    
    lua_load ~/scripts/clock.lua
    lua_draw_hook_pre draw_clock
    and this is the error I get

    Code:
    Conky: llua_do_call: function conky_draw_clock execution failed: attempt to call a nil value
    if i comment out the clock parts of the Lua Load, then the rest of the script works, if it's allowed to run then neither script (rings.lua or clock.lua)will display
    It may have to do with the fact that you're calling two scripts, which I've never done. What are you trying to do? Because I've also made a Clock Rings script, which makes rings and also draws clock hands, which looks like what you're trying to do since you've taken out all the background bit...
    - Samsung R519 Silver - Dual-Boot Windows 7/Ubuntu 9.10 -
    - The Official Conky Blog - Follow conkynews on Twitter -
    - My Launchpad PPA -
    - My blog: My Little Desktop -

  4. #9494
    Join Date
    Nov 2008
    Location
    Wirral, UK
    Beans
    277
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by londonali1010 View Post
    It may have to do with the fact that you're calling two scripts, which I've never done. What are you trying to do? Because I've also made a Clock Rings script, which makes rings and also draws clock hands, which looks like what you're trying to do since you've taken out all the background bit...
    I've changed my conky to run your script, now it doesn't seem to work at all

    Code:
    --[[
        lua_load ~/scripts/clock_rings.lua
        lua_draw_hook_pre clock_rings
    	]]
    
        settings_table = {
    	},
    		name='cpu',
    		arg='cpu0',
    		max=100,
    		bg_colour=0x016BFF,
    		bg_alpha=0,
    		fg_colour=0x016BFF,
    		fg_alpha=0.8,
    		x=195, y=195,
    		radius=137.5,
    		thickness=15,
    		start_angle=90,
    		end_angle=50
    	},
    	{
    		name='memperc',
    		arg='',
    		max=100,
    		bg_colour=0x016BFF,
    		bg_alpha=0.1,
    		fg_colour=0x016BFF,
    		fg_alpha=0.5,
    		x=195, y=195,
    		radius=157,
    		thickness=13,
    		start_angle=90,
    		end_angle=50
    	},
    	{
    		name='fs_used_perc',
    		arg='/',
    		max=100,
    		bg_colour=0x016BFF,
    		bg_alpha=0,
    		fg_colour=0x016BFF,
    		fg_alpha=0.5,
    		x=195, y=195,
    		radius=100,
    		thickness=20,
    		start_angle=90,
    		end_angle=50
    	},
    	{
    		name='battery_percent',
    		arg='BAT1',
    		bg_colour=0xFF0000,
    		bg_alpha=0.4,
    		fg_colour=0x016BFF,
    		fg_alpha=1,
    		x=195, y=195,
    		radius=120,
    		thickness=10,
    		start_angle=90,
    		end_angle=50
    	},
    	{
    		name='wireless_link_qual_perc',
    		arg='wlan0',
    		max=100,
    		bg_colour=0x016BFF,
    		bg_alpha=0.1,
    		fg_colour=0x016BFF,
    		fg_alpha=0.9,
    		x=195, y=195,
    		radius=80,
    		thickness=12.5,
    		start_angle=90,
    		end_angle=50
    	},
    	{
    		name='time',
    		arg='%H',
    		max=24,
    		bg_colour=0xFFFFFF,
    		bg_alpha=0.1,
    		fg_colour=0xFFFFFF,
    		fg_alpha=0.9,
    		x=195, y=195,
    		radius=28,
    		thickness=3.5,
    		start_angle=10,
        		end_angle=360
    	},
    	{
    		name='time',
    		arg='%M',
    		max=60,
    		bg_colour=0xFFFFFF,
    		bg_alpha=0.1,
    		fg_colour=0xFFFFFF,
    		fg_alpha=0.95,
    		x=195, y=195,
    		radius=33,
    		thickness=3.5,
    		start_angle=0,
        		end_angle=360
    	},
    	{
    		name='time',
    		arg='%S',
    		max=60,
    		bg_colour=0xFFFFFF,
    		bg_alpha=0.1,
    		fg_colour=0xFFFFFF,
    		fg_alpha=1.0,
    		x=195, y=195,
    		radius=13.5,
    		thickness=23,
    		start_angle=0,
    		end_angle=360
    	},
    }
    
        -- Use these settings to define the origin and extent of your clock.
    
        clock_r=125
    
        -- “clock_x” and “clock_y” are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.
    
        clock_x=840
        clock_y=170
    
        show_seconds=true
    
        require 'cairo'
    
        function rgb_to_r_g_b(colour,alpha)
        return ((colour / 0×10000) % 0×100) / 255., ((colour / 0×100) % 0×100) / 255., (colour % 0×100) / 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 draw_clock_hands(cr,xc,yc)
        local secs,mins,hours,secs_arc,mins_arc,hours_arc
        local xh,yh,xm,ym,xs,ys
    
        secs=os.date(”%S”)
        mins=os.date(”%M”)
        hours=os.date(”%I”)
    
        secs_arc=(2*math.pi/60)*secs
        mins_arc=(2*math.pi/60)*mins+secs_arc/60
        hours_arc=(2*math.pi/12)*hours+mins_arc/12
    
        -- Draw hour hand
    
        xh=xc+0.7*clock_r*math.sin(hours_arc)
        yh=yc-0.7*clock_r*math.cos(hours_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xh,yh)
    
        cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
        cairo_set_line_width(cr,5)
        cairo_set_source_rgba(cr,1,1,1,0.8)
        cairo_stroke(cr)
    
        -- Draw minute hand
    
        xm=xc+clock_r*math.sin(mins_arc)
        ym=yc-clock_r*math.cos(mins_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xm,ym)
    
        cairo_set_line_width(cr,3)
        cairo_stroke(cr)
    
        -- Draw seconds hand
    
        if show_seconds then
        xs=xc+clock_r*math.sin(secs_arc)
        ys=yc-clock_r*math.cos(secs_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xs,ys)
    
        cairo_set_line_width(cr,1)
        cairo_stroke(cr)
        end
        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
    
        draw_clock_hands(cr,clock_x,clock_y)
        end
    I expect it's a typo on my part but i get this error

    Code:
    Conky: llua_do_call: function conky_clock_rings execution failed: attempt to call a nil value
    I'll never drink water again....Fish poo in it!
    XP for iTunes Only : Ubuntu10.04 : Crunchbang : DSL
    I'm Pushing Narcoleptic Numbat for ubuntu11.04
    Proper Funny Stuff

  5. #9495
    Join Date
    Jul 2007
    Location
    The U. S. of A.
    Beans
    163
    Distro
    Kubuntu Development Release

    Thumbs down Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by londonali1010 View Post
    ....

    Only problem is that you can't *quite* get the hours to, say, go between 6 and 7 if it's 6:30...Closest I've got is to use arg='%I.%M', so it thinks the "time" is 6.3. Of course, that's not exactly perfect because 6.3 hours does not equal 6:30!!! But thats the closest I've gotten
    Hey Londonali1010,
    just some thoughts on this...

    If you generate a Variable (%) for hours, minutes and seconds you can use them to get a more precice set.

    forgive the psudo code:
    Code:
    Hours= Date(Hour)*factor       --/gets the Hour as a % of 100
    Minute= Date(Minute)*factor    --/gets the Minute as a % of 100
    Second= Date(Second)*factor    --/gets the Second as a % of 100
    
    if Second < 10 then            --/gets the Minute as a Precise % of 100
    Minute= Minute".0"(Second) 
    Else Minute= Minute"."(Second) 
    endif
    
    if Minute < 10 then            --/gets the Hours as a Precise % of 100
    Hours= Hours".0"(Minute) 
    Else Hours= Hours"."(Minute) 
    endif
    hope that helps some...
    Last edited by Crinos512; October 3rd, 2009 at 09:28 PM.
    || Kubuntu x86_64 (12.10 Dev.) || KDE 4.9.00 ||
    || Dell Inspiron 570 || 8GB PC3-10600 DDR3 RAM || AMD Phenom II X4 820 @ 2.8Ghz ||
    || Razer Lachesis Gaming Mouse || Logitech G15 Gaming Keyboard ||
    Conky: ... no such configuration: 'normal'

  6. #9496
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Just so people know, I'm still around, but have been in the process of looking for a new apartment, now found.

    So now we are in the process of cleaning, throwing things out, back and forth between the two places. Next week we start packing. On the 15th we move. I have about 20 pages to read I think.

    The last real page I've read was when londonali1010 cane up with v1.0.something of her "background" lua script and I said I had to try it ... I still haven't. No time, but I am here and will be here more when our new internet connection is hooked up on the 17th. Briefly seen the clock rings - WOW!!!!!!!

    I shall return!!!!!!!
    Have a GREAT day!
    Bruce

  7. #9497
    Join Date
    Feb 2009
    Location
    UK
    Beans
    129
    Distro
    Ubuntu

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by 5BallJuggler View Post
    I've changed my conky to run your script, now it doesn't seem to work at all
    *snip*
    I expect it's a typo on my part but i get this error

    Code:
    Conky: llua_do_call: function conky_clock_rings execution failed: attempt to call a nil value
    If you copied it straight, it should work. Try make sure that the line that says
    Code:
    local str=''
    has two single apostrophes, not a quotation mark. You may also want to delete out the part of the settings_table for battery_percent, if you don't use a battery, or your battery is BAT0.

    Quote Originally Posted by Crinos512 View Post
    Hey Londonali1010,
    just some thoughts on this...

    If you generate a Variable (%) for hours, minutes and seconds you can use them to get a more precice set.

    forgive the psudo code:
    Code:
    Hours= Date(Hour)*factor       --/gets the Hour as a % of 100
    Minute= Date(Minute)*factor    --/gets the Minute as a % of 100
    Second= Date(Second)*factor    --/gets the Second as a % of 100
    
    if Second < 10 then            --/gets the Minute as a Precise % of 100
    Minute= Minute".0"(Second) 
    Else Minute= Minute"."(Second) 
    endif
    
    if Minute < 10 then            --/gets the Hours as a Precise % of 100
    Hours= Hours".0"(Minute) 
    Else Hours= Hours"."(Minute) 
    endif
    hope that helps some...
    I'm okay getting the hour hand correct on the clock but it's the ring I'm struggling with! I need to be able to use conky_parse() to parse something of the format ${variable argument} that will give me something like 6.5 for the "hour" part of 6:30, so my ring will go all the way to where the hand is. If you look close in my last screenie, the "hour" ring doesn't quite touch the hour hand!

    Quote Originally Posted by Bruce M. View Post
    Just so people know, I'm still around, but have been in the process of looking for a new apartment, now found.

    So now we are in the process of cleaning, throwing things out, back and forth between the two places. Next week we start packing. On the 15th we move. I have about 20 pages to read I think.

    The last real page I've read was when londonali1010 cane up with v1.0.something of her "background" lua script and I said I had to try it ... I still haven't. No time, but I am here and will be here more when our new internet connection is hooked up on the 17th. Briefly seen the clock rings - WOW!!!!!!!

    I shall return!!!!!!!
    Have a GREAT day!
    Bruce
    Huullloooo! Yeah, I thought you'd been quiet. It's all kicked off around here, you've got a lot to catch up on!
    - Samsung R519 Silver - Dual-Boot Windows 7/Ubuntu 9.10 -
    - The Official Conky Blog - Follow conkynews on Twitter -
    - My Launchpad PPA -
    - My blog: My Little Desktop -

  8. #9498
    Join Date
    Nov 2008
    Location
    Wirral, UK
    Beans
    277
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    I think I'm getting somewhere now, thanks to Londonali for the support, i'm just after a little more then i'll stop mithering.

    Code:
    --[[
    Clock Rings by londonali1010 (2009)
    
    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='cpu',
    		arg='cpu0',
    		max=100,
    		bg_colour=0x016BFF,
    		bg_alpha=0,
    		fg_colour=0x016BFF,
    		fg_alpha=0.8,
    		x=195, y=195,
    		radius=137.5,
    		thickness=15,
    		start_angle=0,
    		end_angle=360
    	},
    	{
    		name='memperc',
    		arg='',
    		max=100,
    		bg_colour=0x016BFF,
    		bg_alpha=0.1,
    		fg_colour=0x016BFF,
    		fg_alpha=0.5,
    		x=195, y=195,
    		radius=157,
    		thickness=13,
    		start_angle=0,
    		end_angle=360
    	},
    	{
    		name='fs_used_perc',
    		arg='/',
    		max=100,
    		bg_colour=0x016BFF,
    		bg_alpha=0,
    		fg_colour=0x016BFF,
    		fg_alpha=0.5,
    		x=195, y=195,
    		radius=100,
    		thickness=20,
    		start_angle=0,
    		end_angle=360
    	},
    	{
    		name='battery_percent',
    		arg='BAT1',
    		max=100,
    		bg_colour=0xFF0000,
    		bg_alpha=0.4,
    		fg_colour=0x016BFF,
    		fg_alpha=1,
    		x=195, y=195,
    		radius=120,
    		thickness=10,
    		start_angle=0,
    		end_angle=360
    	},
    	{
    		name='wireless_link_qual_perc',
    		arg='wlan0',
    		max=100,
    		bg_colour=0x016BFF,
    		bg_alpha=0.1,
    		fg_colour=0x016BFF,
    		fg_alpha=0.9,
    		x=195, y=195,
    		radius=80,
    		thickness=12.5,
    		start_angle=0,
    		end_angle=360
    	},
    	{
    		name='time',
    		arg='%I',
    		max=12,
    		bg_colour=0xFFFFFF,
    		bg_alpha=0.1,
    		fg_colour=0xFFFFFF,
    		fg_alpha=0.9,
    		x=195, y=195,
    		radius=28,
    		thickness=3.5,
    		start_angle=0,
        		end_angle=360
    	},
    	{
    		name='time',
    		arg='%M',
    		max=60,
    		bg_colour=0xFFFFFF,
    		bg_alpha=0.1,
    		fg_colour=0xFFFFFF,
    		fg_alpha=0.95,
    		x=195, y=195,
    		radius=33,
    		thickness=3.5,
    		start_angle=0,
        		end_angle=360
    	},
    	{
    		name='time',
    		arg='%S',
    		max=60,
    		bg_colour=0xFFFFFF,
    		bg_alpha=0.1,
    		fg_colour=0xFFFFFF,
    		fg_alpha=1.0,
    		x=195, y=195,
    		radius=13.5,
    		thickness=23,
    		start_angle=0,
    		end_angle=360
    	},
    }
    
    -- Use these settings to define the origin and extent of your clock.
    
    clock_r=125
    
    -- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.
    
    clock_x=195	
    clock_y=195
    
    show_seconds=true
    
    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 draw_clock_hands(cr,xc,yc)
    	local secs,mins,hours,secs_arc,mins_arc,hours_arc
    	local xh,yh,xm,ym,xs,ys
    	
    	secs=os.date("%S")	
    	mins=os.date("%M")
    	hours=os.date("%I")
    		
    	secs_arc=(2*math.pi/60)*secs
    	mins_arc=(2*math.pi/60)*mins+secs_arc/60
    	hours_arc=(2*math.pi/12)*hours+mins_arc/12
    		
    	-- Draw hour hand
    	
    	xh=xc+0.7*clock_r*math.sin(hours_arc)
    	yh=yc-0.7*clock_r*math.cos(hours_arc)
    	cairo_move_to(cr,xc,yc)
    	cairo_line_to(cr,xh,yh)
    	
    	cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
    	cairo_set_line_width(cr,5)
    	cairo_set_source_rgba(cr,1,1,1,0.8)
    	cairo_stroke(cr)
    	
    	-- Draw minute hand
    	
    	xm=xc+clock_r*math.sin(mins_arc)
    	ym=yc-clock_r*math.cos(mins_arc)
    	cairo_move_to(cr,xc,yc)
    	cairo_line_to(cr,xm,ym)
    	
    	cairo_set_line_width(cr,3)
    	cairo_stroke(cr)
    	
    	-- Draw seconds hand
    	
    	if show_seconds then
    		xs=xc+clock_r*math.sin(secs_arc)
    		ys=yc-clock_r*math.cos(secs_arc)
    		cairo_move_to(cr,xc,yc)
    		cairo_line_to(cr,xs,ys)
    	
    		cairo_set_line_width(cr,1)
    		cairo_stroke(cr)
    	end
    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
    	
    	draw_clock_hands(cr,clock_x,clock_y)
    end
    this is the code that calls this script

    Code:
    alignment top_left
    background no
    border_inner_margin 0
    border_outer_margin 0
    cpu_avg_samples 2
    default_color 94959C
    default_outline_color 94959C
    default_shade_color 94959C
    double_buffer yes
    draw_borders no
    draw_graph_borders no
    draw_outline no
    draw_shades no
    gap_x 330
    gap_y 30
    maximum_width 500
    max_port_monitor_connections 64
    max_specials 512
    max_user_text 16384
    minimum_size 400 400
    net_avg_samples 2
    no_buffers yes
    out_to_console no
    own_window_colour black
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    own_window_transparent yes
    own_window_type normal
    own_window yes
    update_interval 0.4
    uppercase no
    use_spacer none
    use_xft yes
    xftalpha 0.8
    xftfont  Purisa:size=7
    
    # -- Lua Load -- #
    lua_load ~/scripts/clock_rings.lua
    lua_draw_hook_pre clock_rings
    
    TEXT
    ${color ffffff}${offset 263}${voffset 150}${font Purisa:size=28}${time %H:%M}${font Purisa:size=16}${time :%S}
    ${font Purisa:size=8}${color ffffff}${offset 234}${voffset 32}.Wireless
    ${offset 242}.Used Space
    ${offset 250}.Battery
    ${offset 258}.CPU
    ${offset 266}.Memory
    the only issue I have now is a really bad flicker, it may be something to do with Compiz, but i just don't know.
    I'll never drink water again....Fish poo in it!
    XP for iTunes Only : Ubuntu10.04 : Crunchbang : DSL
    I'm Pushing Narcoleptic Numbat for ubuntu11.04
    Proper Funny Stuff

  9. #9499
    Join Date
    Nov 2008
    Location
    Wirral, UK
    Beans
    277
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    the flicker issue seems to have stopped after I changed to metacity and back to compiz.

    this is the final screenshot

    THANKS LONDONALI1010, you're a gem!!!
    Attached Images Attached Images
    I'll never drink water again....Fish poo in it!
    XP for iTunes Only : Ubuntu10.04 : Crunchbang : DSL
    I'm Pushing Narcoleptic Numbat for ubuntu11.04
    Proper Funny Stuff

  10. #9500
    Join Date
    Oct 2005
    Beans
    80

    Re: Post your .conkyrc files w/ screenshots

    Any advise the coverConky doesn't show the cover and the position is not good?

    Here my conky:
    Code:
    use_xft yes
    xftfont Liberation Sans:size=8
    override_utf8_locale yes
    
    text_buffer_size 2048
    update_interval 1
    total_run_times 0
    double_buffer yes
    no_buffers yes
    net_avg_samples 1
    cpu_avg_samples 1
    
    own_window_class Conky
    own_window yes
    own_window_type override
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    
    default_color 2B2B2B
    draw_shades no
    
    color0 1E1C1A
    color1 E07A1F
    color2 1E1C1A
    
    alignment bottom_right
    gap_x 25
    gap_y 40
    minimum_size 182 0
    maximum_width 182
    
    imlib_cache_size 0
    
    TEXT
    ${font Liberation Sans:style=Bold:size=8}SYSTEM $stippled_hr${font}
    ${color0}${voffset 6}${font OpenLogos:size=19}u${font}${color}${goto 32}${voffset -14}Kernel:  ${alignr}${color2}${kernel}${color}
    ${goto 32}Uptime: ${alignr}${color2}${uptime}${color}
    ${offset 1}${color0}${font Poky:size=16}P${font}${offset -19}${voffset 9}${cpubar cpu0 4,18}${color}${voffset -15}${voffset -1}${goto 32}CPU1: ${font Liberation Sans:style=Bold:size=8}${color1}${cpu cpu1}%${color}${font} ${alignr}${color2}${cpugraph cpu1 8,60 CE5C00 E07A1F}${color}
    ${color0}${font Poky:size=16}M${font}${color}${goto 32}${voffset -7}RAM: ${font Liberation Sans:style=Bold:size=8}${color1}$memperc%${color}${font}
    ${offset 1}${voffset 2}${color2}${membar 4,18}${color}${goto 32}${voffset -2}F: ${color2}${memeasyfree}${color} U: ${color2}${mem}${color}
    ${voffset 2}${color0}${font Poky:size=15}a${font}${color}${goto 32}${voffset -10}Processes: ${color2}${alignr 13}CPU${alignr}RAM${color}
    ${voffset -1}${goto 42}${color2}${top name 1}${color}${font Liberation Sans:style=Bold:size=8}${color1} ${goto 124}${top cpu 1}${alignr }${top mem 1}${color}${font}
    ${voffset -1}${goto 42}${color2}${top name 2}${color}${font Liberation Sans:style=Bold:size=8}${color1} ${goto 124}${top cpu 2}${alignr }${top mem 2}${color}${font}
    ${voffset -1}${goto 42}${color2}${top name 3}${color}${font Liberation Sans:style=Bold:size=8}${color1} ${goto 124}${top cpu 3}${alignr }${top mem 3}${color}${font}
    ${voffset 4}${font Liberation Sans:style=Bold:size=8}DATE $stippled_hr${font}
    ${voffset -12}${goto 28}${font Arial Black:size=38}${color2}${time %H}${color}${font}${voffset -28}${font Liberation Sans:style=Bold:size=11}${color2}${time :%M}${time :%S}${color}${font}
    ${voffset -3}${goto 100}${font Liberation Sans:style=Bold:size=8}${color2}${time %A}${color}${font}
    ${voffset -1}${goto 100}${time %d %B %Y}
    ${voffset 2}${color0}${font Poky:size=15}d${font}${color}${voffset -6}${font Liberation Mono:size=8}${execpi 10800 DJS=`date +%_d`; cal | sed 's/^/${alignc} /' | sed s/" $DJS "/" "'${font Liberation Mono:style=bold:size=8}${color1}'"$DJS"'${color}${font}${font Liberation Mono:size=8}'" "/}${font}${font}${voffset -14}
    ${voffset -2}${font Liberation Sans:style=Bold:size=8}PHOTO $stippled_hr${font}
    ${execi 10800 ~/.conky/conkyPhoto.sh}${image /tmp/conkyPhoto.png -s 150x150 -p 20,330}${voffset 142}
    ${voffset 4}${font Liberation Sans:style=Bold:size=8}RHYTHMBOX $stippled_hr${font}
    ${execi 10 ~/.conky/conkyCover.sh}${execpi 10 ~/.conky/conkyRhythmbox.py -t ~/.conky/conkyPlayer.template}
    ${voffset 4}${font Liberation Sans:style=Bold:size=8}WEATHER $stippled_hr${font}
    ${if_existing /proc/net/route wlan0}
    ${execpi 10800 ~/.conky/conkyForecast.py --location=CAXX0243 -t ~/.conky/conkyForecast.template}
    ${else}${if_existing /proc/net/route eth0}
    ${execpi 10800 ~/.conky/conkyForecast.py --location=CAXX0243 -t ~/.conky/conkyForecast.template}
    ${endif}${else}${if_existing /proc/net/route ppp0}
    ${execpi 10800 ~/.conky/conkyForecast.py --location=CAXX0243 -t ~/.conky/conkyForecast.template}
    ${endif}${else}${voffset 4}${color0}${font PizzaDude Bullets:size=12}4${font}${color}${goto 32}Weather Unavailable${endif}${endif}
    Attached Images Attached Images

Page 950 of 2299 FirstFirst ... 4508509009409489499509519529601000105014501950 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •