Page 1763 of 2302 FirstFirst ... 7631263166317131753176117621763176417651773181318632263 ... LastLast
Results 17,621 to 17,630 of 23020

Thread: Post your .conkyrc files w/ screenshots

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

    Re: Post your .conkyrc files w/ screenshots

    re sensors

    when i first setup the whole sensors thing i was only getting the output from the PCI sensor ie

    Code:
    k10temp-pci-00c3
    Adapter: PCI adapter
    temp1:       +22.5°C  (high = +70.0°C)
    i was a little disappointed as my mobo was quite new and i thought it should have more

    after some reading i discovered there should be a sensors.conf file in /etc and when i went to look i also found sensors3.conf

    i used

    Code:
    gksu gedit /etc/sensors3.conf
    to save the file as just "sensors.conf" instead of sensors3 and then when i ran sensors i got a lot of additional information

    i dont know if this was the actual cause of the new info, but it did seem to coincide quite nicely, so you might want to give it a try

    EDIT @ wildmanne can you do this also

    Code:
    ls /sys/class/hwmon
    Code:
    ls /sys/class/hwmon/hwmon0/device
    and if you get a hwmon1
    Code:
    ls /sys/class/hwmon/hwmon1/device
    Last edited by mrpeachy; May 13th, 2011 at 05:50 PM.

  2. #17622
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mrpeachy View Post
    re sensors

    when i first setup the whole sensors thing i was only getting the output from the PCI sensor ie

    Code:
    k10temp-pci-00c3
    Adapter: PCI adapter
    temp1:       +22.5°C  (high = +70.0°C)
    i was a little disappointed as my mobo was quite new and i thought it should have more

    after some reading i discovered there should be a sensors.conf file in /etc and when i went to look i also found sensors3.conf

    i used

    Code:
    gksu gedit /etc/sensors3.conf
    to save the file as just "sensors.conf" instead of sensors3 and then when i ran sensors i got a lot of additional information

    i dont know if this was the actual cause of the new info, but it did seem to coincide quite nicely, so you might want to give it a try
    Well, I tried that ...
    Code:
    file:///etc/sensors3.conf
    file:///etc/sensors.conf
    and ran
    Code:
    sudo sensors-detect
    saved and ran
    Code:
      14:29 ~
             $ /etc/init.d/module-init-tools start
    Loading kernel modules...done.
    
      14:30 ~
             $ sensors
    acpitz-virtual-0
    Adapter: Virtual device
    temp1:       +21.8°C  (crit = +96.8°C)                  
    
    k8temp-pci-00c3
    Adapter: PCI adapter
    Core0 Temp:  +41.0°C                                    
    
    
      14:30 ~
             $
    ... I guess that's my limit!

    But thanks a bunch for the info.

  3. #17623
    Join Date
    Feb 2008
    Location
    Texas
    Beans
    14,905
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mrpeachy View Post
    re sensors

    when i first setup the whole sensors thing i was only getting the output from the PCI sensor ie

    Code:
    k10temp-pci-00c3
    Adapter: PCI adapter
    temp1:       +22.5°C  (high = +70.0°C)
    i was a little disappointed as my mobo was quite new and i thought it should have more

    after some reading i discovered there should be a sensors.conf file in /etc and when i went to look i also found sensors3.conf

    i used

    Code:
    gksu gedit /etc/sensors3.conf
    to save the file as just "sensors.conf" instead of sensors3 and then when i ran sensors i got a lot of additional information

    i dont know if this was the actual cause of the new info, but it did seem to coincide quite nicely, so you might want to give it a try

    EDIT @ wildmanne can you do this also

    Code:
    ls /sys/class/hwmon
    Code:
    ls /sys/class/hwmon/hwmon0/device
    and if you get a hwmon1
    Code:
    ls /sys/class/hwmon/hwmon1/device
    Hi mrpeachy this is what I got when I ran those commands after I saved the files as sensors.conf.
    ls /sys/class/hwmon
    Code:
    hwmon0
    ls /sys/class/hwmon/hwmon0/device
    Code:
    ls: cannot access /sys/class/hwmon/hwmon0/device: No such file or directory
    ls /sys/class/hwmon/hwmon1/device
    Code:
     cannot access /sys/class/hwmon/hwmon1/device: No such file or directory
    Thank you very much for your help, it is not looking good.

  4. #17624
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    might need to restart for it to change

  5. #17625
    Join Date
    Aug 2010
    Location
    Arizona USA
    Beans
    2,916
    Distro
    Ubuntu Development Release

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    Since I was using mobildiesel's remind calendar I thought [...]
    Speaking of calendars...

    I wonder if mobilediesel ever completed his work on the awk calendar.

    He was well on his way, but... I didn't hear from him again for months.


    Quote Originally Posted by mobilediesel View Post
    I've been playing with awk a bit more, it can be done without the date command being run:
    Code:
    cal | awk '{if ( $0!~/^ *$/ && NR!=1) {sub(/^/,"${offset 37}");sub("\\<"strftime( "%-d" )"\\>","${color white}&${color 99ccff}");print}}'
    The $0!~/^ *$/ keeps blank lines from displaying. The NR!=1 keeps the first line from displaying.
    Here's the calendar code I use now:
    Code:
    cal -3 | awk -F"[ /]+" '{
    {if ( substr($0,1,20)!~/^ *$/ )
    {PREV=substr($0,1,20)}}
    {if ( NR==3 ) {NEXT=substr($0,45,20)} {sub(/^ */," ",NEXT)}}
    {if ( NR==1 ) MONTH=substr($0,23,20)}
    {if ( NR==2 ) DOW=substr($0,23,20)}
    {if ( substr($0,23,20)!~/^ *$/ && NR!=1 && NR!=2 )
    {tmp=substr($0,23,20);sub(/^ +1 /," 1 ",tmp);sub(/[ ]+$/,"",tmp)
    {if ( length(tmp)==20 || NR==3 )
    CAL=CAL tmp"\n"
    else
    CAL=CAL tmp" "}}}}
    END{
    {sub("\\<"strftime( "%-d" )"\\>","${color white}&${color 99ccff}",CAL)}
    sub(/[ ]+$/," ",PREV)
    {if ( length(PREV)==20 )
    PREV=PREV"\n"}
    print "${color grey}"MONTH"\n${color 808080}"DOW"\n${color grey}"PREV"${color 99ccff}"CAL"${color grey}"NEXT
    }'
    I'm sure it can be simplified a bit more, though.

    oh yeah, here's what it looks like:
    I worked on an awk solution for quite a while, but decided to go with sed instead, once I got it nailed down.
    Last edited by VinDSL; May 14th, 2011 at 12:09 AM. Reason: clarification
    Intel ® P4 Extreme Edition 3.4 (Gallatin) || DFI ® LanParty PRO875B rev B1
    Crucial ® Ballistix Tracer PC4000 1GB || Mountain Mods U2-UFO Opti-1203
    XFX 7600GT 560M AGP (PV-T73A-UDF3) || Corsair HX520W Modular PSU

  6. #17626
    Join Date
    Jun 2006
    Location
    London, England
    Beans
    87
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Post your .conkyrc files w/ screenshots

    Just thought I would add mine to the list of Conky configurations Not the best example as I have BOINC running and so the machine is pretty flat out.


    Click to enlarge


    The associated files can be downloaded from my website.
    George Smart, M1GEO

    PhD Research Student, Electronic & Electrical Engineering, University College London
    Dell Precision 1600, 8GB RAM, Intel Xeon E31225 3.10GHz CPU, 5TB HDD, nVidia Quadro 600.

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

    Re: Post your .conkyrc files w/ screenshots

    i thought i would share my weather conky here


    Code:
    --[[ circleweather by mrpeachy may 2011 - weather image version
    kudos to Sector11 who gave me the push to do this and whose weather code is my reference
    call in conkyrc like this, but change to whatever you saved it as and where
    lua_load /home/mcdowall/lua/cweather.lua
    lua_draw_hook_pre draw_fig
    ]]
    require 'cairo'
    require 'imlib2'
    function string:split(delimiter)
    local result = { }
    local from  = 1
    local delim_from, delim_to = string.find( self, delimiter, from  )
    while delim_from do
    table.insert( result, string.sub( self, from , delim_from-1 ) )
    from  = delim_to + 1
    delim_from, delim_to = string.find( self, delimiter, from  )
    end
    table.insert( result, string.sub( self, from  ) )
    return result
    end
    
    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
    --#########################################################################################################
    --#########################################################################################################
    --get weather data
    time=1800
    timer=(updates % time)+1
    if updates==10 or timer==1 then
    filenow=conky_parse("${exec conkyForecast -d WI}")
    filed1=conky_parse("${exec conkyForecast -d WI -s 1}")
    filed2=conky_parse("${exec conkyForecast -d WI -s 2}")
    filed3=conky_parse("${exec conkyForecast -d WI -s 3}")
    filed4=conky_parse("${exec conkyForecast -d WI -s 4}")
    filed5=conky_parse("${exec conkyForecast -d WI -s 5}")
    --now current conditions
    nowcc=conky_parse("${exec conkyForecast -d CT}")
    --forcast days text--if font/size is changed, must be changed here also
    font="White Rabbit"
    fontsize=14
    cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, fontsize);
    day1n=conky_parse("${exec conkyForecast -d DW -s 1 -w}")
    day2n=conky_parse("${exec conkyForecast -d DW -s 2 -w}")
    day3n=conky_parse("${exec conkyForecast -d DW -s 3 -w}")
    day4n=conky_parse("${exec conkyForecast -d DW -s 4 -w}")
    day5n=conky_parse("${exec conkyForecast -d DW -s 5 -w}")
    text=string.upper(day5n)
    extents=cairo_text_extents_t:create()
    textoriginal=text
    cairo_text_extents(cr,text,extents)
    dayn_w=extents.width
    dayn_h=extents.height
    --highs and lows
    font="Mono"
    fontsize=10
    cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, fontsize);
    day5h=conky_parse("${exec conkyForecast -d HT -s 5 -i}")
    text=string.upper(day5h)
    extents=cairo_text_extents_t:create()
    textoriginal=text
    cairo_text_extents(cr,text,extents)
    dayh_h=extents.height
    ------------------------------------------
    day5l=conky_parse("${exec conkyForecast -d LT -s 5 -i}")
    day4h=conky_parse("${exec conkyForecast -d HT -s 4 -i}")
    day4l=conky_parse("${exec conkyForecast -d LT -s 4 -i}")
    day3h=conky_parse("${exec conkyForecast -d HT -s 3 -i}")
    day3l=conky_parse("${exec conkyForecast -d LT -s 3 -i}")
    day2h=conky_parse("${exec conkyForecast -d HT -s 2 -i}")
    day2l=conky_parse("${exec conkyForecast -d LT -s 2 -i}")
    day1h=conky_parse("${exec conkyForecast -d HT -s 1 -i}")
    day1l=conky_parse("${exec conkyForecast -d LT -s 1 -i}")
    end --weather gathering
    --######################################
    --center position
    --background
    bgrad=145--radius
    --center position
    cx,cy=200,bgrad
    -----------------
    cairo_set_source_rgba (cr,0,0,0,0.3)--color for background
    ----------------------------------------------------------
    cairo_arc (cr,cx,cy,bgrad,((2*math.pi)/4)*1,((2*math.pi)/4)*3)
    dist1=conky_window.width-cx
    cairo_rel_line_to (cr,dist1,0)
    cairo_rel_line_to (cr,0,bgrad*2)
    cairo_rel_line_to (cr,-dist1,0)
    cairo_fill(cr)
    --PRINT CURRENT CONDITIONS--------------------------------
    crad=80
    length=string.len(nowcc)
    angs=-155
    angt=125
    lenmax=string.len("Scattered Thunderstorms")
    angadd=(angt/lenmax)*length
    angf=angs+angadd
    circlewriting(string.upper(nowcc),"White Rabbit",12,crad,cx,cy,1,1,1,1,angs,angf,0)
    crad=95
    circlewriting("CURRENT CONDITIONS","White Rabbit",12,crad,cx,cy,1,1,1,1,angs,angs+angt,0)
    ------------------------------------------
    --WEATHER IMAGES--------------------------
    set={file=filenow,cx=cx,cy=cy,xscale=1,yscale=1,radius=0,angle=0};image(set)
    set={file=filed1,cx=cx,cy=cy,xscale=1.75,yscale=1.75,radius=80,angle=0};image(set)
    set={file=filed2,cx=cx,cy=cy,xscale=1.75,yscale=1.75,radius=80,angle=45};image(set)
    set={file=filed3,cx=cx,cy=cy,xscale=1.75,yscale=1.75,radius=80,angle=90};image(set)
    set={file=filed4,cx=cx,cy=cy,xscale=1.75,yscale=1.75,radius=80,angle=135};image(set)
    set={file=filed5,cx=cx,cy=cy,xscale=1.75,yscale=1.75,radius=80,angle=180};image(set)
    -------------------------------------------
    --test circle for positioning
    --cairo_set_source_rgba (cr,1,1,1,1)
    --cairo_set_line_width (cr,1)
    --cairo_arc (cr,cx,cy,120,0,2*math.pi)
    --cairo_stroke (cr)
    
    --FORECAST TEXT
    --heading
    circlewriting("FORECAST","White Rabbit",12,110,cx,cy,1,1,1,1,-90,-20,0)
    --day and high low text
    --set radius for text
    local tradius=120
    --set gap between day name and temps
    local gap=4
    --set font, size and color for day names
    local dayfont="White Rabbit"
    local dayfontsize=14
    local dtr,dtg,dtb,dta=1,1,1,1
    --set font, size and color for high|low temps
    local hilofont="Mono"
    local hilofontsize=10
    local htr,htg,htb,hta=1,1,1,1
    --height of text
    nheight=dayn_h
    hlheight=dayh_h
    ------------------------------------
    --angle of display is set below for each text instance
    ------------------------------------
    --forecast day 1
    set={angle=0,
    dayname=string.upper(day1n),dayfont=dayfont,dayfontsize=dayfontsize,dtr=dtr,dtg=dtg,dtb=dtb,dta=dta,
    hilo=string.upper(day1h) .. "|" .. string.upper(day1l),hilofont=hilofont,hilofontsize=hilofontsize,htr=htr,htg=htg,htb=htb,hta=hta,
    cx=cx,cy=cy,gap=gap,radius=tradius,nheight=nheight,hlheight=hlheight,
    };wtext(set)
    --forecast day 2
    set={angle=45,
    dayname=string.upper(day2n),dayfont=dayfont,dayfontsize=dayfontsize,dtr=dtr,dtg=dtg,dtb=dtb,dta=dta,
    hilo=string.upper(day2h) .. "|" .. string.upper(day2l),hilofont=hilofont,hilofontsize=hilofontsize,htr=htr,htg=htg,htb=htb,hta=hta,
    cx=cx,cy=cy,gap=gap,radius=tradius,nheight=nheight,hlheight=hlheight,
    };wtext(set)
    --forecast day 3
    set={angle=90,
    dayname=string.upper(day3n),dayfont=dayfont,dayfontsize=dayfontsize,dtr=dtr,dtg=dtg,dtb=dtb,dta=dta,
    hilo=string.upper(day3h) .. "|" .. string.upper(day3l),hilofont=hilofont,hilofontsize=hilofontsize,htr=htr,htg=htg,htb=htb,hta=hta,
    cx=cx,cy=cy,gap=gap,radius=tradius,nheight=nheight,hlheight=hlheight,
    };wtext(set)
    --forecast day 4
    set={angle=135,
    dayname=string.upper(day4n),dayfont=dayfont,dayfontsize=dayfontsize,dtr=dtr,dtg=dtg,dtb=dtb,dta=dta,
    hilo=string.upper(day4h) .. "|" .. string.upper(day4l),hilofont=hilofont,hilofontsize=hilofontsize,htr=htr,htg=htg,htb=htb,hta=hta,
    cx=cx,cy=cy,gap=gap,radius=tradius,nheight=nheight,hlheight=hlheight,
    };wtext(set)
    --forecast day 5
    set={angle=180,
    dayname=string.upper(day5n),dayfont=dayfont,dayfontsize=dayfontsize,dtr=dtr,dtg=dtg,dtb=dtb,dta=dta,
    hilo=string.upper(day5h) .. "|" .. string.upper(day5l),hilofont=hilofont,hilofontsize=hilofontsize,htr=htr,htg=htg,htb=htb,hta=hta,
    cx=cx,cy=cy,gap=gap,radius=tradius,nheight=nheight,hlheight=hlheight,
    };wtext(set)
    
    --#########################################################################################################
    --#########################################################################################################
    end-- if updates>5
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    end-- end main function
    
    function circlewriting(text, font, fsize, radi, horiz, verti, tred, tgreen, tblue, talpha, start, finish, var1)
    local inum=string.len(text)
    range=finish
    deg=(finish-start)/(inum-1)
    degrads=1*(math.pi/180)
    local textcut=string.gsub(text, ".", "%1@")
    texttable=string.split(textcut, "@")
    for i = 1,inum do
    ival=i
    interval=(degrads*(start+(deg*(i-1))))+var1
    interval2=degrads*(start+(deg*(i-1)))
    txs=0+radi*(math.sin(interval))
    tys=0-radi*(math.cos(interval))
    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, tred, tgreen, tblue, talpha);
    cairo_move_to (cr, txs+horiz, tys+verti);
    cairo_rotate (cr, interval2)
    cairo_show_text (cr, (texttable[i]))
    cairo_stroke (cr)
    cairo_rotate (cr, -interval2)
    end
    end
    
    function image(t)
    local crad=t.radius
    local d1w_ang=t.angle
    local cx,cy=t.cx,t.cy
    local filed1=t.file
    local xscale=t.xscale
    local yscale=t.yscale
    d1warc=((2*math.pi)/(360))*d1w_ang
    d1wx=0+crad*(math.sin(d1warc))
    d1wy=0-crad*(math.cos(d1warc))
    --images--------------------------
    show = imlib_load_image(filed1)
    if show == nil then return end
    imlib_context_set_image(show)
    w_img, h_img = imlib_image_get_width(), imlib_image_get_height()
    width=w_img/xscale
    height=h_img/yscale
    iacross=cx-(width/2)+d1wx
    idown=cy-(height/2)+d1wy
    imlib_context_set_image(show)
    scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
    imlib_free_image()
    imlib_context_set_image(scaled)
    imlib_render_image_on_drawable(iacross, idown)
    imlib_free_image()
    end
    
    function wtext(t)
    local crad=t.radius
    local gap=t.gap
    local d1w_ang=t.angle
    local font1=t.dayfont
    local fontsize1=t.dayfontsize
    local dayname=t.dayname
    local font2=t.hilofont
    local fontsize2=t.hilofontsize
    local hilo=t.hilo
    local dtr=t.dtr
    local dtg=t.dtg
    local dtb=t.dtb
    local dta=t.dta
    local htr=t.htr
    local htg=t.htg
    local htb=t.htb
    local hta=t.htb
    local nheight=t.nheight
    local hlheight=t.hlheight
    
    height=(nheight+hlheight+gap)/2
    nadj=height-nheight
    hladj=height-nadj
    
    d1warc=((2*math.pi)/(360))*d1w_ang
    d1wx=0+crad*(math.sin(d1warc))
    d1wy=0-crad*(math.cos(d1warc))
    cairo_select_font_face (cr, font1, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, fontsize1);
    
    cairo_move_to (cr,cx+d1wx,cy+d1wy-(nadj))
    
    cairo_set_source_rgba (cr,dtr,dtg,dtb,dta)
    cairo_show_text (cr,dayname)
    cairo_stroke (cr)
    --high low
    cairo_select_font_face (cr, font2, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, fontsize2);
    cairo_move_to (cr,cx+d1wx,cy+d1wy+(hladj))
    cairo_set_source_rgba (cr,htr,htg,htb,hta)
    cairo_show_text (cr,hilo)
    cairo_stroke (cr)
    end
    you will probably get this error in the console 4 times
    Code:
    Conky: llua_do_call: function conky_draw_fig execution failed: /home/mcdowall/lua/cweather_images.lua:96: bad argument #1 to 'len' (string expected, got nil)
    do not panic
    Last edited by mrpeachy; May 14th, 2011 at 05:49 PM.

  8. #17628
    Join Date
    Feb 2008
    Location
    Texas
    Beans
    14,905
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mrpeachy View Post
    i thought i would share my weather conky here


    Code:
    --[[ circleweather by mrpeachy may 2011 - weather image version
    kudos to Sector11 who gave me the push to do this and whose weather code is my reference
    call in conkyrc like this, but change to whatever you saved it as and where
    lua_load /home/mcdowall/lua/cweather.lua
    lua_draw_hook_pre draw_fig
    ]]
    require 'cairo'
    require 'imlib2'
    function string:split(delimiter)
    local result = { }
    local from  = 1
    local delim_from, delim_to = string.find( self, delimiter, from  )
    while delim_from do
    table.insert( result, string.sub( self, from , delim_from-1 ) )
    from  = delim_to + 1
    delim_from, delim_to = string.find( self, delimiter, from  )
    end
    table.insert( result, string.sub( self, from  ) )
    return result
    end
    
    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
    --#########################################################################################################
    --#########################################################################################################
    --get weather data
    time=1800
    timer=(updates % time)+1
    if updates==10 or timer==1 then
    filenow=conky_parse("${exec conkyForecast -d WI}")
    filed1=conky_parse("${exec conkyForecast -d WI -s 1}")
    filed2=conky_parse("${exec conkyForecast -d WI -s 2}")
    filed3=conky_parse("${exec conkyForecast -d WI -s 3}")
    filed4=conky_parse("${exec conkyForecast -d WI -s 4}")
    filed5=conky_parse("${exec conkyForecast -d WI -s 5}")
    --now current conditions
    nowcc=conky_parse("${exec conkyForecast -d CT}")
    --forcast days text--if font/size is changed, must be changed here also
    font="White Rabbit"
    fontsize=14
    cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, fontsize);
    day1n=conky_parse("${exec conkyForecast -d DW -s 1 -w}")
    day2n=conky_parse("${exec conkyForecast -d DW -s 2 -w}")
    day3n=conky_parse("${exec conkyForecast -d DW -s 3 -w}")
    day4n=conky_parse("${exec conkyForecast -d DW -s 4 -w}")
    day5n=conky_parse("${exec conkyForecast -d DW -s 5 -w}")
    text=string.upper(day5n)
    extents=cairo_text_extents_t:create()
    textoriginal=text
    cairo_text_extents(cr,text,extents)
    dayn_w=extents.width
    dayn_h=extents.height
    --highs and lows
    font="Mono"
    fontsize=10
    cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, fontsize);
    day5h=conky_parse("${exec conkyForecast -d HT -s 5 -i}")
    text=string.upper(day5h)
    extents=cairo_text_extents_t:create()
    textoriginal=text
    cairo_text_extents(cr,text,extents)
    dayh_h=extents.height
    ------------------------------------------
    day5l=conky_parse("${exec conkyForecast -d LT -s 5 -i}")
    day4h=conky_parse("${exec conkyForecast -d HT -s 4 -i}")
    day4l=conky_parse("${exec conkyForecast -d LT -s 4 -i}")
    day3h=conky_parse("${exec conkyForecast -d HT -s 3 -i}")
    day3l=conky_parse("${exec conkyForecast -d LT -s 3 -i}")
    day2h=conky_parse("${exec conkyForecast -d HT -s 2 -i}")
    day2l=conky_parse("${exec conkyForecast -d LT -s 2 -i}")
    day1h=conky_parse("${exec conkyForecast -d HT -s 1 -i}")
    day1l=conky_parse("${exec conkyForecast -d LT -s 1 -i}")
    end --weather gathering
    --######################################
    --center position
    --background
    bgrad=145--radius
    --center position
    cx,cy=200,bgrad
    -----------------
    cairo_set_source_rgba (cr,0,0,0,0.3)--color for background
    ----------------------------------------------------------
    cairo_arc (cr,cx,cy,bgrad,((2*math.pi)/4)*1,((2*math.pi)/4)*3)
    dist1=conky_window.width-cx
    cairo_rel_line_to (cr,dist1,0)
    cairo_rel_line_to (cr,0,bgrad*2)
    cairo_rel_line_to (cr,-dist1,0)
    cairo_fill(cr)
    --PRINT CURRENT CONDITIONS--------------------------------
    crad=66
    length=string.len(nowcc)
    angs=-150
    angt=110
    lenmax=string.len("partly cloudy")
    angadd=(angt/lenmax)*length
    angf=angs+angadd
    circlewriting(string.upper(nowcc),"White Rabbit",12,crad,cx,cy,1,1,1,1,angs,angf,0)
    crad=80
    circlewriting("CURRENT CONDITIONS","White Rabbit",12,crad,cx,cy,1,1,1,1,-150,-40,0)
    ------------------------------------------
    --WEATHER IMAGES--------------------------
    set={file=filenow,cx=cx,cy=cy,xscale=1,yscale=1,radius=0,angle=0};image(set)
    set={file=filed1,cx=cx,cy=cy,xscale=1.75,yscale=1.75,radius=80,angle=0};image(set)
    set={file=filed2,cx=cx,cy=cy,xscale=1.75,yscale=1.75,radius=80,angle=45};image(set)
    set={file=filed3,cx=cx,cy=cy,xscale=1.75,yscale=1.75,radius=80,angle=90};image(set)
    set={file=filed4,cx=cx,cy=cy,xscale=1.75,yscale=1.75,radius=80,angle=135};image(set)
    set={file=filed5,cx=cx,cy=cy,xscale=1.75,yscale=1.75,radius=80,angle=180};image(set)
    -------------------------------------------
    --test circle for positioning
    --cairo_set_source_rgba (cr,1,1,1,1)
    --cairo_set_line_width (cr,1)
    --cairo_arc (cr,cx,cy,120,0,2*math.pi)
    --cairo_stroke (cr)
    
    --FORECAST TEXT
    --heading
    circlewriting("FORECAST","White Rabbit",12,110,cx,cy,1,1,1,1,-90,-20,0)
    --day and high low text
    --set radius for text
    local tradius=120
    --set gap between day name and temps
    local gap=4
    --set font, size and color for day names
    local dayfont="White Rabbit"
    local dayfontsize=14
    local dtr,dtg,dtb,dta=1,1,1,1
    --set font, size and color for high|low temps
    local hilofont="Mono"
    local hilofontsize=10
    local htr,htg,htb,hta=1,1,1,1
    --height of text
    nheight=dayn_h
    hlheight=dayh_h
    ------------------------------------
    --angle of display is set below for each text instance
    ------------------------------------
    --forecast day 1
    set={angle=0,
    dayname=string.upper(day1n),dayfont=dayfont,dayfontsize=dayfontsize,dtr=dtr,dtg=dtg,dtb=dtb,dta=dta,
    hilo=string.upper(day1h) .. "|" .. string.upper(day1l),hilofont=hilofont,hilofontsize=hilofontsize,htr=htr,htg=htg,htb=htb,hta=hta,
    cx=cx,cy=cy,gap=gap,radius=tradius,nheight=nheight,hlheight=hlheight,
    };wtext(set)
    --forecast day 2
    set={angle=45,
    dayname=string.upper(day2n),dayfont=dayfont,dayfontsize=dayfontsize,dtr=dtr,dtg=dtg,dtb=dtb,dta=dta,
    hilo=string.upper(day2h) .. "|" .. string.upper(day2l),hilofont=hilofont,hilofontsize=hilofontsize,htr=htr,htg=htg,htb=htb,hta=hta,
    cx=cx,cy=cy,gap=gap,radius=tradius,nheight=nheight,hlheight=hlheight,
    };wtext(set)
    --forecast day 3
    set={angle=90,
    dayname=string.upper(day3n),dayfont=dayfont,dayfontsize=dayfontsize,dtr=dtr,dtg=dtg,dtb=dtb,dta=dta,
    hilo=string.upper(day3h) .. "|" .. string.upper(day3l),hilofont=hilofont,hilofontsize=hilofontsize,htr=htr,htg=htg,htb=htb,hta=hta,
    cx=cx,cy=cy,gap=gap,radius=tradius,nheight=nheight,hlheight=hlheight,
    };wtext(set)
    --forecast day 4
    set={angle=135,
    dayname=string.upper(day4n),dayfont=dayfont,dayfontsize=dayfontsize,dtr=dtr,dtg=dtg,dtb=dtb,dta=dta,
    hilo=string.upper(day4h) .. "|" .. string.upper(day4l),hilofont=hilofont,hilofontsize=hilofontsize,htr=htr,htg=htg,htb=htb,hta=hta,
    cx=cx,cy=cy,gap=gap,radius=tradius,nheight=nheight,hlheight=hlheight,
    };wtext(set)
    --forecast day 5
    set={angle=180,
    dayname=string.upper(day5n),dayfont=dayfont,dayfontsize=dayfontsize,dtr=dtr,dtg=dtg,dtb=dtb,dta=dta,
    hilo=string.upper(day5h) .. "|" .. string.upper(day5l),hilofont=hilofont,hilofontsize=hilofontsize,htr=htr,htg=htg,htb=htb,hta=hta,
    cx=cx,cy=cy,gap=gap,radius=tradius,nheight=nheight,hlheight=hlheight,
    };wtext(set)
    
    --#########################################################################################################
    --#########################################################################################################
    end-- if updates>5
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    end-- end main function
    
    function circlewriting(text, font, fsize, radi, horiz, verti, tred, tgreen, tblue, talpha, start, finish, var1)
    local inum=string.len(text)
    range=finish
    deg=(finish-start)/(inum-1)
    degrads=1*(math.pi/180)
    local textcut=string.gsub(text, ".", "%1@")
    texttable=string.split(textcut, "@")
    for i = 1,inum do
    ival=i
    interval=(degrads*(start+(deg*(i-1))))+var1
    interval2=degrads*(start+(deg*(i-1)))
    txs=0+radi*(math.sin(interval))
    tys=0-radi*(math.cos(interval))
    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, tred, tgreen, tblue, talpha);
    cairo_move_to (cr, txs+horiz, tys+verti);
    cairo_rotate (cr, interval2)
    cairo_show_text (cr, (texttable[i]))
    cairo_stroke (cr)
    cairo_rotate (cr, -interval2)
    end
    end
    
    function image(t)
    local crad=t.radius
    local d1w_ang=t.angle
    local cx,cy=t.cx,t.cy
    local filed1=t.file
    local xscale=t.xscale
    local yscale=t.yscale
    d1warc=((2*math.pi)/(360))*d1w_ang
    d1wx=0+crad*(math.sin(d1warc))
    d1wy=0-crad*(math.cos(d1warc))
    --images--------------------------
    show = imlib_load_image(filed1)
    if show == nil then return end
    imlib_context_set_image(show)
    w_img, h_img = imlib_image_get_width(), imlib_image_get_height()
    width=w_img/xscale
    height=h_img/yscale
    iacross=cx-(width/2)+d1wx
    idown=cy-(height/2)+d1wy
    imlib_context_set_image(show)
    scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
    imlib_free_image()
    imlib_context_set_image(scaled)
    imlib_render_image_on_drawable(iacross, idown)
    imlib_free_image()
    end
    
    function wtext(t)
    local crad=t.radius
    local gap=t.gap
    local d1w_ang=t.angle
    local font1=t.dayfont
    local fontsize1=t.dayfontsize
    local dayname=t.dayname
    local font2=t.hilofont
    local fontsize2=t.hilofontsize
    local hilo=t.hilo
    local dtr=t.dtr
    local dtg=t.dtg
    local dtb=t.dtb
    local dta=t.dta
    local htr=t.htr
    local htg=t.htg
    local htb=t.htb
    local hta=t.htb
    local nheight=t.nheight
    local hlheight=t.hlheight
    
    height=(nheight+hlheight+gap)/2
    nadj=height-nheight
    hladj=height-nadj
    
    d1warc=((2*math.pi)/(360))*d1w_ang
    d1wx=0+crad*(math.sin(d1warc))
    d1wy=0-crad*(math.cos(d1warc))
    cairo_select_font_face (cr, font1, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, fontsize1);
    
    cairo_move_to (cr,cx+d1wx,cy+d1wy-(nadj))
    
    cairo_set_source_rgba (cr,dtr,dtg,dtb,dta)
    cairo_show_text (cr,dayname)
    cairo_stroke (cr)
    --high low
    cairo_select_font_face (cr, font2, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, fontsize2);
    cairo_move_to (cr,cx+d1wx,cy+d1wy+(hladj))
    cairo_set_source_rgba (cr,htr,htg,htb,hta)
    cairo_show_text (cr,hilo)
    cairo_stroke (cr)
    end
    you will probably get this error in the console 4 times
    Code:
    Conky: llua_do_call: function conky_draw_fig execution failed: /home/mcdowall/lua/cweather_images.lua:96: bad argument #1 to 'len' (string expected, got nil)
    do not panic
    Hi, very nice weather conky mrpeachy.

  9. #17629
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    conkyText found at ConkyCompanions PPA in my signature. The "Hardy" .DEB versions work perfectly with LM and #! based on Debian Squeeze.
    conkyText is now part of the conkyMisc package, any changes will turn up there

    @mrpeachy, loving the lua....any means of making one exec call to conkyForecast with a template to grab all the required data for lua to process and output? It would save on CPU cycles...the template could be structured so all the data is in name/value pairs or something like that...?
    Last edited by kaivalagi; May 14th, 2011 at 08:22 AM.

  10. #17630
    Join Date
    Feb 2011
    Beans
    31
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    OK, my error, that script did NOT work for me, this one does though:
    Code:
    #!/bin/sh
    if [ "$(pidof conky)" ]; then
        killall conky
    sleep 10 && conky -c ~/conky/alpetjr/zoraclock &
    sleep 10 && conky -c ~/conky/alpetjr/conky &
        exit
    else
    sleep 10 && conky -c ~/conky/alpetjr/zoraclock &
    sleep 10 && conky -c ~/conky/alpetjr/conky &
        exit
    fi
    and in your zoraclock conky edit these lines:

    Code:
    maximum_width 200
    minimum_size 200 200
    My error the first time was checking JUST the clock.
    Ok I'll give it a try when I get up this afternoon. Why would it work fine before and not work after I reload Ubunutu? Thats what I don't understand.

Page 1763 of 2302 FirstFirst ... 7631263166317131753176117621763176417651773181318632263 ... 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
  •