Page 1797 of 2327 FirstFirst ... 7971297169717471787179517961797179817991807184718972297 ... LastLast
Results 17,961 to 17,970 of 23265

Thread: Post your .conkyrc files w/ screenshots

  1. #17961
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    @ Icche Ghuri

    try this instead
    might need to change the exec to execp but see how it goes
    Code:
    --[[TEXT WIDGET v1.42 by Wlourf 07 Feb. 2011
    modified for use with conkyForecast, mrpeachy
    
    
    require 'cairo'
    
    function conky_draw_text()    
    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 updates=tonumber(conky_parse("${updates}"))
    if updates<3 then return end
    
    
    interval=1800
    timer=(updates % interval)+1
    if timer==1 or updates==4 then
    ccg=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=WF}")
    cc=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=CC}")
    ccht=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=HT}")
    sr=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=SR}")
    ss=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=SS}")
    mpg=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=MP}")
    mp=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=MP}")
    day1=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=DW --startday=1 --shortweekday}")
    day1g=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=WF --startday=1}")
    day1ht=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=HT --startday=1 --hideunits --centeredwidth=3}")
    day1lt=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=LT --startday=1 --hideunits --centeredwidth=3}")
    day2=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=DW --startday=2 --shortweekday}")
    day2g=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=WF --startday=2}")
    day2ht=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=HT --startday=2 --hideunits --centeredwidth=3}")
    day2lt=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=LT --startday=2 --hideunits --centeredwidth=3}")
    day3=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=DW --startday=3 --shortweekday}")
    day3g=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=WF --startday=3}")
    day3ht=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=HT --startday=3 --hideunits --centeredwidth=3}")
    day3lt=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=LT --startday=3 --hideunits --centeredwidth=3}")
    ud=conky_parse("${exec conkyForecast --location=BGXX0003 --datatype=LF}")
    end
        local text_settings={
    --Heading
             {
            text="Weather",
            x=0,
            y=25,
            font_name="Blade 2",
            font_size="40",
            colour={
                    {0.8,0xF0FFF0,1},
                    {1.00,0xF0F0FF,0.1},
                    },
               h_align="l",
               radial={0,300,0,0,300,370}
            }, --heading ends
    --current condition: graphic
            {
            text=ccg,
            x=15,
            y=71,
            font_name="ConkyWeather",
            font_size=38,
            colour={{1,0x00FF00,0.8}}
            },--current condition: graphic
    
    --current condition
            {
            text=cc,
            x=60,
            y=45,
            font_name="santana",
            font_size=16,
            colour={{1,0x00FF00,0.8}}
            },--current condition ends
    
    --current condition: Highest Temperature
            {
            text=ccht,
            x=60,
            y=67,
            font_name="santana",
            font_size=16,
            colour={{1,0x00FF00,0.8}}
            },--current condition: Highest Temperature ends
    
    --Sunrise
            {
            text="Sunrise: " .. sr,
            x=173,
            y=42,
            font_name="santana",
            font_size=12,
            colour={{1,0x00FF00,0.8}}
            },--sunrise ends
    
    --Sunset
            {
            text="Sunset: " .. ss,
            x=173,
            y=58,
            font_name="santana",
            font_size=12,
            colour={{1,0x00FF00,0.8}}
            },--sunset ends
    
    --Moon Phase:graphic
            {
            text=mpg,
            x=15,
            y=127,
            font_name="Moon Phases",
            font_size=47,
            colour={{1,0x00FF00,0.8}}
            },--Moon Phase:graphic ends
    
    --Moon Phase
            {
            text=mp,
            x=70,
            y=106,
            font_name="santana",
            font_size=13,
            colour={{1,0x00FF00,0.8}}
            },--Moon Phase ends
    
    --Next 3 days forecast:1st Day
    --week Day
            {
            text=day1,
            x=132,
            y=77,
            font_name="santana",
            font_size=12,
            colour={{1,0x00FF00,0.8}}
            },--week Day ends
    
    --weather forecast:graphic
            {
            text=day1g,
            x=125,
            y=119,
            font_name="ConkyWeather",
            font_size=38,
            colour={{1,0x00FF00,0.8}}
            },--weather forecast:graphic ends
    
    --highest temperature
            {
            text=day1ht,
            x=130,
            y=130,
            font_name="santana",
            font_size=12,
            colour={{1,0x00FF00,0.8}}
            },--highest temperature ends
    
    --lowest temperature
            {
            text="/" .. day1lt,
            x=145,
            y=130,
            font_name="santana",
            font_size=12,
            colour={{1,0x00FF00,0.8}}
            },--lowest temperature ends
    --Next 3 days forecast:1st Day ends
    
    --Next 3 days forecast:2nd Day
    --week Day
            {
            text=day2,
            x=180,
            y=77,
            font_name="santana",
            font_size=12,
            colour={{1,0x00FF00,0.8}}
            },--week Day ends
    
    --weather forecast:graphic
            {
            text=day2g,
            x=173,
            y=119,
            font_name="ConkyWeather",
            font_size=38,
            colour={{1,0x00FF00,0.8}}
            },--weather forecast:graphic ends
    
    --highest temperature
            {
            text=day2ht,
            x=178,
            y=130,
            font_name="santana",
            font_size=12,
            colour={{1,0x00FF00,0.8}}
            },--highest temperature ends
    
    --lowest temperature
            {
            text="/" .. day2lt,
            x=193,
            y=130,
            font_name="santana",
            font_size=12,
            colour={{1,0x00FF00,0.8}}
            },--lowest temperature ends
    --Next 3 days forecast:2nd Day ends  
    
    --Next 3 days forecast:3rd Day
    --week Day
            {
            text=day3,
            x=227,
            y=77,
            font_name="santana",
            font_size=12,
            colour={{1,0x00FF00,0.8}}
            },--week Day ends
    
    --weather forecast:graphic
            {
            text=day3g,
            x=220,
            y=119,
            font_name="ConkyWeather",
            font_size=38,
            colour={{1,0x00FF00,0.8}}
            },--weather forecast:graphic ends
    
    --highest temperature
            {
            text=day3ht,
            x=227,
            y=130,
            font_name="santana",
            font_size=12,
            colour={{1,0x00FF00,0.8}}
            },--highest temperature ends
    
    --lowest temperature
            {
            text="/" .. day3lt,
            x=242,
            y=130,
            font_name="santana",
            font_size=12,
            colour={{1,0x00FF00,0.8}}
            },--lowest temperature ends
    --Next 3 days forecast:3rd Day ends  
    
    --update time
            {
            text="Wheather Info Updated  @  " .. ud,
            x=55,
            y=145,
            font_name="santana",
            font_size=10,
            colour={{1,0x00FF00,0.8}}
            },--update time ends
    
        }
        
        
    --------------END OF PARAMETERS----------------
    
        for i,v in pairs(text_settings) do    
            cr = cairo_create (cs)
            display_text(v)
            cairo_destroy(cr)
            cr = nil
        end
        
        cairo_surface_destroy(cs)
    
    end
    
    function rgb_to_r_g_b2(tcolour)
        local colour,alpha=tcolour[2],tcolour[3]
        return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end
    
    function display_text(t)
        if t.draw_me==true then t.draw_me = nil end
        if t.draw_me~=nil and conky_parse(tostring(t.draw_me)) ~= "1" then return end
        local function set_pattern(te)
            --this function set the pattern
            if #t.colour==1 then 
                cairo_set_source_rgba(cr,rgb_to_r_g_b2(t.colour[1]))
            else
                local pat
                
                if t.radial==nil then
                    local pts=linear_orientation(t,te)
                    pat = cairo_pattern_create_linear (pts[1],pts[2],pts[3],pts[4])
                else
                    pat = cairo_pattern_create_radial (t.radial[1],t.radial[2],t.radial[3],t.radial[4],t.radial[5],t.radial[6])
                end
            
                for i=1, #t.colour do
                    cairo_pattern_add_color_stop_rgba (pat, t.colour[i][1], rgb_to_r_g_b2(t.colour[i]))
                end
                cairo_set_source (cr, pat)
                cairo_pattern_destroy(pat)
            end
        end
        
        --set default values if needed
        if t.text==nil then t.text="Conky is good for you !" end
        if t.x==nil then t.x = conky_window.width/2 end
        if t.y==nil then t.y = conky_window.height/2 end
        if t.colour==nil then t.colour={{1,0xFFFFFF,1}} end
        if t.font_name==nil then t.font_name="Free Sans" end
        if t.font_size==nil then t.font_size=14 end
        if t.angle==nil then t.angle=0 end
        if t.italic==nil then t.italic=false end
        if t.oblique==nil then t.oblique=false end
        if t.bold==nil then t.bold=false end
        if t.radial ~= nil then
            if #t.radial~=6 then 
                print ("error in radial table")
                t.radial=nil 
            end
        end
        if t.orientation==nil then t.orientation="ww" end
        if t.h_align==nil then t.h_align="l" end
        if t.v_align==nil then t.v_align="b" end    
        if t.reflection_alpha == nil then t.reflection_alpha=0 end
        if t.reflection_length == nil then t.reflection_length=1 end
        if t.reflection_scale == nil then t.reflection_scale=1 end
        if t.skew_x==nil then t.skew_x=0 end
        if t.skew_y==nil then t.skew_y=0 end    
        cairo_translate(cr,t.x,t.y)
        cairo_rotate(cr,t.angle*math.pi/180)
        cairo_save(cr)       
         
        local slant = CAIRO_FONT_SLANT_NORMAL
        local weight = CAIRO_FONT_WEIGHT_NORMAL
        if t.italic then slant = CAIRO_FONT_SLANT_ITALIC end
        if t.oblique then slant = CAIRO_FONT_SLANT_OBLIQUE end
        if t.bold then weight = CAIRO_FONT_WEIGHT_BOLD end
        
        cairo_select_font_face(cr, t.font_name, slant,weight)
     
        for i=1, #t.colour do    
            if #t.colour[i]~=3 then 
                print ("error in color table")
                t.colour[i]={1,0xFFFFFF,1} 
            end
        end
    
        local matrix0 = cairo_matrix_t:create()
        tolua.takeownership(matrix0) 
        local skew_x,skew_y=t.skew_x/t.font_size,t.skew_y/t.font_size
        cairo_matrix_init (matrix0, 1,skew_y,skew_x,1,0,0)
        cairo_transform(cr,matrix0)
        cairo_set_font_size(cr,t.font_size)
        local te=cairo_text_extents_t:create()
        tolua.takeownership(te) 
        t.text=conky_parse(t.text)
        cairo_text_extents (cr,t.text,te)
        set_pattern(te)
                
        local mx,my=0,0
        
        if t.h_align=="c" then
            mx=-te.width/2-te.x_bearing
        elseif t.h_align=="r" then
            mx=-te.width
        end
        if t.v_align=="m" then
            my=-te.height/2-te.y_bearing
        elseif t.v_align=="t" then
            my=-te.y_bearing
        end
        cairo_move_to(cr,mx,my)
        
        cairo_show_text(cr,t.text)
    
         
            
            
       if t.reflection_alpha ~= 0 then 
            local matrix1 = cairo_matrix_t:create()
            tolua.takeownership(matrix1)         
            cairo_set_font_size(cr,t.font_size)
    
            cairo_matrix_init (matrix1,1,0,0,-1*t.reflection_scale,0,(te.height+te.y_bearing+my)*(1+t.reflection_scale))
            cairo_set_font_size(cr,t.font_size)
            te=nil
            local te=cairo_text_extents_t:create()
            tolua.takeownership(te) 
            cairo_text_extents (cr,t.text,te)
            
                    
            cairo_transform(cr,matrix1)
            set_pattern(te)
            cairo_move_to(cr,mx,my)
            cairo_show_text(cr,t.text)
    
            local pat2 = cairo_pattern_create_linear (0,
                                            (te.y_bearing+te.height+my),
                                            0,
                                            te.y_bearing+my)
            cairo_pattern_add_color_stop_rgba (pat2, 0,1,0,0,1-t.reflection_alpha)
            cairo_pattern_add_color_stop_rgba (pat2, t.reflection_length,0,0,0,1)    
            
            --line is not drawn but with a size of zero, the mask won't be nice
            cairo_set_line_width(cr,1)
            local dy=te.x_bearing
            if dy<0 then dy=dy*(-1) end
            cairo_rectangle(cr,mx+te.x_bearing,te.y_bearing+te.height+my,te.width+dy,-te.height*1.05)
            cairo_clip_preserve(cr)
            cairo_set_operator(cr,CAIRO_OPERATOR_CLEAR)
            --cairo_stroke(cr)
            cairo_mask(cr,pat2)
            cairo_pattern_destroy(pat2)
            cairo_set_operator(cr,CAIRO_OPERATOR_OVER)
            te=nil
        end
        
    end
    
    
    function linear_orientation(t,te)
        local w,h=te.width,te.height
        local xb,yb=te.x_bearing,te.y_bearing
        
        if t.h_align=="c" then
            xb=xb-w/2
        elseif t.h_align=="r" then
            xb=xb-w
           end    
        if t.v_align=="m" then
            yb=-h/2
        elseif t.v_align=="t" then
            yb=0
           end    
        local p=0
        if t.orientation=="nn" then
            p={xb+w/2,yb,xb+w/2,yb+h}
        elseif t.orientation=="ne" then
            p={xb+w,yb,xb,yb+h}
        elseif t.orientation=="ww" then
            p={xb,h/2,xb+w,h/2}
        elseif vorientation=="se" then
            p={xb+w,yb+h,xb,yb}
        elseif t.orientation=="ss" then
            p={xb+w/2,yb+h,xb+w/2,yb}
        elseif t.orientation=="ee" then
            p={xb+w,h/2,xb,h/2}        
        elseif t.orientation=="sw" then
            p={xb,yb+h,xb+w,yb}
        elseif t.orientation=="nw" then
            p={xb,yb,xb+w,yb+h}
        end
        return p
    end
    you may get this error in a terminal but it isnt a problem at all
    Code:
    Conky: llua_do_call: function conky_draw_text execution failed: /home/mcdowall/lua/wtestlua.lua:80: attempt to concatenate global 'sr' (a nil value)
    note, it might be a good idea to call conkyForecast directly using lines like this
    Code:
    local f = io.popen("conkyForecast --location=BGXX0003 --datatype=WF")
    cc= f:read("*a")
    f:close()
    instead of going through conky
    Last edited by mrpeachy; June 3rd, 2011 at 08:31 PM.

  2. #17962
    Join Date
    Dec 2010
    Location
    Estonia
    Beans
    101
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Post your .conkyrc files w/ screenshots

    Any tips how to get top CPU clients aligned to right (would like to solve it without using offset)

    Code:
    ##################################
    ##         TOP PROCESSES        ##
    ##################################
    ${voffset 8}${font DroidSans:bold:size=8}${color4}TOP PROCESSES${offset 8}${color8}${voffset -2}${hr 2}${font}
    ${font DroidSans:size=9}${color3}${offset 12}CPU usage${alignr}CPU%
    ${voffset 4}${font StyleBats:size=10}${color2}h${voffset -3}${font DroidSans:size=8.3}${color3}${offset 5}${top name 1}${alignr}${top cpu 1}      
    ${voffset 4}${font StyleBats:size=10}${color2}h${voffset -3}${font DroidSans:size=8.3}${color3}${offset 5}${top name 2}${alignr}${top cpu 2}      
    ${voffset 4}${font StyleBats:size=10}${color2}h${voffset -3}${font DroidSans:size=8.3}${color3}${offset 5}${top name 3}${alignr}${top cpu 3}      
    
    ${font DroidSans:size=9}${color3}${offset 12}Memory usage${alignr}MEM%
    ${voffset 4}${font StyleBats:size=10}${color2}h${voffset -3}${font DroidSans:size=8.3}${color3}${offset 5}${top_mem name 1}${alignr}${top_mem mem 1}
    ${voffset 4}${font StyleBats:size=10}${color2}h${voffset -3}${font DroidSans:size=8.3}${color3}${offset 5}${top_mem name 2}${alignr}${top_mem mem 2}
    ${voffset 4}${font StyleBats:size=10}${color2}h${voffset -3}${font DroidSans:size=8.3}${color3}${offset 5}${top_mem name 3}${alignr}${top_mem mem 3}

  3. #17963
    Join Date
    Jun 2005
    Location
    Buenavista, ADN, Phils
    Beans
    285

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by kaivalagi View Post
    As mentioned, N/A comes for current "forecasts", not to be confused with current "weather". It is normally after 2pm when the high temp for the day is N/A, which makes sense as the how can we really have a forecast for the same day at 2pm anyway...it's not a forecast then is it ALthough as you've mentioned you'd expect the same with LT too!

    For clarity this is what brings "N/A" after 2pm:

    Code:
    conkyForecast -d HT -s 0
    or

    Code:
    conkyForecast --datatype=HT --startday=0
    What makes most sense is requesting the current high temp (really actual temp) for today rather than a forecast, like so:

    Code:
    conkyForecast -d HT
    or

    Code:
    conkyForecast --datatype=HT
    edit: I did think I had sorted the N/A issue though with the below, using the --night switch automatically but it looks like something ain't playing ball anymore...maybe we now need to display current conditions and not forecast for startday = 0 after 2pm and have an AUTO_HIGHTEMP_FIX instead of a AUTO_NIGHT config

    Code:
                    # if AUTO_NIGHT config is true then handle N/A output, by using the night option between 2pm and 2am, when the startday = 0. 
                    if self.config.AUTO_NIGHT == True and daynumber == 0:
                        now = datetime.now()
                        hour = now.hour
                        if hour > 13 or hour < 2:
                            night = True
    Good info. I prob could just put a IF statement in to forecast the expected HT until 2pm then have it forecast the current.

    But one thing to consider tho is that Temps can continue to climb here up until 4:30 or 5pm easy. So at 2pm we still havent hit our high temp yet.
    Its 6pm here right now and Current Temp is 93F and its still two months unitl August which is our hottest temp.
    Now During the Winter months, I think 2pm is dead on.
    It may be something to consider doing it on a seasonal basis, but then would would need a flag option added for our friends on the Southern Hemisphere.

    Let me knock out some of my college homework this weekend and I will take a look at it and see what I can do.

    Cheers,
    Exo
    Mac Mini: OSX 10.9 Mavericks, i7-3720QM 2.6Ghz, 16GB RAM, 1.25TB Fusion Array, Intel HD4000 iGPU
    Photo Blog on Youtube: www.youtube.com/user/ExodistPhotoBlog
    Linux User: 380654

  4. #17964
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Been using tiling window managers lately; simple one line conky piped through dzen2 for the Scrotwm statusbar.
    Attached Images Attached Images
    Attached Files Attached Files
    The mark of an honest man ... is that he means what he says and knows what he means.
    A.R.

  5. #17965
    Join Date
    Jun 2011
    Beans
    0

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by akernan View Post
    I have a Broadcom wireless card, it doesn't like to play with conky. I use these bash scripts to parse noise, signal, and quality from /proc/net/wireless. I then use a lua script with the bash outputs.
    Can you describe to me in linux newbie terms how to use these scripts?

    I would really appreciate it.

  6. #17966
    Join Date
    Feb 2009
    Beans
    122

    Re: Post your .conkyrc files w/ screenshots

    Here's the latest conky I've been working on. Got the clock dials from mrpeachy, thanks. I'd like to use bg.lua. How can I display the images above the bg instead of underneath? I've included pictures to help explain.
    Attached Images Attached Images

  7. #17967
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by akernan View Post
    Here's the latest conky I've been working on. Got the clock dials from mrpeachy, thanks. I'd like to use bg.lua. How can I display the images above the bg instead of underneath? I've included pictures to help explain.
    yes...
    see here
    http://ubuntuforums.org/showpost.php...ostcount=17757

    try that method out

    make sure
    Code:
    ${lua conky_draw_bg}
    comes first
    Last edited by mrpeachy; June 4th, 2011 at 01:32 AM.

  8. #17968
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    modified background script and weather images


    lua script for drawing background
    no setting are entered here, settings are entered in conkyrc
    Code:
    --[[Background originally by londonali1010 (2009)
        ability to set any size for background mrpeachy 2011
        ability to set variables for bg in conkyrc dk75
    ]]
    
    require 'cairo'
    local    cs, cr = nil
    function rgb_to_r_g_b(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end
    function conky_draw_bg(r,x,y,w,h,color,alpha)
    if conky_window == nil then return end
    if cs == nil then cairo_surface_destroy(cs) end
    if cr == nil then cairo_destroy(cr) 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)
    cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
    --top left mid circle
    local xtl=x+r
    local ytl=y+r
    --top right mid circle
    local xtr=(x+r)+((w)-(2*r))
    local ytr=y+r
    --bottom right mid circle
    local xbr=(x+r)+((w)-(2*r))
    local ybr=(y+r)+((h)-(2*r))
    --bottom right mid circle
    local xbl=(x+r)
    local ybl=(y+r)+((h)-(2*r))
    -----------------------------
    cairo_move_to (cr,xtl,ytl-r)
    cairo_line_to (cr,xtr,ytr-r)
    cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
    cairo_line_to (cr,xbr+r,ybr)
    cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
    cairo_line_to (cr,xbl,ybl+r)
    cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
    cairo_line_to (cr,xtl-r,ytl)
    cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
    cairo_close_path(cr)
    cairo_fill (cr)
    ------------------------------------------------------------
    cairo_surface_destroy(cs)
    cairo_destroy(cr)
    return ""
    end
    conkyrc, the bits that matter
    Code:
    lua_load ~/lua/background.lua
    
    TEXT
    ${cpu cpu0}
    ${lua conky_draw_bg 10 100 100 100 100 0x000000 0.2}
    ${lua conky_draw_bg 10 200 200 100 100 0x000000 0.2}
    ${lua conky_draw_bg 10 100 300 100 100 0x000000 0.2}
    
    #${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
    
    ${execpi 1800 conkyForecast --template=~/lua/test.template}
    test weather template
    Code:
    ${image [--datatype=WI --startday=1]  -p 100,100 -s 90x90}
    ${image [--datatype=WI --startday=2]  -p 200,200 -s 90x90}
    ${image [--datatype=WI --startday=3]  -p 100,300 -s 90x90}
    ${image [--datatype=WI --startday=4]  -p 200,400 -s 90x90}
    and with some tweaking...

    Code:
    TEXT
    ${lua conky_draw_bg 50 0 0 400 800 0x000000 0.2}
    ${lua conky_draw_bg 20 100 100 100 100 0x000000 0.2}
    ${lua conky_draw_bg 0 200 200 100 100 0xffffff 0.2}
    ${lua conky_draw_bg 50 100 300 100 100 0xff0000 0.2}
    Last edited by mrpeachy; June 4th, 2011 at 03:12 AM.

  9. #17969
    Join Date
    May 2011
    Beans
    0

    Re: Post your .conkyrc files w/ screenshots

    mrpeachy thanks for pointing me in the right direction. after doing some more googling and going to the conky irc channel i was able to edit the files and get to work properly as far as i can tell.


  10. #17970
    Join Date
    Feb 2009
    Beans
    122

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mrpeachy View Post
    yes...
    make sure
    Code:
    ${lua conky_draw_bg}
    comes first
    Thanks. I put this line first in my TEXT area.

    Here's the completed conky.

    conkyrc
    Code:
    ######################
    # - Conky settings - #
    ######################
    
    background yes
    update_interval 1
     
    cpu_avg_samples 2
     
    override_utf8_locale yes
     
    double_buffer yes
    no_buffers yes
     
    text_buffer_size 10240
    #imlib_cache_size 0
    
    gap_x 10
    gap_y 5
    minimum_size 250 900
    #####################
    # - Text settings - #
    #####################
    use_xft yes
    xftfont Santana:size=9:style=bold
    xftalpha 0.8
     
    uppercase no
    
    #############################
    # - Window specifications - #
    #############################
    own_window yes
    own_window_type override
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    
    border_inner_margin 0
    border_outer_margin 0
    
    #########################
    # - Graphics settings - #
    #########################
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders no
    
    temperature_unit fahrenheit
    
    default_color ffffff
    
    # Text alignment, other possible values are commented
    #alignment middle_left
    #alignment middle_middle
    #alignment middle_right
    #alignment top_middle
    #alignment top_left
    alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    #alignment bottom_middle
    
    ####
    ## Load Lua for bargraphs (required)
    ## Set the path to your script here.
    #
    lua_load ~/.conky/new/bg.lua
    #lua_draw_hook_pre draw_bg 
    
    lua_load ~/.conky/new/clock-dials.lua 
    lua_draw_hook_post draw_fig           
    
    TEXT
    ${lua conky_draw_bg}
    #
    #System info
    #
    ${image /usr/share/icons/hicolor/48x48/mimetypes/application-x-mint.png -p 13,0}
    ${voffset -30}${goto 60} ${nodename}
    ${goto 60} ${sysname} ${kernel} on ${machine}
    ${goto 60} ${uptime}
    #
    #Processor info
    #
    ${image /usr/share/hardinfo/pixmaps/processor.png -p 13,190 -s 48x48}
    ${voffset 105}${goto 60}${freq}MHz   Load: ${color #88ECE0}${loadavg}${color}
    ${goto 60}Core 1 Usage:${color} ${color #DFEC88}${cpu cpu1}% ${color} ${cpubar cpu1}
    ${goto 60}Core 2 Usage:${color} ${color #DFEC88}${cpu cpu2}% ${color} ${cpubar cpu2}
    ${goto 60}Core 3 Usage:${color} ${color #DFEC88}${cpu cpu3}% ${color} ${cpubar cpu3}
    ${goto 60}Core 4 Usage:${color} ${color #DFEC88}${cpu cpu4}% ${color} ${cpubar cpu4}
    ${goto 60}CPU Temp: ${color #88ECE0}${acpitemp}° F${color}
    #
    #Memory info
    #
    ${image /usr/share/hardinfo/pixmaps/memory.png -p 13,260 -s 48x48}
    ${goto 60}RAM:   ${memperc}% ${membar} 
    ${goto 60}Swap:  ${swapperc}%   ${swapbar} 
    #
    #Disk info
    #
    ${image /usr/share/hardinfo/pixmaps/hdd.png -p 10,330 -s 48x48}
    ${goto 60}Root:   ${fs_size /} ${alignr}${fs_free /} free
    ${goto 60}Home:  ${fs_size /home} ${alignr}${fs_free /home} free
    ${goto 60}${if_existing /media/Linux}Linux:  ${fs_size /media/Linux} ${alignr}${fs_free /media/Linux} free${else}Linux:  Not Mounted${endif}
    ${goto 60}${if_existing /media/Stuff}Stuff:  ${fs_size /media/Stuff} ${alignr}${fs_free /media/Stuff} free${else}Stuff:   Not mounted${endif}
    ${goto 60}Disk temp: ${color #88ECE0}${exec hddtemp -u f /dev/sda | cut -c 35-40}${color}
    #
    #Network info
    #
    ${image /usr/share/hardinfo/pixmaps/network.png -p 5,415 -s 36x36}
    ${image /usr/share/hardinfo/pixmaps/wireless.png -p 20,435 -s 36x36}
    ${if_up wlan0}${voffset -20}${goto 60}${font style=bold}D-Link Wireless${font}
    ${goto 60}Internal IP: ${addr wlan0}
    ${goto 60}External IP: ${exec wget -q -O - checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'}
    ${goto 60}${downspeedgraph wlan0 25,100 110000 520000 -t} ${upspeedgraph wlan0 25,100 001100 005200 -t}
    ${voffset -40}${goto 60}Down ${downspeedf wlan0}${alignr}Total Dn ${totaldown wlan0}
    ${goto 60}UP       ${upspeedf wlan0}${alignr}Total UP ${totalup wlan0}
    #
    ${else}${if_up eth0}${voffset -20}${goto 60}${font style=bold}Ethernet${font}
    ${goto 60}Internal IP: ${addr eth0}
    ${goto 60}External IP: ${exec wget -q -O - checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'}
    ${goto 60}${downspeedgraph eth0 25,100 110000 520000 -t} ${upspeedgraph eth0 25,100 001100 005200 -t}
    ${voffset -40}${goto 60}Down ${downspeedf eth0}${alignr}Total Dn ${totaldown eth0}
    ${goto 60}UP       ${upspeedf eth0}${alignr}Total UP ${totalup eth0}${endif}${endif}
    #
    #Weather info
    #
    ${execpi 1800 conkyForecast -i --template=~/.conky/new/conkyForecast.template}
    bg.lua
    Code:
    --[[	Background by londonali1010 (2009)
    	VinDSL Background Hack (2010-2011)
    
    This script draws a background to the Conky window. It covers the whole of the Conky window, but you can specify rounded corners, if you wish.
    
    To call this script in Conky, use (assuming you have saved this script to ~/scripts/):
    	lua_load ~/scripts/draw_bg.lua
    	lua_draw_hook_pre draw_bg
    
    Changelog:
    	+ v3.0	VinDSL Hack (01.28.2011) Killed memory leak.
    	+ v2.4	VinDSL Hack (01.25.2011) Declared all variables in local.
    	+ v2.3	VinDSL Hack (12.31.2010) Added shading example(s).
    	+ v2.2	VinDSL Hack (12.30.2010) Cleaned up the code a bit.
    	+ v2.1	VinDSL Hack (12.24.2010) Added cairo destroy function(s).
    	+ v2.0	VinDSL Hack (12.21.2010) Added height adjustment variable.
    	+ v1.0	Original release (07.10.2009)
    
    ]]
    
    --------------START OF PARAMETERS ------------
    
    -- Change these settings to affect your background:
    
    -- "corner_r" is the radius, in pixels, of the rounded corners. If you don't want rounded corners, use 0.
    
    	local corner_r = 50
    
    -- Set the colour and transparency (alpha) of your background (0.00 - 0.99).
    
    --	(Light Shading Example)
    --	local bg_colour = 0x4d4d4d
    --	local bg_alpha = 0.50
    
    --	(Medium Shading Example)
    --	local bg_colour = 0x222222
    --	local bg_alpha = 0.50
    
    --	(Dark Shading Example)
    	local bg_colour = 0x000000
    	local bg_alpha = 0.40
    
    --	local bg_colour = 0x908C80
    --	local bg_alpha = 0.2
    
    -- Tweaks the height of your background, in pixels. If you don't need to adjust the height, use 0.
    
    --	(Default Setting)
    --	local vindsl_hack_height = 0
    
    	local vindsl_hack_height = -185
    
    ---------------END OF PARAMETERS -------------
    
    require 'cairo'
    local	cs, cr = nil
    
    local function rgb_to_r_g_b(colour,alpha)
    	return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    	end
    
    function conky_draw_bg()
    	if conky_window == nil then return end
    	if cs == nil then cairo_surface_destroy(cs) end
    	if cr == nil then cairo_destroy(cr) end
    	local w = conky_window.width
    	local h = conky_window.height
    	local v = vindsl_hack_height
    	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)
    	
    	cairo_move_to(cr,corner_r,0)
    	cairo_line_to(cr,w-corner_r,0)
    	cairo_curve_to(cr,w,0,w,0,w,corner_r)
    	cairo_line_to(cr,w,h+v-corner_r)
    	cairo_curve_to(cr,w,h+v,w,h+v,w-corner_r,h+v)
    	cairo_line_to(cr,corner_r,h+v)
    	cairo_curve_to(cr,0,h+v,0,h+v,0,h+v-corner_r)
    	cairo_line_to(cr,0,corner_r)
    	cairo_curve_to(cr,0,0,0,0,corner_r,0)
    	cairo_close_path(cr)
    
    	cairo_set_source_rgba(cr,rgb_to_r_g_b(bg_colour,bg_alpha))
    	cairo_fill(cr)
    
    	cairo_surface_destroy(cs)
    	cairo_destroy(cr)
    	return ""
    	end
    clock-dials.lua
    Code:
    require 'cairo'
    
    function conky_draw_fig()
    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)
    cr = cairo_create(cs)
    local updates=tonumber(conky_parse('${updates}'))
    if updates>5 then
    --#########################################################################################################
    --#########################################################################################################
    --3 DIAL CLOCK
    --surround border width
    bw=20
    --HOURS------------------
    hrx=25.5 --x position, top left of hour dial
    hry=50.5 --y position top left of hour dial, will be y of all dials
    hrw=60 -- width of hour dial
    hrh=100 -- height of hour dial, will be height of all dials
    -------------------------
    value=tonumber(os.date("%H"))
    label="HRS"
    scale=10
    nfont,nfontsize="White Rabbit",12
    tfont,tfontsize="White Rabbit",12
    orientation="vertical"
    adjust="hours"
    divide=4
    dialgraph2(hrx,hry,hrw,hrh,value,label,scale,nfont,nfontsize,tfont,tfontsize,orientation,adjust,divide)--call function
    --MINUTES----------------
    mrw=60 -- width of minute dial
    -------------------------
    mrx=hrx+hrw+bw
    value=tonumber(os.date("%M"))
    label="MINS"
    scale=10
    nfont,nfontsize="White Rabbit",12
    tfont,tfontsize="White Rabbit",12
    orientation="vertical"
    adjust="minutes"
    divide=5
    dialgraph2(mrx,hry,mrw,hrh,value,label,scale,nfont,nfontsize,tfont,tfontsize,orientation,adjust,divide)--call function
    --SECONDS----------------
    srw=60 -- width of second dial
    -------------------------
    srx=mrx+mrw+bw
    value=tonumber(os.date("%S"))
    label="SECS"
    scale=20
    nfont,nfontsize="White Rabbit",12
    tfont,tfontsize="White Rabbit",12
    orientation="vertical"
    adjust="seconds"
    divide=5
    dialgraph2(srx,hry,srw,hrh,value,label,scale,nfont,nfontsize,tfont,tfontsize,orientation,adjust,divide)--call function
    --surround
    rx=hrx
    ry=hry
    rw=hrw+bw+mrw+bw+srw
    rh=hrh
    tlx=rx-bw
    tly=ry-bw
    trx=rx+rw+bw
    try=ry-bw
    blx=rx-bw
    bly=ry+rh+bw
    brx=rx+rw+bw
    bry=ry+rh+bw
    --background frame white
    local pat = cairo_pattern_create_linear (0,try,0,bly);
    --cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1);
    --cairo_pattern_add_color_stop_rgba (pat, 0, 0.7, 0.7, 0.7, 1);
    cairo_rectangle (cr,rx-bw,ry-bw,rw+(bw*2),rh+(bw*2));
    cairo_new_sub_path (cr); cairo_rectangle (cr,hrx,hry,hrw,hrh);
    cairo_new_sub_path (cr); cairo_rectangle (cr,mrx,hry,mrw,hrh);
    cairo_new_sub_path (cr); cairo_rectangle (cr,srx,hry,srw,hrh);
    cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
    cairo_set_source_rgba (cr,0,0,0,0); cairo_fill_preserve (cr);
    cairo_set_source (cr, pat); cairo_fill (cr);
    cairo_pattern_destroy (pat);
    --titles
    local font="White Rabbit"
    local fsize=14
    cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr,fsize)
    cairo_set_source_rgba (cr,1,1,1,1)
    cairo_move_to (cr,hrx-5,hry+(rh/1.25))
    rot=(math.pi/180)*-90
    cairo_rotate (cr,rot)
    cairo_show_text (cr,"  HOURS")
    cairo_stroke (cr)
    cairo_rotate (cr,-rot)
    cairo_move_to (cr,mrx-5,hry+(rh/1.25))
    cairo_rotate (cr,rot)
    cairo_show_text (cr," MINUTES")
    cairo_stroke (cr)
    cairo_rotate (cr,-rot)
    cairo_move_to (cr,srx-5,hry+(rh/1.25))
    cairo_rotate (cr,rot)
    cairo_show_text (cr," SECONDS")
    cairo_stroke (cr)
    cairo_rotate (cr,-rot)
    --highlight lines
    cairo_set_line_width (cr,1)
    cairo_set_source_rgba (cr,0.5,0.5,0.5,1)
    cairo_move_to (cr,hrx,hry+hrh)
    cairo_rel_line_to (cr,hrw,0)
    cairo_stroke (cr)
    cairo_move_to (cr,mrx,hry+hrh)
    cairo_rel_line_to (cr,mrw,0)
    cairo_stroke (cr)
    cairo_move_to (cr,srx,hry+hrh)
    cairo_rel_line_to (cr,srw,0)
    cairo_stroke (cr)
    ---------------------------------------------
    --#########################################################################################################
    --#########################################################################################################
    end-- if updates>5
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    end-- end main function
    
    ---------------------------------------------------------------------------------
    function dialgraph2(rx,ry,rw,rh,value,label,scale,nfont,nfontsize,tfont,tfontsize,orientation,adjust,divide)
    --black background
    cairo_set_source_rgba (cr,0,0,0,1)
    cairo_rectangle (cr,rx,ry,rw,rh)
    cairo_fill (cr)
    --valuegraph
    local adj=(value % divide)
    local lines=tonumber(scale)
    if orientation=="vertical" then
    gap=rh/lines
    elseif orientation=="horizontal" then
    gap=rw/lines
    end
    cairo_set_line_width (cr,1)
    cairo_set_source_rgba (cr,1,1,1,1)
    local font=nfont
    local fsize=nfontsize
    cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, fsize)
    --calculate line and number positions
    for i=2,lines do
    n=i
    for i=1,lines,divide do
    --print (i)
    if n==(lines/2)+(divide-adj)+i or n==(lines/2)+(divide-adj)+(-i-(divide-2)) then
    if orientation=="vertical" then
    len=-2*(rw/5)
    elseif orientation=="horizontal" then
    len=-2*(rh/5)
    end
    else
    if orientation=="vertical" then
    len=-1*(rw/5)
    elseif orientation=="horizontal" then
    len=-1*(rh/5)
    end
    end
    if n==(lines/2)+(divide-adj)+i then
    num=value-adj+(i+(divide-1))
    if adjust=="seconds" and tonumber(num)>60 then
    num=tonumber(num)-60
    elseif adjust=="minutes" and tonumber(num)>60 then
    num=tonumber(num)-60
    elseif adjust=="hours" and tonumber(num)>24 then
    num=tonumber(num)-24
    end
    elseif n==(lines/2)+(divide-adj)+(-i-(divide-2)) then
    num=value-adj-(i-1)
    if adjust=="seconds" and tonumber(num)<0 then
    num=tonumber(num)+60
    elseif adjust=="minutes" and tonumber(num)<0 then
    num=tonumber(num)+60
    elseif adjust=="hours" and tonumber(num)<0 then
    num=tonumber(num)+24
    end
    else
    num=""
    end
    text=tostring(num)
    extents=cairo_text_extents_t:create()
    cairo_text_extents(cr,text,extents)
    width=extents.width
    height=extents.height
    if orientation=="vertical" then
    --print lines
    cairo_move_to (cr,rx+(rw/2),ry+(gap*(n-1)))
    cairo_rel_line_to (cr,len,0)
    cairo_stroke (cr)
    --print numbers
    cairo_move_to (cr,rx+(rw/2)+2,ry+(gap*(n-1))+(height/2))
    cairo_show_text (cr, num)
    cairo_stroke (cr)
    elseif orientation=="horizontal" then
    --print lines
    cairo_move_to (cr,rx+(gap*(n-1)),ry+(rh/2))
    cairo_rel_line_to (cr,0,len)
    cairo_stroke (cr)
    --print numbers
    cairo_move_to (cr,rx+(gap*(n-1))-(width/2),ry+(rh/2)+(height)+2)
    cairo_show_text (cr, num)
    cairo_stroke (cr)
    end
    end--for
    end--for
    --middle lines
    if orientation=="vertical" then
    cairo_set_source_rgba (cr,1,1,1,0.3)
    cairo_move_to (cr,rx+rw,ry+(rh/2)+2)
    cairo_rel_line_to (cr,-rw,0)
    cairo_stroke (cr)
    cairo_move_to (cr,rx+rw,ry+(rh/2)-2)
    cairo_rel_line_to (cr,-rw,0)
    cairo_stroke (cr)
    elseif orientation=="horizontal" then
    cairo_set_source_rgba (cr,1,1,1,0.3)
    cairo_move_to (cr,rx+(rw/2)+2,ry+rh)
    cairo_rel_line_to (cr,0,-rh)
    cairo_stroke (cr)
    cairo_move_to (cr,rx+(rw/2)-2,ry+rh)
    cairo_rel_line_to (cr,0,-rh)
    cairo_stroke (cr)
    end
    --gradient overlay
    if orientation=="vertical" then
    local pat = cairo_pattern_create_linear (0,ry,0,ry+rh);
    cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1);
    cairo_pattern_add_color_stop_rgba (pat, 0.5, 0, 0, 0, 0);
    cairo_pattern_add_color_stop_rgba (pat, 0, 0, 0, 0, 1);
    cairo_rectangle (cr,rx,ry,rw, rh);
    cairo_set_source (cr, pat);
    cairo_fill (cr);
    cairo_pattern_destroy (pat);
    elseif orientation=="horizontal" then
    local pat = cairo_pattern_create_linear (rx,0,rx+rw,0);
    cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1);
    cairo_pattern_add_color_stop_rgba (pat, 0.5, 0, 0, 0, 0);
    cairo_pattern_add_color_stop_rgba (pat, 0, 0, 0, 0, 1);
    cairo_rectangle (cr,rx,ry,rw, rh);
    cairo_set_source (cr, pat);
    cairo_fill (cr);
    cairo_pattern_destroy (pat);
    end
    end
    ----------------------------------------------------------------------------------
    conkyForecast.template
    Code:
    ${image [--datatype=WI] -p 120,490 -s 40x40}
    ${voffset -15}Current Temp: [datatype=HT]${alignr}[datatype=CC]
    Feels Like:  [datatype=LT] 
    ${image [--datatype=BI] -p 30,530 -s 40x40}
    ${image [--datatype=MI] -p 220,530 -s 40x40} 
    ${voffset 15}Wind Direction: [datatype=WD]${alignr}[datatype=MP]
    Wind Speed: [datatype=WS]${alignr}Sun Rise [datatype=SR]
    Humidity: [datatype=HM]${alignr}Sun Set [datatype=SS]
    Percip: [datatype=PC --startday=0]${alignr}Daylight [datatype=DL]
    Dew Point: [datatype=DP]
    ${image [--datatype=WI --startday=0] -p 50,650 -s 40x40}
    ${image [--datatype=WI --startday=1] -p 100,650 -s 40x40}
    ${image [--datatype=WI --startday=2] -p 150,650 -s 40x40}
    ${image [--datatype=WI --startday=3] -p 200,650 -s 40x40}
    ${goto 50}[--datatype=LT  --startday=0 --hideunits --night]/[--datatype=HT --startday=0 --hideunits --night] ${goto 100}[--datatype=LT --startday=1 --hideunits]/[--datatype=HT --startday=1 --hideunits] ${goto 150}[--datatype=LT --startday=2 --hideunits]/[--datatype=HT --startday=2 --hideunits] ${goto 200}[--datatype=LT --startday=3 --hideunits]/[--datatype=HT --startday=3 --hideunits]${font}${color}
    Attached Images Attached Images
    Last edited by akernan; June 5th, 2011 at 03:25 AM.

Page 1797 of 2327 FirstFirst ... 7971297169717471787179517961797179817991807184718972297 ... 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
  •