Page 2120 of 2348 FirstFirst ... 1120162020202070211021182119212021212122213021702220 ... LastLast
Results 21,191 to 21,200 of 23480

Thread: Post your .conkyrc files w/ screenshots

  1. #21191
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    The Teo Weather Clock
    Using: 4) Weather.com conky script - all users

    It come in two flavours:
    <-- 12 HR and 24 HR -->
    and is the preferred clock of gauchos in Salta, Argentina!

    In case you are wondering, days and months are show in Greek in honour of Teo!
    Code:
    lang="Greek", -- English French Greek Spanish
    Here's getting the MAX and MIN temperature values:

    no no not the values, the spacing!

    The conky: Teo_Weather_Clock.conky
    Code:
    # killall conky && conky -c ~/Conky_WeatherCom_metric/Teo_Weather_Clock.conky &
    #
    # Thank you:
    # Chronograph LUA - mrpeachy (originally 4 clocks - tweaked by Sector11)
    # v9000 LUA weather - mrpeachy
    # background - londonali1010, mrpeachy, dk75
    
    ###  Begin Window Settings  ##################################################
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_type normal
    own_window_transparent yes
    own_window_hints undecorated,below,skip_taskbar,skip_pager
    #own_window_colour gray
    own_window_class Conky
    own_window_title Teo Weather Clock
    
    # Use the Xdbe extension? (eliminates flicker)
    # It is highly recommended to use own window with this one
    # so double buffer won't be so big.
    double_buffer yes
    
    ### ARGB can be used for real transparency
    ### NOTE that a composite manager is required for real transparency.
    ### This option will not work as desired (in most cases) in conjunction with
    ### own_window_type normal
    # own_window_argb_visual yes
    
    ### When ARGB visuals are enabled, this use this to modify the alpha value
    ### Use: own_window_type normal
    ### Use: own_window_transparent no
    ### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
    # own_window_argb_value 0
    
    #minimum_size 420 420  ## width, height
    #maximum_width 420     ## width
    
    ### For use with The-Clock.lua
    minimum_size 300 500  ## width, height
    maximum_width 300     ## width
    
    gap_x 10 #15        ### left &right
    gap_y 10        ### up & down
    
    ### alignment values or top_left, bottom_right, etc
    # tl, tm, tr
    # ml, mm, mr
    # bl, bm, br
    alignment tl
    
    ####################################################  End Window Settings  ###
    ###  Font Settings  ##########################################################
    # Use Xft (anti-aliased font and stuff)
    use_xft yes
    #xftfont CorporateMonoExtraBold:size=9
    xftfont monofur:bold:size=11
    # X font when Xft is disabled, you can pick one with program xfontsel
    #font 5x7
    #font 6x10
    #font 7x13
    #font 8x13
    #font 9x15
    #font *mintsmild.se*
    #font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
    
    # Alpha of Xft font. Must be a value at or between 1 and 0 ###
    xftalpha 1
    # Force UTF8? requires XFT ###
    override_utf8_locale yes
    
    uppercase no
    ######################################################  End Font Settings  ###
    ###  Color Settings  #########################################################
    draw_shades no
    default_shade_color black
    
    draw_outline no # amplifies text if yes
    default_outline_color black
    
    default_color DCDCDC #220 220 220	Gainsboro
    color0 8FBC8F #143 188 143	DarkSeaGreen
    color1 C2CCFF # Not a clue - a blue #778899 #119 136 153	LightSlateGray
    color2 FF8C00 #255 140   0	DarkOrange
    color3 7FFF00 #127 255   0	Chartreuse
    color4 FFA07A #255 160 122	LightSalmon
    color5 FFDEAD #255 222 173	NavajoWhite
    color6 00BFFF #  0 191 255	DeepSkyBlue
    color7 00FFFF #  0 255 255	Cyan
    color8 FFFF00 #255 255   0	Yellow
    color9 B22222 #178  34  34	FireBrick
    #####################################################  End Color Settings  ###
    ###  Borders Section  ########################################################
    draw_borders no
    # Stippled borders?
    stippled_borders 0
    # border margins
    border_inner_margin 5
    border_outer_margin 0
    # border width
    border_width 0
    # graph borders
    draw_graph_borders yes #no
    #default_graph_size 15 40
    #####################################################  End Borders Secton  ###
    ###  Miscellaneous Section  ##################################################
    # Boolean value, if true, Conky will be forked to background when started.
    background yes
    
    # Adds spaces around certain objects to stop them from moving other things
    # around, this only helps if you are using a mono font
    # Options: right, left or none
    use_spacer none
    
    # Default and Minimum size is 256 - needs more for single commands that
    # "call" a lot of text IE: bash scripts
    text_buffer_size 256
    
    # Subtract (file system) buffers from used memory?
    no_buffers yes
    
    # change GiB to G and MiB to M
    short_units yes
    
    # Like it says, ot pads the decimals on % values
    # doesn't seem to work since v1.7.1
    pad_percents 2
    
    # If enabled, values which are in bytes will be printed in human readable
    # format (i.e., KiB, MiB, etc). If disabled, bytes is printed instead
    format_human_readable yes
    
    # Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
    short_units yes
    
    
    imlib_cache_size 0
    
    #   Maximum size of user text buffer, i.e. layout below TEXT line in config file
    #  (default is 16384 bytes)
    # max_user_text 16384
    
    # Desired output unit of all objects displaying a temperature. Parameters are
    # either "fahrenheit" or "celsius". The default unit is degree Celsius.
    # temperature_unit Fahrenheit
    
    ##############################################  End Miscellaneous Section  ###
    ###  LUA Settings  ###########################################################
    ## draw-bg.lua - Above and After TEXT - requires a composite manager.
    ##
    lua_load ~/Conky_WeatherCom_metric/LUA/draw-bg.lua
    #TEXT
    # ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.3}
    #
    # ----------------------------------------------------------------------------
    ## OR Both above TEXT - No composite manager required.
    #
    #lua_load ~/Conky_WeatherCom_metric/LUA/draw-bg.lua
    #lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.3
    #
    # TEXT
    ### Teo Weather Clock ########################################################
    lua_load ~/Conky_WeatherCom_metric/LUA/Teo_Weather_Clock.lua
    lua_draw_hook_post main
    
    ##############################  End LUA Settings  ###
    # The all important - How often conky refreshes.
    # If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
    update_interval 1
    
    TEXT
    ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}\
    ${texeci 600 bash $HOME/Conky_WeatherCom_metric/weath_com_metric}\
    ${color5}↑: ${color7}${execpi 1800 sed -n '3p' $HOME/Conky_WeatherCom_metric/10days/raw_10}°${alignr 5}\
    ${color5}T: ${color7}${execpi 1800 sed -n '3p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}°
    ${color5}↓: ${color2}${execpi 1800 sed -n '4p' $HOME/Conky_WeatherCom_metric/10days/raw_10}°${alignr 5}\
    ${color5}±: ${color7}${execpi 1800 sed -n '5p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}°
    
    
    
    
    
    
    
    ${image $HOME/Conky_WeatherCom_metric/now.png -p 122,122 -s 50x50}
    
    
    
    
    
    
    
    ${color5}Hum${alignr 5}D.P.${color}
    ${color7}${execpi 1800 sed -n '8p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}${alignr 5}${execpi 1800 sed -n '9p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}°${color}
    ${color5}Pressure${alignr 5}UV Index${color}
    ${color7}${execpi 1800 sed -n '11p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}${alignr 5}${execpi 1800 sed -n '12p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}${color}
    ${font monofur:bold:size=14}${alignc}${execpi 1800 sed -n '4p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}${font}
    ${font monofur:bold:size=10}${color5}${execpi 1800 sed -n '1p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 84}${execpi 1800 sed -n '8p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 145}${execpi 1800 sed -n '15p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 207}${execpi 1800 sed -n '22p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 267}${execpi 1800 sed -n '29p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${color}
    ${image $HOME/Conky_WeatherCom_metric/10_2.png -p 0,346 -s 50x50}\
    ${image $HOME/Conky_WeatherCom_metric/10_9.png -p 62,346 -s 50x50}\
    ${image $HOME/Conky_WeatherCom_metric/10_16.png -p 124,346 -s 50x50}
    ${image $HOME/Conky_WeatherCom_metric/10_23.png -p 186,346 -s 50x50}\
    ${image $HOME/Conky_WeatherCom_metric/10_30.png -p 248,346 -s 50x50}
    
    ${color2}${execpi 1800 sed -n '3p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '4p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 68}${color2}${execpi 1800 sed -n '10p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '11p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 130}${color2}${execpi 1800 sed -n '17p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '18p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 192}${color2}${execpi 1800 sed -n '24p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '25p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 254}${color2}${execpi 1800 sed -n '31p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '32p' $HOME/Conky_WeatherCom_metric/10days/raw_10}
    ${color5}${goto 20}${execpi 1800 sed -n '36p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 84}${execpi 1800 sed -n '43p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 145}${execpi 1800 sed -n '50p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 207}${execpi 1800 sed -n '57p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 267}${execpi 1800 sed -n '64p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${color}
    ${image $HOME/Conky_WeatherCom_metric/10_37.png -p 0,415 -s 50x50}\
    ${image $HOME/Conky_WeatherCom_metric/10_44.png -p 62,415 -s 50x50}\
    ${image $HOME/Conky_WeatherCom_metric/10_51.png -p 124,415 -s 50x50}\
    ${image $HOME/Conky_WeatherCom_metric/10_58.png -p 186,415 -s 50x50}\
    ${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${image $HOME/Conky_WeatherCom_metric/10_58.png -p 248,415 -s 50x50}${endif}
    
    
    ${color2}${execpi 1800 sed -n '3p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '4p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 68}${color2}${execpi 1800 sed -n '10p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '11p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 130}${color2}${execpi 1800 sed -n '17p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '18p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 192}${color2}${execpi 1800 sed -n '24p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '25p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
    ${goto 254}${color2}${execpi 1800 sed -n '31p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '32p' $HOME/Conky_WeatherCom_metric/10days/raw_10}
     ${color1}${hr}
    Teo_Weather_Clock.lua
    Code:
    --[[ multiple analogue clocks by mrpeachy - 18 Jun 2012
     21 Jun 2012 - Chronograph modifications by Sector11
     22 Jun 2012 - again with mrpeachy's help day names, numbers and month names
     12 Nov 2012 - memory leak plugged - mrpeachy
     14 Nov 2012 - Personnalisation - Didier-T (forum Ubuntu.fr)
     26 Nov 2012 - The Clock - Sector11 (small version)
    
    use in conkyrc
    
    lua_load /path/Chronograph.lua
    lua_draw_hook_pre main
    TEXT
    
     -- INDEX use search|find with: -- ### sonething ###
    
     -- ### CLOCK POSITION - AND DEFAULTS ###
     -- ### SET BORDER OPTIONS FOR "CLOCKS" ### -- I don't know how to remove this - NOT NEEDED
     --     See lines 39 to 41 for overall size changes
     -- ### START DIAL B ### Day Names Dial ###
     --     See Lines 77 - 79 and 145 for changes
     -- ### START DIAL C ### Month Names Dial ###
     --     See Lines 143 -145 and 192 for changes
     -- ### START DIAL D ### Day Numbers Dial ###
     --     See Lines 226 & 257 for  changes
     -- ### START CLOCK A ###
     --     See Lines  &  and 456 & 483 changes
     -- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
     -- CLOCK A HOUR HAND
     -- CLOCK A MINUTE HAND SETUP
     -- CLOCK A SECOND HAND SETUP
     -- PART SECOND HAND Lines: 503 519, 531
    
    NOTE:  Putting ### CLOCK A ### last insures that it's functions are written
           over the other dials.
    ]]
    
    require 'cairo'
     -- ### CLOCK POSITION - AND DEFAULTS ##########################################
    local init={
    center_x=153, --from 135 = +40
    center_y=153, --from 135
    radius=140,
    lang="Spanish", -- English French Greek Spanish
    hour=12, -- 12 | 24
    second=true, --true | false - Seconds: dots and numbers IF 12HR
    line=true, -- true | false - Part Second Hand
    handday=false, -- DAY NAME hand - true or false
    --handdaynum=false, -- DAY NUMBER hand - true or false
    handmonth=false, -- MONTH NAME hand - true or false
    color=0xFF0000, --color for day, day number and month IF NO SECOND HAND
    alpha=1 --alpha for day, day number and month IF NO SECOND HAND
    }
    
     -- ONLY NEED ONE COPY OF THIS FUNCTION
    function rgb_to_r_g_b(col,alp)
      return ((col / 0x10000) % 0x100) / 255, ((col / 0x100) % 0x100) / 255, (col % 0x100) / 255, alp
    end
    local colr, colg, colb, cola=rgb_to_r_g_b(init.color,init.alpha)
    
    function conky_main()
    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 extents=cairo_text_extents_t:create()
    tolua.takeownership(extents)
    
     -- ### CLOCK 12|24 HR SELECTOR ############################
    local clock_type_A=init.hour
     -- ############################ CLOCK 12|24 HR SELECTOR ###
    
     -- ### SET BORDER OPTIONS FOR "CLOCKS" ####################
    --local clock_border_width=0
     -- set color and alpha for clock border
    --local cbr,cbg,cbb,cba=1,1,1,1 -- full opaque white
     -- gap from clock border to minute marks
    local b_to_m=0
     -- #################### SET BORDER OPTIONS FOR "CLOCKS" ###
    
     -- ### START DIAL B ### Day Names Dial ####################
     -- DIAL POSITION
    local center_x=init.center_x
    local center_y=init.center_y
    local radius=42
     -- FONT
    cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, 14)
     -- TABLE OF TEXT -- in order
    if init.lang == "English" then text_days={"Sun","Mon","Tue","Wed","Thr","Fri","Sat",} end
    if init.lang == "French" then text_days={"dim","lun","mar","mer","jeu","ven","sam",} end
    if init.lang == "Greek" then text_days={"ΔΕΥ","ΤΡΙ","ΤΕΤ","ΠΕΜ","ΠΑΡ","ΣΑΒ","ΚΥΡ",} end
    if init.lang == "Spanish" then text_days={"dom","lun","mar","mie","jue","vie","sab",} end
    
    local day_number=tonumber(os.date("%w"))
    if init.handday == true then
      for i=1,7 do
     -- work out points
        local point=(math.pi/180)*((360/7)*(i-1))
        local x=0+radius*(math.sin(point))
        local y=0-radius*(math.cos(point))
     -- CALCULATE CENTRE OF TEXT
        local text=text_days[i]--gets text from table
        cairo_text_extents(cr,text,extents)
        local width=extents.width
        local height=extents.height
        cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
        cairo_show_text (cr, text)
        cairo_stroke (cr)
      end
    else
      for i=1,7 do -- working out points
        if day_number == i-1 then
          cairo_set_source_rgba (cr,0,1,1,1) -- active colour
        else
          cairo_set_source_rgba (cr,1,1,1,0.05) -- non-active day names
        end
        local point=(math.pi/180)*((360/7)*(i-1))
        local x=0+radius*(math.sin(point))
        local y=0-radius*(math.cos(point))
     -- CALCULATE CENTRE OF TEXT
        local text=text_days[i]--gets text from table
        cairo_text_extents(cr,text,extents)
        local width=extents.width
        local height=extents.height
        cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
        cairo_show_text (cr, text)
        cairo_stroke (cr)
      end
     -- INNER POINTS POSITION, radius smaller than text circle
      local radius=27
      for i=1,7 do
        if day_number == i-1 then
          cairo_set_source_rgba (cr,0,1,1,1) -- active colour
        else
          cairo_set_source_rgba (cr,1,1,1,0.05) -- non-active
        end
        local point=(math.pi/180)*((360/7)*(i-1))
        local x=0+radius*(math.sin(point))
        local y=0-radius*(math.cos(point))
        cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
        cairo_stroke (cr)
      end
    end
     -- ######################################### END DIAL B ###
    
     -- ### START DIAL C ### Month Names Dial ##################
     -- DIAL POSITION
    local center_x=init.center_x --(+85)
    local center_y=init.center_y
    local radius=73
     -- FONT
    cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, 14)
     -- TABLE OF TEXT -- in order
    if init.lang == "English" then text_days={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",} end
    if init.lang == "French" then text_days={"jan","fév","mar","avr","mai","jui","jul","aôu","sep","oct","nov","déc",} end
    if init.lang == "Greek" then text_days={"ΙΑΝ","ΦΕΒ","ΜΑΡ","ΑΠΡ","ΜΑΙ","ΙΟΥ","ΙΟΥ","ΑΥΓ","ΣΕΠ","ΟΚΤ","ΝΟΕ","ΔΕΚ",} end
    if init.lang == "Spanish" then text_days={"ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",} end
    
    local this_month=tonumber(os.date("%m"))
    if init.handmonth == true then
      for i=1,12 do
     -- OUTER POINTS POSTION FOR -- ### START DIAL D ## TEXT
        local point=(math.pi/180)*((360/12)*(i-1))
        local x=0+radius*(math.sin(point))
        local y=0-radius*(math.cos(point))
     -- CALCULATE CENTRE OF TEXT
        local text=text_days[i]--gets text from table
        cairo_text_extents(cr,text,extents)
        local width=extents.width
        local height=extents.height
        cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
        cairo_show_text (cr, text)
        cairo_stroke (cr)
      end
    else
      for i=1,12 do
        if this_month == i then
          cairo_set_source_rgba (cr,0,1,1,1) -- active month colour
        else
          cairo_set_source_rgba (cr,1,1,1,0.05) -- non-active month names
        end
     -- OUTTER POINTS POSTION FOR TEXT
        local point=(math.pi/180)*((360/12)*(i-1))
        local x=0+radius*(math.sin(point))
        local y=0-radius*(math.cos(point))
     -- CALCULATE CENTRE OF TEXT
        local text=text_days[i]--gets text from table
        cairo_text_extents(cr,text,extents)
        local width=extents.width
        local height=extents.height
        cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
        cairo_show_text (cr, text)
        cairo_stroke (cr)
      end
     -- INNER POINTS POSITION, radius smaller than text circle
      local radius=58
      for i=1,12 do
        if this_month == i then
          cairo_set_source_rgba (cr,0,1,1,1) -- active colour
    	 else
          cairo_set_source_rgba (cr,1,1,1,0.05) -- non-active month names
        end
        local point=(math.pi/180)*((360/12)*(i-1))
        local x=0+radius*(math.sin(point))
        local y=0-radius*(math.cos(point))
        cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
        cairo_stroke (cr)
      end
    end
     -- ######################################### END DIAL C ###
    
     -- ### START DIAL D ### Day Numbers Dial ##################
     -- GET NUMBER OF DAYS IN CURRENT MONTH
     -- calculate Feb, then set up table
    year4num=os.date("%Y")
    t1=os.time({year=year4num,month=03,day=01,hour=00,min=0,sec=0});
    t2=os.time({year=year4num,month=02,day=01,hour=00,min=0,sec=0});
    if init.hour == 12 then
      febdaynum=tonumber((os.difftime(t1,t2))/(12*60*60))
    else
      febdaynum=tonumber((os.difftime(t1,t2))/(24*60*60))
    end
     -- MONTH TABLE
    monthdays={31,febdaynum,31,30,31,30,31,31,30,31,30,31}
    this_month=tonumber(os.date("%m"))
    number_days=monthdays[this_month]
     -- TEXT positioning DAY #'s
    local center_x=init.center_x
    local center_y=init.center_y
    local radius=105
    cairo_select_font_face (cr, "Liquid Crystal", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    cairo_set_font_size (cr, 20)
    local this_day=tonumber(os.date("%d"))
      for i=1,number_days do
     -- OUTTER POINTS POSTION FOR TEXT
        local point=(math.pi/180)*((360/number_days)*(i-1))
        local x=0+radius*(math.sin(point))
        local y=0-radius*(math.cos(point))
     -- CALCULATE CENTRE OF TEXT
        --only print even numbers
        if math.mod(i, 2) == 0 and math.mod(this_day, 2)==0 then
        text=string.format("%02d",i) --formats numbers to double digits
        elseif math.mod(i, 2) ~= 0 and math.mod(this_day, 2)~=0 then
        text=string.format("%02d",i) --formats numbers to double digits
        else
        text=""
        end --odd even matching
        cairo_text_extents(cr,text,extents)
        local width=extents.width
        local height=extents.height
    	if i==this_day then
         cairo_set_source_rgba (cr,0,1,1,1) -- active colour
    	else
    	cairo_set_source_rgba (cr,1,1,1,0.35) -- dim inactive numbers
    	end
         cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
         cairo_show_text (cr, text)
         cairo_stroke (cr)
      end
     -- INNER POINTS POSITION, radius smaller than text circle
      local radius=90
      for i=1,number_days do
        local point=(math.pi/180)*((360/number_days)*(i-1))
        local x=0+radius*(math.sin(point))
        local y=0-radius*(math.cos(point))
    	if i==this_day then
         cairo_set_source_rgba (cr,0,1,1,1) -- active colour
    	else
    	cairo_set_source_rgba (cr,1,1,1,0.35) -- dim the points
    	end
        cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
        cairo_stroke (cr)
      end
     -- ######################################### END DIAL D ###
    
     -- ### START CLOCK A ######################################
     -- SET MARKS ###
     -- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
    local number_marks_A=init.hour
     -- set mark length
    local m_length_A=0 -- doesn't work but can't delete
     -- set mark width
    local m_width_A=0 -- doesn't work but can't delete
     -- set mark line cap type
    local m_cap=CAIRO_LINE_CAP_ROUND
     -- set mark color and alpha,red blue green alpha
    local mr,mg,mb,ma=1,1,1,0 -- opaque white -- doesn't work but can't delete
     -- SETUP HOUR HANDS ###
     -- CLOCK A HOUR HAND
    hh_length_A=90
     -- set hour hand width
    hh_width_A=4
     -- set hour hand line cap
    hh_cap=CAIRO_LINE_CAP_ROUND
     -- set hour hand color
     -- hhr,hhg,hhb,hha=1,0,1,0 -- fully opaque white --doesn't work
     -- SETUP MINUTE HANDS ###
     -- CLOCK A MINUTE HAND SETUP
     -- set length of minute hand
    mh_length_A=123
     -- set minute hand width
    mh_width_A=2
     -- set minute hand line cap
    mh_cap=CAIRO_LINE_CAP_ROUND
     -- set minute hand color
    --mhr,mhg,mhb,mha=1,1,1,0.5 -- fully opaque white --doesn't work
    
     -- SETUP SECOND HAND ###
     -- CLOCK A SECOND HAND SETUP -- DOESN'T WORK - Why ???????????????????????????
     -- set length of seconds hand -- yes I know it is commented out!
    --sh_length_A=150
     -- set hour hand width
    --sh_width_A=2
     -- set hour hand line cap
    --sh_cap=CAIRO_LINE_CAP_ROUND
     -- set seconds hand color
    --shr,shg,shb,sha=1,0,0,1 -- fully opaque red
    
     -- PART SECOND HAND
    --position
    --get seconds value
    local seconds=tonumber(os.date("%S"))
    --calculate rotation of second hand in degrees
    if init.line == true then
      local arc=(math.pi/180)*((360/60)*seconds)
      --calculate point 1
      local radius1=120
      local x1=0+radius1*math.sin(arc)
      local y1=0-radius1*math.cos(arc)
      --calculate point 2
      local radius2=130
      local x2=0+radius2*math.sin(arc)
      local y2=0-radius2*math.cos(arc)
      --draw line connecting points
      cairo_move_to (cr, center_x+x1,center_y+y1)
      cairo_line_to (cr, center_x+x2, center_y+y2)
      cairo_set_source_rgba (cr,255/255,0/255,0/255,1) -- PART SECOND HAND
      cairo_stroke (cr)
    end
    
     -- CLOCK A ### 12 HR TIME ###
     -- CLOCK SETTINGS
    clock_radius=0 --does not work
    clock_centerx=init.center_x -- centre of Clock hands
    clock_centery=init.center_y -- centre of Clock hands
     -- DRAWING CODE
     -- DRAW MARKS
     -- stuff that can be moved outside of the loop, needs only be set once
     -- calculate end and start radius for marks
    m_end_rad=clock_radius-b_to_m
    m_start_rad=m_end_rad-m_length_A -- WHAT IS THIS??
     -- set line cap type
    cairo_set_line_cap  (cr, m_cap)
     -- set line width
    cairo_set_line_width (cr,m_width_A)
     -- set color and alpha for marks
    cairo_set_source_rgba (cr,mr,mg,mb,ma)
     -- START LOOP FOR HOUR MARKS
    for i=1,number_marks_A do
     -- drawing code using the value of i to calculate degrees
     -- calculate start point for 12/24 hour mark
    radius=m_start_rad
    point=(math.pi/180)*((i-1)*(360/number_marks_A))
    x=0+radius*(math.sin(point))
    y=0-radius*(math.cos(point))
     -- set start point for line
    cairo_move_to (cr,clock_centerx+x,clock_centery+y)
     -- calculate end point for 12/24 hour mark
    radius=m_end_rad
    point=(math.pi/180)*((i-1)*(360/number_marks_A))
    x=0+radius*(math.sin(point))
    y=0-radius*(math.cos(point))
     -- set path for line
    cairo_line_to (cr,clock_centerx+x,clock_centery+y)
     -- draw the line
    cairo_stroke (cr)
    end -- of for loop
     -- HOUR MARKS -- ???????????????????????????????????????????????????????????????
     -- TIME CALCULATIONS CLOCK A
    if clock_type_A==12 then
    hours=tonumber(os.date("%I"))
     -- convert hours to seconds
    h_to_s=hours*60*60
    elseif clock_type_A==24 then
    hours=tonumber(os.date("%H"))
     -- convert hours to seconds
    h_to_s=hours*60*60
    end
    minutes=tonumber(os.date("%M"))
     -- convert minutes to seconds
    m_to_s=minutes*60
     -- get current seconds
    seconds=tonumber(os.date("%S"))
     -- DRAW HOUR HAND ###
     -- get hours minutes seconds as just seconds
    hsecs=h_to_s+m_to_s+seconds
     -- calculate degrees for each second
    hsec_degs=hsecs*(360/(60*60*clock_type_A)) -- use equation ~ eliminate decimals
     -- set radius to calculate hand points
    radius=hh_length_A
     -- set start line coordinates, the center of the circle
    cairo_move_to (cr,clock_centerx,clock_centery)
     -- calculate coordinates for end of hour hand
    point=(math.pi/180)*hsec_degs
    x=0+radius*(math.sin(point))
    y=0-radius*(math.cos(point))
     -- describe the line we will draw
    cairo_line_to (cr,clock_centerx+x,clock_centery+y)
     -- set up line attributes and draw line
    cairo_set_line_width (cr,hh_width_A)
    cairo_set_source_rgba (cr,0,1,1,0.7) -- active colour Hour Hand ================
    cairo_set_line_cap  (cr, hh_cap)
    cairo_stroke (cr)
     -- DRAW MINUTE HAND
     -- get minutes and seconds just as seconds
    msecs=m_to_s+seconds
     -- calculate degrees for each second
    msec_degs=msecs*0.1
     -- set radius to calculate hand points
    radius=mh_length_A
     -- set start line coordinates, the center of the circle
    cairo_move_to (cr,clock_centerx,clock_centery)
     -- calculate coordinates for end of minute hand
    point=(math.pi/180)*msec_degs
    x=0+radius*(math.sin(point))
    y=0-radius*(math.cos(point))
     -- describe the line we will draw
    cairo_line_to (cr,clock_centerx+x,clock_centery+y)
     -- set up line attributes and draw line
    cairo_set_line_width (cr,mh_width_A)
    cairo_set_source_rgba (cr,0,1,1,0.7) -- active colour Minute Hand ==============
    cairo_set_line_cap  (cr, mh_cap)
    cairo_stroke (cr)
     -- ### CLOCK A ###
    local center_x=init.center_x -- Centre of the HR / Min Numbers
    local center_y=init.center_y -- Centre of the HR / Min Numbers
    local radius=init.radius -- 12/24 HR CLOCK Hours/Minutes radius -- seeline 42
    cairo_select_font_face (cr, "DS-Digital", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    cairo_set_font_size (cr, 22)
    cairo_set_source_rgba (cr,1,1,1,1.0) -- HR Clock numbers
     -- TABLE OF TEXT -- in order
    if init.hour == 12 then
      text_days={"12","01","02","03","04","05","06","07","08","09","10","11",}
      for i=1,12 do
     -- OUTTER POINTS POSTION FOR TEXT
        local point=(math.pi/180)*((360/12)*(i-1))
        local x=0+radius*(math.sin(point))
        local y=0-radius*(math.cos(point))
     -- CALCULATE CENTRE OF TEXT
        local text=text_days[i]--gets text from table
        cairo_text_extents(cr,text,extents)
        local width=extents.width
        local height=extents.height
        cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
        cairo_show_text (cr, text)
        cairo_set_source_rgba (cr,1,1,1,1.0) -- colour of HR Numbers
        cairo_stroke (cr)
      end
     -- INNER POINTS POSITION, radius smaller than text circle
      local radius=124 -- 12 HR Clock
      for i=1,12 do
        local point=(math.pi/180)*((360/12)*(i-1))
        local x=0+radius*(math.sin(point))
        local y=0-radius*(math.cos(point))
        cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
        cairo_set_source_rgba (cr,1,1,1,0.50)
        cairo_stroke (cr)
      end
    end
    if init.hour == 24 then
      text_days={"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23",}
      for i=1,24 do
     -- OUTTER POINTS POSTION FOR TEXT
        local point=(math.pi/180)*((360/24)*(i-1))
        local x=0+radius*(math.sin(point))
        local y=0-radius*(math.cos(point))
     -- CALCULATE CENTRE OF TEXT
        local text=text_days[i]--gets text from table
        cairo_text_extents(cr,text,extents)
        local width=extents.width
        local height=extents.height
        cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
        cairo_show_text (cr, text)
        cairo_stroke (cr)
      end
     -- INNER POINTS POSITION, radius smaller than text circle
      local radius=124 -- 24 HR Clock
      for i=1,24 do
        local point=(math.pi/180)*((360/24)*(i-1))
        local x=0+radius*(math.sin(point))
        local y=0-radius*(math.cos(point))
        cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
        cairo_set_source_rgba (cr,1,1,1,0.4)
        cairo_stroke (cr)
      end
    end
    
     -- ############################################################################
     -- POSITION FOR TEXT HOUR NUMBERS
      if init.hour == 12 and init.second == true then
        text_days={"","01","02","03","04","","06","07","08","09","","11","12","13","14","","16","17","18","19","","21","22","23","24","","26","27","28","29","","31","32","33","34","","36","37","38","39","","41","42","43","44","","46","47","48","49","","51","52","53","54","","56","57","58","59","",}
     -- INNER POINTS POSITION, radius smaller than text circle
        cairo_set_source_rgba (cr,1,1,1,0.2) -- does not work -- settings moved
        cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
        for i=1,60 do
          local radius=124 -- dots for seconds Clock A (12 dial)
          local point=(math.pi/180)*((360/60)*(i-1))
          local x=0+radius*(math.sin(point))
          local y=0-radius*(math.cos(point))
          if seconds == i-1 then
            cairo_set_source_rgba (cr,255/255,0/255,0/255,0.05) -- does not work - settings moved
          else
            if i-1 == 0 or i-1 == 5 or i-1 == 10 or i-1 == 15 or i-1 == 25 or i-1 == 30 or i-1 == 35 or i-1 == 40 or i-1 == 45 or i-1 == 50 or i-1 == 55 then
              cairo_set_source_rgba (cr,0,1,1,1) -- active colour
            else
              cairo_set_source_rgba (cr,0,1,1,0.45) -- dots for seconds A Clock
            end
          end
          cairo_arc (cr,center_x+x,center_y+y,1/2,0,2*math.pi)
          cairo_stroke (cr)
        end
        radius=radius-3
        cairo_set_font_size (cr, 10)
        for i=1,60 do
     -- OUTTER POINTS POSTION FOR TEXT
          local point=(math.pi/180)*((360/60)*(i-1))
          local x=0+radius*(math.sin(point))
          local y=0-radius*(math.cos(point))
     -- CALCULATE CENTRE OF TEXT
          local text=text_days[i]--gets text from table
          if seconds == tonumber(text) then
          cairo_set_source_rgba (cr,0,1,1,1.0) -- active colour
          else
            cairo_set_source_rgba (cr,1,1,1,0.5) -- seconds numbers
          end
          cairo_text_extents(cr,text,extents)
          local width=extents.width
          local height=extents.height
          cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
          cairo_show_text (cr, text)
          cairo_stroke (cr)
        end
      end
     -- ############################################################################
    cairo_stroke (cr)
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    end -- end main function
    draw-bg.lua
    Code:
    --[[Background originally by londonali1010 (2009)
        ability to set any size for background mrpeachy 2011
        ability to set variables for bg in conkyrc dk75
    
      the change is that if you set width and/or height to 0
      then it assumes the width and/or height of the conky window
    
    so:
    
    Above and After TEXT  (requires a composite manager or it blinks!)
    
     lua_load ~/wea_conky/draw_bg.lua
     TEXT
     ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}
    
    OR Both above TEXT (no composite manager required - no blinking!)
    
     lua_load ~/wea_conky/draw_bg.lua
     lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
     TEXT
    
    Note
    ${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
      See below:        1  2 3 4 5 6        7
    
    ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
    
    covers the whole window and will change if you change the minimum_size setting
    
    1 = 20             corner_radius
    2 = 0             x_position
    3 = 0             y_position
    3 = 0             width
    5 = 0             height
    6 = 0x000000      color
    7 = 0.4           alpha
    
    ######### calendar function ##################################################
    
    then to use it, you activate the calendar function BELOW TEXT like this
    
    ${lua luacal {settings}}
    
    #${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}
    #    x=x position top left
    #    y=y position top left
    #    tf=title font, eg "mono" must be in quotes
    #    tfs=title font size
    #    tc=title color
    #    ta=title alpha
    #    bf=body font, eg "mono" must be in quotes
    #    bfs=body font size
    #    bc=body color
    #    ba=body alpha
    #    hf=highlight font, eg "mono" must be in quotes
    #    hfs=highlight font size
    #    hc=highlight color
    #    ha=highlight alpha
    #    sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts
    
    #    gt=gap from title to body
    #    gh=gap horizontal between columns
    #    gv=gap vertical between rows
    #    sd=start day, 0=Sun, 1=Mon
    
    #    hstyle = heading style, 0=just days, 1=date insert
    #    tdf=title date font, eg "mono" must be in quotes
    #    tdfs=title date font size
    #    tdc=title date color
    #    tda=title date alpha
    
    # test line
    -- ${lua luacal {x=10,y=100,tf="Purisa",tfs=24,tc=0xf67e16,ta=1,bf="First Order",bfs=26,bc=0xecd32a,ba=1,hf="Purisa",hfs=18,hc=0xf67e16,ha=1,sp=" ",gh=40,gt=25,gv=20,sd=0,hstyle=1,tdf="First Order",tdfs=28,tdc=0xff0000,tda=1}}
    
    
    ]]
    
    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)
    w=w
    h=h
    if w=="0" then w=tonumber(conky_window.width) end
    if h=="0" then h=tonumber(conky_window.height) end
    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
    -- ###### calendar function ##################################################
    function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}
    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)
    --############################################################################
    if caltab.x==nil then
    caltab=loadstring("return" .. caltab)()
    end
    local cal_x=caltab.x
    local cal_y=caltab.y
    local tfont=caltab.tf        or "mono"
    local tfontsize=caltab.tfs    or 12
    local tc=caltab.tc        or 0xffffff
    local ta=caltab.ta        or 1
    local bfont=caltab.bf        or "mono"
    local bfontsize=caltab.bfs    or 12
    local bc=caltab.bc        or 0xffffff
    local ba=caltab.ba        or 1
    local hfont=caltab.hf        or "mono"
    local hfontsize=caltab.hfs    or 12
    local hc=caltab.hc        or 0xff0000
    local ha=caltab.ha        or 1
    local spacer=caltab.sp        or " "
    local gaph=caltab.gh        or 20
    local gapt=caltab.gt        or 15
    local gapl=caltab.gv        or 15
    local sday=caltab.sd        or 0
    local hstyle=caltab.hstyle    or 0
    --convert colors
    --local font=string.gsub(font,"_"," ")
    local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)
    --main body text color
    local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
    --highlight text color
    local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
    --############################################################################
    --calendar calcs
    local year=os.date("%G")
    local today=tonumber(os.date("%d"))
    local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
    local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
    local feb=(os.difftime(t1,t2))/(24*60*60)
    local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
    local day=tonumber(os.date("%w"))+1-sday
    local day_num = today
    local remainder=day_num % 7
    local start_day=day-(day_num % 7)
    if start_day<0 then start_day=7+start_day end
    local month=os.date("%m")
    local mdays=monthdays[tonumber(month)]
    local x=mdays+start_day
    local dnum={}
    local dnumh={}
    if mdays+start_day<36 then
    dlen=35
    plen=29
    else
    dlen=42
    plen=36
    end
    for i=1,dlen do
        if i<=start_day then
        dnum[i]="  "
        else
        dn=i-start_day
            if dn=="nil" then dn=0 end
            if dn<=9 then dn=(spacer .. dn) end
            if i>x then dn="" end
            dnum[i]=dn
            dnumh[i]=dn
            if dn==(spacer .. today) or dn==today then
            dnum[i]=""
            end
            if dn==(spacer .. today) or dn==today then
            dnumh[i]=dn
            place=i
            else dnumh[i]="  "
            end
        end
    end--for
    cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tfontsize);
    cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
    local extents=cairo_text_extents_t:create()
    tolua.takeownership(extents)
    if hstyle==0 then
        if tonumber(sday)==0 then
        dys={"SU","MO","TU","WE","TH","FR","SA"}
        else
        dys={"MO","TU","WE","TH","FR","SA","SU"}
        end
        --draw calendar titles
    elseif hstyle==1 then
        if tonumber(sday)==0 then
        dys={"SU","MO"," ","  ","  ","FR","SA"}
        cairo_text_extents(cr,"MO",extents)
        local s=extents.x_advance+gaph
        local f=gaph*5
        local tdfont=caltab.tdf        or "mono"
        local tdfontsize=caltab.tdfs    or 12
        local tdc=caltab.tdc        or 0xffffff
        local tda=caltab.tda        or 1
        cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
        cairo_set_font_size (cr, tdfontsize);
        local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
        cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
        local insert=os.date("%b %y")
        cairo_text_extents(cr,insert,extents)
        local w=extents.x_advance
        cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
        cairo_show_text (cr,insert)
        cairo_stroke (cr)
        else
        dys={"MO","TU"," ","  ","  ","SA","SU"}
        cairo_text_extents(cr,"TU",extents)
        local s=extents.x_advance+gaph
        local f=gaph*5
        local tdfont=caltab.tdf        or "mono"
        local tdfontsize=caltab.tdfs    or 12
        local tdc=caltab.tdc        or 0xffffff
        local tda=caltab.tda        or 1
        cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
        cairo_set_font_size (cr, tdfontsize);
        local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
        cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
        local insert=os.date("%b %y")
        cairo_text_extents(cr,insert,extents)
        local w=extents.x_advance
        cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
        cairo_show_text (cr,insert)
        cairo_stroke (cr)
        end
    end
    --draw calendar titles
    for i=1,7 do
    cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tfontsize);
    cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
    cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
    cairo_show_text (cr, dys[i])
    cairo_stroke (cr)
    end
    --draw calendar body
    cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, bfontsize);
    cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
    for i=1,plen,7 do
    local fn=i
        for i=fn,fn+6 do
        cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
        cairo_show_text (cr, dnum[i])
        cairo_stroke (cr)
        end
    end
    --highlight
    cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, hfontsize);
    cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
    for i=1,plen,7 do
    local fn=i
        for i=fn,fn+6 do
        cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
        cairo_show_text (cr, dnumh[i])
        cairo_stroke (cr)
        end
    end
    --############################################################################
    caltab=nil
    dlen=nil
    plen=nil
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    return ""
    end-- end main function#######################################################
    Last edited by Sector11; December 1st, 2012 at 01:15 AM.

  2. #21192
    Join Date
    Jun 2012
    Beans
    0

    Re: Post your .conkyrc files w/ screenshots

    Hi Sector11;
    You never stop ! That's great and your work too; I think I'm in now...
    I've seen the work of the beautifull "swiss watches"...hum...The Abu Yahya (abuyahya)ones!
    I'm trying stuffs too in convert to apply sphérical filter on a square sat map like that:
    http://pix.toile-libre.org/upload/or...1354527687.png
    ciao
    Edit: Do you know how to change opacity "alpha" settings for the hands in the Abu Yahya clocks ?
    Thanks
    Last edited by ragamatrix; December 3rd, 2012 at 02:28 PM. Reason: values alpha

  3. #21193
    Join Date
    Aug 2011
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by ragamatrix View Post
    Edit: Do you know how to change opacity "alpha" settings for the hands in the Abu Yahya clocks ?
    Thanks
    You can change the alpha settings for the clocks by editing the settings that end in "alpha" (like saucer_fg_alpha) in the table_setting section.
    I don't remember what each one does so you might need to try a few of them until you find the one you want.
    Building Conky | iCalendar Conky | Weather Script | Background List
    Intel Core i7-2600K - 3.40GHz | Asus P8Z68-V LE | 8GB RAM - 1866 MHz | Nvidia GeForce GTX 560 Ti

  4. #21194
    Join Date
    Jun 2012
    Beans
    0

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by arclance View Post
    You can change the alpha settings for the clocks by editing the settings that end in "alpha" (like saucer_fg_alpha) in the table_setting section.
    I don't remember what each one does so you might need to try a few of them until you find the one you want.
    Thanks !

  5. #21195
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by ragamatrix View Post
    Edit: Do you know how to change opacity "alpha" settings for the hands in the Abu Yahya clocks ?
    Thanks
    My latest with abuyahya revolutionary clock + a touch of v9000:



    Abu Yahya includes a text file, "c_n_s_explanation.txt" that explains every aspect of the file. The hands are the "handle_" parts.

    Add that to what arclance said and you're good to go.

  6. #21196
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Modified the above:

    When you live on a rock there are certain things you need to know.
    --> like: time, weather and computer stuff!

    Bunch of people to thank for this,


    An extremely interesting clock!

    conky:
    Code:
    # killall conky && conky -c /media/5/Conky/jed_greyclock_conkyrc &
    # from jed
    # — Conky settings — #
    
    background yes
    
    update_interval 1
    #total_run_times 0
    #net_avg_samples 2
    
    override_utf8_locale yes
    
    double_buffer yes
    no_buffers yes
    
    text_buffer_size 256
    imlib_cache_size 0
    
    
    # — Window specifications — #
    own_window_type normal #override
    own_window_class Conky
    own_window yes
    own_window_transparent yes
    own_window_hints undecorated,below,skip_taskbar,skip_pager
    
    border_inner_margin 0
    border_outer_margin 0
    
    minimum_size 600 840
    maximum_width 460
    
    alignment br
    gap_x 10
    gap_y 30
    
    
    
    # — Graphics settings — #
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders no
    
    # — Text settings — #
    use_xft yes
    xftfont DS\-Digital:size=12
    xftalpha 1.0
    
    default_color 227992 ##dark red A84C47 ##opaque white FFFFFF
    default_shade_color gray
    default_outline_color black
    
    color0 8FBC8F #143 188 143	DarkSeaGreen
    color1 778899 #119 136 153	LightSlateGray
    color2 FF8C00 #255 140   0	DarkOrange
    color3 7FFF00 #127 255   0	Chartreuse
    color4 FFA07A #255 160 122	LightSalmon
    color5 FFDEAD #255 222 173	NavajoWhite
    color6 00BFFF #  0 191 255	DeepSkyBlue
    color7 00FFFF #  0 255 255	Cyan
    color8 FFFF00 #255 255   0	Yellow
    color9 B22222 #178  34  34	FireBrick
    
    uppercase no
    use_spacer right
    
    # — Lua Load — #
    lua_load /media/5/Conky/LUA/greyclock.lua
    lua_draw_hook_post main
    lua_load ~/v9000/v9000.lua
    lua_draw_hook_pre weather
    lua_load /media/5/Conky/LUA/chrono-full_jed.template.lua
    #lua_load /media/5/Conky/LUA/crono_full_2.template.lua
    lua_load /media/5/Conky/LUA/draw-bg.lua
    
    TEXT
    ${lua conky_draw_bg 30 0 0 0 0 0x000000 0.5}
    chrono-full_jed.template.lua - now modified
    Code:
    --[[
     The latest script is a lua only weather script. aka: v9000
     http://crunchbang.org/forums/viewtopic.php?id=16100
    
     the file:
     http://dl.dropbox.com/u/19008369/weatheragain9000.lua.tar.gz
    
     mrppeachys LUA Tutorial
     http://crunchbang.org/forums/viewtopic.php?id=17246
    ]]
    _G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
    --these tables hold the coordinates for each repeat do not edit #########
    top_left_x_coordinate={}--###############################################
    top_left_y_coordinate={}--###############################################
    --#######################################################################
    --SET DEFAULTS ##########################################################
    --set defaults do not localise these defaults if you use a seperate display script
    default_font="monofur"--font must be in quotes
    default_font_size=16
    default_color=0xffffff	--white
    default_alpha=1		--fully opaque
    default_image_width=50
    default_image_height=50
    -- ## New Options ###
    default_face="bold"
    -- "normal" for normal/normal
    -- "bold" for normal/bold
    -- "italic" for italic/normal
    -- "bolditalic" for italic/bold
    --END OF DEFAULTS #######################################################
    --START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
    
    --[[ forecast
    datay=450  --375
    datayy=15 --datay+(datayy*1)
    
    datafx1=20
    
    imgx=35
    imgy=575
    imgyy=60 -- imgy+(imgyy*1)
    ]]
    -- forecast
    datay=450
    datayy=15 --datay+(datayy*1)
    
    datafx1=20
    
    imgx=45
    imgy=575
    imgyy=60 -- imgy+(imgyy*1)
    
    ih=60
    iw=60
    -- ======================================================================
    -- SUN & MOON RISE ------------------------------------------------------
       out({c=0xFAFAEC,a=1,x=10,y=25,txt="Sunrise"})
          out({c=0xFAFAEC,a=1,x=20,y=40,txt=sun_rise_24[1]})
       out({c=0xC0C0C0,a=1,x=382,y=25,txt="Moonrise"})
          out({c=0xC0C0C0,a=1,x=392,y=40,txt=moon_rise_24[1]})
    -- SUN & MOON SET -------------------------------------------------------
       out({c=0xFAFAEC,a=1,x=10,y=410,txt="Sunset"})
          out({c=0xFAFAEC,a=1,x=15,y=425,txt=sun_set_24[1]})
       out({c=0xC0C0C0,a=1,x=382,y=410,txt="Moonset"})
          out({c=0xC0C0C0,a=1,x=392,y=425,txt=moon_set_24[1]})
    -- ======================================================================
    -- MOON PHASE - CENTRE --------------------------------------------------
       image({x=170,y=170,w=120,h=120,file=moon_icon[1]})
    -- image({x=170,y=170,w=120,h=120,file="/media/5/Conky/images/red+.png"})
       out({c=0xFFFFFF,a=1.0,x=190,y=235,txt=moon_phase[1]})
    
    -- ======================================================================
    -- CURRENT FOR TODAY - SEE TOP LEFT -------------------------------------
       image({x=110,y=100,w=60,h=60,file=now["weather_icon"]})
    -- image({x=110,y=100,w=60,h=60,file="/media/5/Conky/images/red+.png"})
       out({c=0xFAFAEC,a=1,x=120,y=100,txt="T "})
          out({c=0xFF8C00,fs=14,a=1,x=135,y=100,txt=now["temp"].."°"})
       out({c=0xC0C0C0,a=1,x=120,y=170,txt="± "})
          out({c=0xC0C0C0,fs=14,a=1,x=135,y=170,txt=now["feels_like"].."°"})
    
    -- FORECAST TODAY - SEE TOP RIGHT ---------------------------------------
       image({x=285,y=100,w=60,h=60,file=weather_icon[1]})
    -- image({x=285,y=100,w=60,h=60,file="/media/5/Conky/images/red+.png"})
       out({c=0xFF8C00,fs=14,a=1,x=295,y=100,txt="↑"})
         out({c=0xFF8C00,fs=14,a=1,x=305,y=100,txt=high_temp[1].."°"})
       out({c=0xC0C0C0,fs=14,a=1,x=295,y=170,txt="↓"})
         out({c=0xC0C0C0,fs=14,a=1,x=305,y=170,txt=low_temp[1].."°"})
    
    -- ======================================================================
    -- WIND INFORMATION - SEE BOTTOM ----------------------------------------
       image({x=185,y=290,w=90,h=90,file=now["wind_icon"]})
    -- image({x=185,y=290,w=90,h=90,file="/media/5/Conky/images/red+.png"})
       out({c=0xffffff,a=0.5,x=158,y=341,txt=now["wind_deg"]})
       out({c=0xffffff,a=0.5,x=273,y=341,txt=now["wind_nesw"]})
    --   out({c=0xffffff,a=1,x=333,y=295,txt="@"})
          out({c=0xffffff,a=0.5,x=200,y=390,txt=now["wind_km"].."3"})
    
    -- ======================================================================
    -- BOTTOM LEFT
    -- Barometric Pressure
       out({c=0xFAFAEC,a=1,x=30,y=450,txt=" BP:"})
    	out({c=0xC0C0C0,a=1,x=60,y=450,txt=now["pressure_mb"].." mb"})
    -- Humidity -------------------------------------------------------------
       out({c=0xFAFAEC,a=1,x=90,y=495,txt="Hum:"})
          out({c=0xC0C0C0,a=1,x=135,y=495,txt=now["humidity"].."%"})
    -- Dew Point ------------------------------------------------------------
       out({c=0xFAFAEC,a=1,x=90,y=520,txt="DP:"})
          out({c=0xC0C0C0,a=1,x=135,y=520,txt=now["dew_point"].."°"})
    -- ======================================================================
    -- BOTTOM RIGHT
    -- Ceiling
    -- out({c=0xFAFAEC,a=1,x=265,y=315,txt="Ceil:"})
    --    out({c=0x227992,a=1,x=300,y=315,txt=now["ceiling"]})
    -- Chance of Rain -------------------------------------------------------
       out({c=0xFAFAEC,a=1,x=270,y=495,txt="Rain:"})
          out({c=0xC0C0C0,a=1,x=325,y=495,txt=precipitation[1].."%"})
    -- Cloud Cover
       out({c=0xFAFAEC,a=1,x=270,y=520,txt="Cloud:"})
          out({c=0xC0C0C0,a=1,x=325,y=520,txt=cloud_cover[1].."%"})
    -- ======================================================================
    -- BOTTOM CENTRE
    -- UV -------------------------------------------------------------------
    out({c=0xFAFAEC,a=1,x=330,y=450,txt="UV:"})
       out({c=0xC0C0C0,a=1,x=360,y=450,txt=uv_index_num[1]})
          out({c=0xC0C0C0,a=1,x=380,y=450,txt=uv_index_txt[1]})
    
    -- ======================================================================
    -- FORECAST FOR NEXT 3 HOURS --------------------------------------------
    -- image({x=5,y=353,w=340,h=2,file="/media/5/Conky/images/LightSlateGrey_1.png"})
    --out({c=0x227992,a=1,f="Arial",fs=16,x=10,y=448,txt="Next 3 Hours"})
    -- out({c=0x227992,a=1,f="Arial",fs=16,x=35,y=463,txt="Hours"})
    -- 1st hour
    out({c=0xFF9600,x=31,y=470,txt=now["fc_hour1_time_24"]..":00"})
      image({w=60,h=60,x=20,y=475,file=now["fc_hour1_wicon"]})
    -- image({w=60,h=60,x=20,y=475,file="/media/5/Conky/images/red+.png"})
    out({c=0xAFAFAF,x=40,y=550,txt=now["fc_hour1_temp"] .."°"})
    -- 2nd hour
    out({c=0xFF9600,x=212,y=470,txt=now["fc_hour2_time_24"]..":00"})
      image({w=60,h=60,x=200,y=475,file=now["fc_hour2_wicon"]})
    -- image({w=60,h=60,x=200,y=475,file="/media/5/Conky/images/red+.png"})
    out({c=0xAFAFAF,x=221,y=550,txt=now["fc_hour2_temp"] .."°"})
    -- 3rd hour
    out({c=0xFF9600,x=392,y=470,txt=now["fc_hour3_time_24"]..":00"})
      image({w=60,h=60,x=380,y=475,file=now["fc_hour3_wicon"]})
    -- image({w=60,h=60,x=380,y=475,file="/media/5/Conky/images/red+.png"})
    out({c=0xAFAFAF,x=401,y=550,txt=now["fc_hour3_temp"] .."°"})
    
    -- ======================================================================
    -- FORECAST for the next 9 days
    -- Forecast day 2 -- x = l|r  y = u|d
    out({c=0x9ACD32,a=1,x=datafx1*0.4,y=datay+(datayy*8),txt=forecast_day_short[2]})
     out({c=0x9ACD32,a=1,x=datafx1*2.4,y=datay+(datayy*8),txt=forecast_date[2]})
      out({c=0x9ACD32,a=1,x=datafx1*4.0,y=datay+(datayy*8),txt=forecast_month_short[2]})
    image({w=iw,h=ih,x=imgx*0.6,y=imgy,file=weather_icon[2]})
    -- image({w=iw,h=ih,x=imgx*0.6,y=imgy,file="/media/5/Conky/images/red+.png"})
    out({c=0xFF8C00,a=1,x=datafx1*0.4,y=datay+(datayy*9.5),txt=high_temp[2]})
    out({c=0x00BFFF,a=1,x=datafx1*0.4,y=datay+(datayy*11),txt=low_temp[2]})
     out({c=0xFAFAEC,a=1,x=datafx1*4.6,y=datay+(datayy*9.0),txt=sun_rise_24[2]})
     out({c=0xFAFAEC,a=1,x=datafx1*4.6,y=datay+(datayy*10.1),txt=sun_set_24[2]})
      out({c=0xC0C0C0,a=1,x=datafx1*4.6,y=datay+(datayy*11.5),txt=moon_rise_24[2]})
      out({c=0xC0C0C0,a=1,x=datafx1*4.6,y=datay+(datayy*12.5),txt=moon_set_24[2]})
    -- Forecast day 3 -- x = l|r  y = u|d
    out({c=0x9ACD32,a=1,x=datafx1*8.3,y=datay+(datayy*8),txt=forecast_day_short[3]})
     out({c=0x9ACD32,a=1,x=datafx1*10.5,y=datay+(datayy*8),txt=forecast_date[3]})
      out({c=0x9ACD32,a=1,x=datafx1*12.2,y=datay+(datayy*8),txt=forecast_month_short[3]})
    image({w=iw,h=ih,x=imgx*4.15,y=imgy,file=weather_icon[3]})
    -- image({w=iw,h=ih,x=imgx*4.15,y=imgy,file="/media/5/Conky/images/red+.png"})
    out({c=0xFF8C00,a=1,x=datafx1*8.2,y=datay+(datayy*9.5),txt=high_temp[3]})
    out({c=0x00BFFF,a=1,x=datafx1*8.2,y=datay+(datayy*11),txt=low_temp[3]})
     out({c=0xFAFAEC,a=1,x=datafx1*12.6,y=datay+(datayy*9.0),txt=sun_rise_24[3]})
     out({c=0xFAFAEC,a=1,x=datafx1*12.6,y=datay+(datayy*10.1),txt=sun_set_24[3]})
      out({c=0xC0C0C0,a=1,x=datafx1*12.6,y=datay+(datayy*11.5),txt=moon_rise_24[3]})
      out({c=0xC0C0C0,a=1,x=datafx1*12.6,y=datay+(datayy*12.5),txt=moon_set_24[3]})
    -- Forecast day 4 -- x = l|r  y = u|d
    out({c=0x9ACD32,a=1,x=datafx1*16.0,y=datay+(datayy*8),txt=forecast_day_short[4]})
     out({c=0x9ACD32,a=1,x=datafx1*18.1,y=datay+(datayy*8),txt=forecast_date[4]})
      out({c=0x9ACD32,a=1,x=datafx1*19.8,y=datay+(datayy*8),txt=forecast_month_short[4]})
    image({w=iw,h=ih,x=imgx*7.52,y=imgy,file=weather_icon[4]})
    -- image({w=iw,h=ih,x=imgx*7.52,y=imgy,file="/media/5/Conky/images/red+.png"})
    out({c=0xFF8C00,a=1,x=datafx1*15.8,y=datay+(datayy*9.5),txt=high_temp[4]})
    out({c=0x00BFFF,a=1,x=datafx1*15.8,y=datay+(datayy*11),txt=low_temp[4]})
     out({c=0xFAFAEC,a=1,x=datafx1*20.3,y=datay+(datayy*9.0),txt=sun_rise_24[4]})
     out({c=0xFAFAEC,a=1,x=datafx1*20.3,y=datay+(datayy*10.1),txt=sun_set_24[4]})
      out({c=0xC0C0C0,a=1,x=datafx1*20.3,y=datay+(datayy*11.5),txt=moon_rise_24[4]})
      out({c=0xC0C0C0,a=1,x=datafx1*20.3,y=datay+(datayy*12.5),txt=moon_set_24[4]})
    -- ======================================================================
    -- Forecast day 5 -- x = l|r  y = u|d
      out({c=0x9ACD32,a=1,x=datafx1*0.4,y=datay+(datayy*14.5),txt=forecast_day_short[5]})
       out({c=0x9ACD32,a=1,x=datafx1*2.4,y=datay+(datayy*14.5),txt=forecast_date[5]})
        out({c=0x9ACD32,a=1,x=datafx1*4.0,y=datay+(datayy*14.5),txt=forecast_month_short[5]})
      image({w=iw,h=ih,x=imgx*0.6,y=imgy+(imgyy*1.6),file=weather_icon[5]})
    --  image({w=iw,h=ih,x=imgx*0.6,y=imgy+(imgyy*1.6),file="/media/5/Conky/images/red+.png"})
      out({c=0xFF8C00,a=1,x=datafx1*0.4,y=datay+(datayy*16.2),txt=high_temp[5]})
      out({c=0x00BFFF,a=1,x=datafx1*0.4,y=datay+(datayy*17.7),txt=low_temp[5]})
       out({c=0xFAFAEC,a=1,x=datafx1*4.6,y=datay+(datayy*15.5),txt=sun_rise_24[5]})
       out({c=0xFAFAEC,a=1,x=datafx1*4.6,y=datay+(datayy*16.6),txt=sun_set_24[5]})
        out({c=0xC0C0C0,a=1,x=datafx1*4.6,y=datay+(datayy*18.0),txt=moon_rise_24[5]})
        out({c=0xC0C0C0,a=1,x=datafx1*4.6,y=datay+(datayy*18.9),txt=moon_set_24[5]})
    -- Forecast day 6 -- x = l|r  y = u|d
      out({c=0x9ACD32,a=1,x=datafx1*8.3,y=datay+(datayy*14.5),txt=forecast_day_short[6]})
       out({c=0x9ACD32,a=1,x=datafx1*10.5,y=datay+(datayy*14.5),txt=forecast_date[6]})
        out({c=0x9ACD32,a=1,x=datafx1*12.2,y=datay+(datayy*14.5),txt=forecast_month_short[6]})
      image({w=iw,h=ih,x=imgx*4.18,y=imgy+(imgyy*1.6),file=weather_icon[6]})
    --  image({w=iw,h=ih,x=imgx*4.18,y=imgy+(imgyy*1.6),file="/media/5/Conky/images/red+.png"})
      out({c=0xFF8C00,a=1,x=datafx1*8.2,y=datay+(datayy*16.2),txt=high_temp[6]})
      out({c=0x00BFFF,a=1,x=datafx1*8.2,y=datay+(datayy*17.7),txt=low_temp[6]})
      out({c=0xFAFAEC,a=1,x=datafx1*12.6,y=datay+(datayy*15.5),txt=sun_rise_24[6]})
      out({c=0xFAFAEC,a=1,x=datafx1*12.6,y=datay+(datayy*16.6),txt=sun_set_24[6]})
      out({c=0xC0C0C0,a=1,x=datafx1*12.6,y=datay+(datayy*18.0),txt=moon_rise_24[6]})
      out({c=0xC0C0C0,a=1,x=datafx1*12.6,y=datay+(datayy*18.9),txt=moon_set_24[6]})
    -- Forecast day 7 -- x = l|r  y = u|d
      out({c=0x9ACD32,a=1,x=datafx1*16.0,y=datay+(datayy*14.5),txt=forecast_day_short[7]})
       out({c=0x9ACD32,a=1,x=datafx1*18.1,y=datay+(datayy*14.5),txt=forecast_date[7]})
        out({c=0x9ACD32,a=1,x=datafx1*19.8,y=datay+(datayy*14.5),txt=forecast_month_short[7]})
      image({w=iw,h=ih,x=imgx*7.49,y=imgy+(imgyy*1.6),file=weather_icon[7]})
    --  image({w=iw,h=ih,x=imgx*7.49,y=imgy+(imgyy*1.6),file="/media/5/Conky/images/red+.png"})
      out({c=0xFF8C00,a=1,x=datafx1*15.8,y=datay+(datayy*16.2),txt=high_temp[7]})
      out({c=0x00BFFF,a=1,x=datafx1*15.8,y=datay+(datayy*17.7),txt=low_temp[7]})
      out({c=0xFAFAEC,a=1,x=datafx1*20.3,y=datay+(datayy*15.5),txt=sun_rise_24[7]})
      out({c=0xFAFAEC,a=1,x=datafx1*20.3,y=datay+(datayy*16.6),txt=sun_set_24[7]})
      out({c=0xC0C0C0,a=1,x=datafx1*20.3,y=datay+(datayy*18.0),txt=moon_rise_24[7]})
      out({c=0xC0C0C0,a=1,x=datafx1*20.3,y=datay+(datayy*18.9),txt=moon_set_24[7]})
    -- ======================================================================
    -- Forecast day 8 -- x = l|r  y = u|d
        out({c=0x9ACD32,a=1,x=datafx1*0.4,y=datay+(datayy*21),txt=forecast_day_short[8]})
         out({c=0x9ACD32,a=1,x=datafx1*2.5,y=datay+(datayy*21),txt=forecast_date[8]})
          out({c=0x9ACD32,a=1,x=datafx1*4.2,y=datay+(datayy*21),txt=forecast_month_short[8]})
        image({w=iw,h=ih,x=imgx*0.6,y=imgy+(imgyy*3.2),file=weather_icon[8]})
    --    image({w=iw,h=ih,x=imgx*0.6,y=imgy+(imgyy*3.2),file="/media/5/Conky/images/red+.png"})
        out({c=0xFF8C00,a=1,x=datafx1*0.4,y=datay+(datayy*22.5),txt=high_temp[8]})
        out({c=0x00BFFF,a=1,x=datafx1*0.4,y=datay+(datayy*24),txt=low_temp[8]})
        out({c=0xFAFAEC,a=1,x=datafx1*4.6,y=datay+(datayy*21.9),txt=sun_rise_24[8]})
        out({c=0xFAFAEC,a=1,x=datafx1*4.6,y=datay+(datayy*22.9),txt=sun_set_24[8]})
        out({c=0xC0C0C0,a=1,x=datafx1*4.6,y=datay+(datayy*24.4),txt=moon_rise_24[8]})
        out({c=0xC0C0C0,a=1,x=datafx1*4.6,y=datay+(datayy*25.4),txt=moon_set_24[8]})
    -- Forecast day 9 -- x = l|r  y = u|d
        out({c=0x9ACD32,a=1,x=datafx1*8.3,y=datay+(datayy*21),txt=forecast_day_short[9]})
         out({c=0x9ACD32,a=1,x=datafx1*10.5,y=datay+(datayy*21),txt=forecast_date[9]})
          out({c=0x9ACD32,a=1,x=datafx1*12.2,y=datay+(datayy*21),txt=forecast_month_short[9]})
        image({w=iw,h=ih,x=imgx*4.14,y=imgy+(imgyy*3.2),file=weather_icon[9]})
    --    image({w=iw,h=ih,x=imgx*4.14,y=imgy+(imgyy*3.2),file="/media/5/Conky/images/red+.png"})
        out({c=0xFF8C00,a=1,x=datafx1*8.2,y=datay+(datayy*22.5),txt=high_temp[9]})
        out({c=0x00BFFF,a=1,x=datafx1*8.2,y=datay+(datayy*24),txt=low_temp[9]})
         out({c=0xFAFAEC,a=1,x=datafx1*12.6,y=datay+(datayy*21.9),txt=sun_rise_24[9]})
         out({c=0xFAFAEC,a=1,x=datafx1*12.6,y=datay+(datayy*22.9),txt=sun_set_24[9]})
          out({c=0xC0C0C0,a=1,x=datafx1*12.6,y=datay+(datayy*24.4),txt=moon_rise_24[9]})
          out({c=0xC0C0C0,a=1,x=datafx1*12.6,y=datay+(datayy*25.4),txt=moon_set_24[9]})
    -- Forecast day 10 -- x = l|r  y = u|d
        out({c=0x9ACD32,a=1,x=datafx1*16.0,y=datay+(datayy*21),txt=forecast_day_short[10]})
         out({c=0x9ACD32,a=1,x=datafx1*18.1,y=datay+(datayy*21),txt=forecast_date[10]})
          out({c=0x9ACD32,a=1,x=datafx1*19.8,y=datay+(datayy*21),txt=forecast_month_short[10]})
        image({w=iw,h=ih,x=imgx*7.55,y=imgy+(imgyy*3.2),file=weather_icon[10]})
    --    image({w=iw,h=ih,x=imgx*7.55,y=imgy+(imgyy*3.2),file="/media/5/Conky/images/red+.png"})
        out({c=0xFF8C00,a=1,x=datafx1*15.8,y=datay+(datayy*22.5),txt=high_temp[10]})
        out({c=0x00BFFF,a=1,x=datafx1*15.8,y=datay+(datayy*24),txt=low_temp[10]})
         out({c=0xFAFAEC,a=1,x=datafx1*20.3,y=datay+(datayy*21.9),txt=sun_rise_24[10]})
         out({c=0xFAFAEC,a=1,x=datafx1*20.3,y=datay+(datayy*22.9),txt=sun_set_24[10]})
          out({c=0xC0C0C0,a=1,x=datafx1*20.3,y=datay+(datayy*24.4),txt=moon_rise_24[10]})
          out({c=0xC0C0C0,a=1,x=datafx1*20.3,y=datay+(datayy*25.4),txt=moon_set_24[10]})
    
    --#######################################################################
    --END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
    --#######################################################################
    end--of weather_display function do not edit this line ##################
    --#######################################################################
    what I call: greyclock.lua - a modified version of: cups_n_saucers.lua
    Code:
    --==============================================================================
    --  				Cups and Saucers
    --                               Lua conky script
    --
    --  author  : Abu Yahya (abuyahya) - http://tiny.cc/whbpow
    --  license : Distributed under the terms of GNU GPL v3
    --  30.05.2012
    -- v.1.0.1
    --==============================================================================
    -- got this from jed who said some striiped the above info
    -- I put it back in - Thanks to abuyahya for a nice clock.
    -- greyclock.lua
    
    require 'cairo'
    --------------------------------------------------------------------------------
    ----Adjustable Settings
    coffee_table = {
    			-- HOUR HAND
    	{
    	name='time',					arg='%I.%M',
    	max_value=12,					x=230,	y=230,
    
    	cup_radius=112,				cup_wall_thickness=90,
    	cup_bg_clr=0xFFFFFF,			cup_bg_alpha=0.0,
    	cup_fg_clr=0xFFFFFF,			cup_fg_alpha=0.0,
    
    	handle_length=70,				handle_circ=5,
    	handle_fg_clr=0xFFFFFF,			handle_fg_alpha=0.6,
    
    	graduation_radius=184,			graduation_thickness=8,
    	graduation_mark_circ=1.5,		graduation_mark_angle=30,
    	graduation_fg_clr=0xFFFFFF,		graduation_fg_alpha=0.5,
    
    	saucer_thickness=6,				thick_saucer_circ=11/12,
    	saucer_radius=195,				thin_saucer_circ=11/12,
    	saucer_fg_clr=0xFFFFFF,			saucer_fg_alpha=0.3,
    	saucer_mark_fg_clr=0xFFFFFF,		saucer_mark_fg_alpha=0.0,
    	inner_saucer=true,
    
    	txt_weight=0,					txt_size=8.0,
    	txt_fg_clr=0xFFFFFF,			txt_fg_alpha=0.0,
    	caption='',					caption2='',
    	},
    			-- DOT IN CENTRE
       {
    	name='time',					arg='%H',
    	max_value=12,					x=230,	y=230,
    
    	cup_radius=2,					cup_wall_thickness=3,
    	cup_bg_clr=0xFFFFFF,			cup_bg_alpha=0.0,
    	cup_fg_clr=0xFFFFFF,			cup_fg_alpha=0.0,
    
    	handle_length=40,				handle_circ=4,
    	handle_fg_clr=0xFFFFFF,			handle_fg_alpha=0.0,
    
    	graduation_radius=187,			graduation_thickness=1,
    	graduation_mark_circ=0.5,		graduation_mark_angle=3,
    	graduation_fg_clr=0xFFFFFF,		graduation_fg_alpha=0.5,
    
    	saucer_thickness=6,				thick_saucer_circ=11/12,
    	saucer_radius=195,				thin_saucer_circ=11/12,
    	saucer_fg_clr=0xFFFFFF,			saucer_fg_alpha=0.0,
    	saucer_mark_fg_clr=0xFFFFFF,		saucer_mark_fg_alpha=0.0,
    	inner_saucer=true,
    
    	txt_weight=0,					txt_size=8.0,
    	txt_fg_clr=0xFFFFFF,			txt_fg_alpha=0.0,
    	caption='',					caption2='',
    	},
    			-- MINUTE HAND
    	{
    	name='time',					arg='%M',
    	max_value=60,					x=230,	y=230,
    
    	cup_radius=118,				cup_wall_thickness=120,
    	cup_bg_clr=0xFFFFFF,			cup_bg_alpha=0.0,
    	cup_fg_clr=0xFFFFFF,			cup_fg_alpha=0.0,
    
    	handle_length=110,				handle_circ=3,
    	handle_fg_clr=0xFFFFFF,			handle_fg_alpha=0.6,
    
    	graduation_radius=183,			graduation_thickness=10,
    	graduation_mark_circ=2.5,		graduation_mark_angle=90,
    	graduation_fg_clr=0xFFFFFF,		graduation_fg_alpha=0.5,
    
    	saucer_thickness=6,				thick_saucer_circ=11/12,
    	saucer_radius=220,				thin_saucer_circ=11/12,
    	saucer_fg_clr=0xFFFFFF,			saucer_fg_alpha=0.3,
    	saucer_mark_fg_clr=0xFFFFFF,		saucer_mark_fg_alpha=0.0,
    	inner_saucer=true,
    
    	txt_weight=0,					txt_size=8.0,
    	txt_fg_clr=0xFFFFFF,			txt_fg_alpha=0.0,
    	caption='',					caption2='',
    	},
    			-- SECOND HAND
    	{
    	name='time',					arg='%S',
    	max_value=60,					x=230,	y=230,
    
    	cup_radius=120,				cup_wall_thickness=120,
    	cup_bg_clr=0xFFFFFF,			cup_bg_alpha=0.0,
    	cup_fg_clr=0xFFFFFF,			cup_fg_alpha=0.0,
    
    	handle_length=118,				handle_circ=1,
    	handle_fg_clr=0xFFFFFF,			handle_fg_alpha=0.5,
    
    	graduation_radius=185,			graduation_thickness=6,
    	graduation_mark_circ=0.5,		graduation_mark_angle=6,
    	graduation_fg_clr=0xFFFFFF,		graduation_fg_alpha=0.5,
    
    	saucer_thickness=5,				thick_saucer_circ=1,
    	saucer_radius=205,				thin_saucer_circ=11/12,
    	saucer_fg_clr=0xFFFFFF,			saucer_fg_alpha=0.4,
    	saucer_mark_fg_clr=0xFFFFFF,		saucer_mark_fg_alpha=0.4,
    	inner_saucer=true,
    
    	txt_weight=0,					txt_size=8.0,
    	txt_fg_clr=0xFFFFFF,			txt_fg_alpha=0.0,
    	caption='',					caption2='',
    	},
    			-- CPU CIRCLE - TOP
    	{
    	name='cpu',					arg='cpu0',
    	max_value=100,					x=350,	y=230,
    
    	cup_radius=20,					cup_wall_thickness=40,
    	cup_bg_clr=0xFFFFFF,			cup_bg_alpha=0.0,
    	cup_fg_clr=0xFFFFFF,			cup_fg_alpha=0.0,
    	cup_start_angle=0,
    
    	handle_fg_clr=0xFFFFFF,			handle_fg_alpha=0.0,
    	handle_length=40,				handle_circ=4,
    
    	graduation_radius=35,			graduation_thickness=3,
    	graduation_mark_circ=2,			graduation_mark_angle=36,
    	graduation_fg_clr=0xFFFFFF,		graduation_fg_alpha=0.6,
    
    	saucer_thickness=6,				thick_saucer_circ=0.85,
    	saucer_radius=40,				thin_saucer_circ=0.85,
    	saucer_fg_clr=0xFFFFFF,			saucer_fg_alpha= 0.3,
    	saucer_mark_fg_clr=0xFFFFFF,		saucer_mark_fg_alpha=0.5,
    	inner_saucer=true,
    
    	xtxt=-20,						ytxt= -12,
    	txt_weight=0,					txt_size=10.0,
    	txt_fg_clr=0xFFFFFF,			txt_fg_alpha=0.8,
    	caption='CPU ',				caption2=' %',
    	},
    --[[ -- BOTTOM RIGHT - LEFT OF WIND!
        {
        name='cpu',					arg='cpu1',
        max_value=100,					x=120,	y=320,
    
        cup_radius=20,					cup_wall_thickness=40,
        cup_bg_clr=0xFFFFFF,				cup_bg_alpha=0.0,
        cup_fg_clr=0xFFFFFF,				cup_fg_alpha=0.0,
        cup_start_angle=0,
    
        handle_fg_clr=0xFFFFFF,			handle_fg_alpha=0.0,
        handle_length=40,				handle_circ=4,
    
        xtxt=-20,						ytxt= -8,
        txt_weight=0,					txt_size=8.0,
        txt_fg_clr=0xFFFFFF,				txt_fg_alpha=0.8,
        caption=' 1 ',					caption2=' %',
    
        graduation_radius=25,			graduation_thickness=3,
        graduation_mark_circ=2,			graduation_mark_angle=36,
        graduation_fg_clr=0xFFFFFF,		graduation_fg_alpha=0.6,
    
        saucer_thickness=3,				thick_saucer_circ=0.85,
        saucer_radius=30,				thin_saucer_circ=0.85,
        saucer_fg_clr=0xFFFFFF,			saucer_fg_alpha= 0.3,
        saucer_mark_fg_clr=0xFFFFFF,		saucer_mark_fg_alpha=0.5,
        inner_saucer=true,
        },
    
        {
        name='cpu',					arg='cpu2',
        max_value=100,					x=120,	y=320,
    
        cup_radius=20,					cup_wall_thickness=40,
        cup_bg_clr=0xFFFFFF,				cup_bg_alpha=0.0,
        cup_fg_clr=0xFFFFFF,				cup_fg_alpha=0.0,
        cup_start_angle=0,
    
        handle_fg_clr=0xFFFFFF,			handle_fg_alpha=0.0,
        handle_length=40,				handle_circ=4,
    
        xtxt=-20,						ytxt= 3,
        txt_weight=0,					txt_size=8.0,
        txt_fg_clr=0xFFFFFF,				txt_fg_alpha=0.8,
        caption=' 2 ',					caption2=' %',
    
        graduation_radius=25,			graduation_thickness=3,
        graduation_mark_circ=2,			graduation_mark_angle=36,
        graduation_fg_clr=0xFFFFFF,		graduation_fg_alpha=0.6,
    
        saucer_thickness=3,				thick_saucer_circ=0.85,
        saucer_radius=30,				thin_saucer_circ=0.85,
        saucer_fg_clr=0xFFFFFF,			saucer_fg_alpha= 0.3,
        saucer_mark_fg_clr=0xFFFFFF,		saucer_mark_fg_alpha=0.5,
        inner_saucer=true,
        },
    
        {
        name='cpu',					arg='cpu3',
        max_value=100,					x=120,	y=320,
    
        cup_radius=20,					cup_wall_thickness=40,
        cup_bg_clr=0xFFFFFF,				cup_bg_alpha=0.0,
        cup_fg_clr=0xFFFFFF,				cup_fg_alpha=0.0,
        cup_start_angle=0,
    
        handle_fg_clr=0xFFFFFF,			handle_fg_alpha=0.0,
        handle_length=40,				handle_circ=4,
    
        xtxt=-20,						ytxt= 14,
        txt_weight=0,					txt_size=8.0,
        txt_fg_clr=0xFFFFFF,				txt_fg_alpha=0.8,
        caption=' 3 ',					caption2=' %',
    
        graduation_radius=25,			graduation_thickness=3,
        graduation_mark_circ=2,			graduation_mark_angle=36,
        graduation_fg_clr=0xFFFFFF,		graduation_fg_alpha=0.6,
    
        saucer_thickness=3,				thick_saucer_circ=0.85,
        saucer_radius=30,				thin_saucer_circ=0.85,
        saucer_fg_clr=0xFFFFFF,			saucer_fg_alpha= 0.3,
        saucer_mark_fg_clr=0xFFFFFF,		saucer_mark_fg_alpha=0.5,
        inner_saucer=true,
        },
    ]]
    
    			-- CPU CIRCLE - TOP
    	{
    	name='freq_g',					arg='/',
    	max_value=5,					x=350,	y=230,
    
    	cup_radius=12,					cup_wall_thickness=23,
    	cup_bg_clr=0xFFFFFF,			cup_bg_alpha=0.0,
    	cup_fg_clr=0xFFFFFF,			cup_fg_alpha=0.0,
    	cup_start_angle=0,
    
    	handle_fg_clr=0xFFFFFF,			handle_fg_alpha=0.0,
    	handle_length=40,				handle_circ=4,
    
    	graduation_radius=25,			graduation_thickness=6,
    	graduation_mark_circ=4,			graduation_mark_angle=30,
    	graduation_fg_clr=0xFFFFFF,		graduation_fg_alpha=0.0,
    
    	saucer_thickness=6,				thick_saucer_circ=0.75,
    	saucer_radius=45,				thin_saucer_circ=0.75,
    	saucer_fg_clr=0xFFFFFF,			saucer_fg_alpha= 0.3,
    	saucer_mark_fg_clr=0xFFFFFF,		saucer_mark_fg_alpha=0.5,
    	inner_saucer=true,
    
    	xtxt=-20,						ytxt= 0,
    	txt_weight=0,					txt_size=10.0,
    	txt_fg_clr=0xFFFFFF,			txt_fg_alpha=0.8,
    	caption='',					caption2=' GHz',
    	},
    			-- CPU CIRCLE - TOP
    	{
    	name='hwmon',					arg='temp 1',
    	max_value=100,					x=350,	y=230,
    
    	cup_radius=12,					cup_wall_thickness=23,
    	cup_bg_clr=0xFFFFFF,			cup_bg_alpha=0.0,
    	cup_fg_clr=0xFFFFFF,			cup_fg_alpha=0.0,
    	cup_start_angle=0,
    
    	handle_fg_clr=0xFFFFFF,			handle_fg_alpha=0.0,
    	handle_length=40,				handle_circ=4,
    
    	graduation_radius=35,			graduation_thickness=6,
    	graduation_mark_circ=2,			graduation_mark_angle=36,
    	graduation_fg_clr=0xFFFFFF,		graduation_fg_alpha=0.6,
    
    	saucer_thickness=6,				thick_saucer_circ=0.85,
    	saucer_radius=40,				thin_saucer_circ=0.85,
    	saucer_fg_clr=0xFFFFFF,			saucer_fg_alpha= 0.3,
    	saucer_mark_fg_clr=0xFFFFFF,		saucer_mark_fg_alpha=0.5,
    	inner_saucer=true,
    
    	xtxt=-15,						ytxt= 12,
    	txt_weight=0,					txt_size=10.0,
    	txt_fg_clr=0xFFFFFF,			txt_fg_alpha=0.8,
    	caption='',					caption2=' ºC',
    	},
    			-- RAM CIRCLE
    	{
    	name='memperc',				arg='/',
    	max_value=100,					x=230,	y=105,
    
    	cup_radius=12,					cup_wall_thickness=23,
    	cup_bg_clr=0xFFFFFF,			cup_bg_alpha=0.0,
    	cup_fg_clr=0xFFFFFF,			cup_fg_alpha=0.0,
    	cup_start_angle=0,
    
    	handle_fg_clr=0xFFFFFF,			handle_fg_alpha=0.0,
    	handle_length=40,				handle_circ=4,
    
    	graduation_radius=35,			graduation_thickness=6,
    	graduation_mark_circ=2,			graduation_mark_angle=36,
    	graduation_fg_clr=0xFFFFFF,		graduation_fg_alpha=0.6,
    
    	saucer_thickness=6,				thick_saucer_circ=0.85,
    	saucer_radius=40,				thin_saucer_circ=0.85,
    	saucer_fg_clr=0xFFFFFF,			saucer_fg_alpha= 0.3,
    	saucer_mark_fg_clr=0xFFFFFF,		saucer_mark_fg_alpha=0.5,
    	inner_saucer=true,
    
    	xtxt=-25,						ytxt=0,
    	txt_weight=0,					txt_size=10.0,
    	txt_fg_clr=0xFFFFFF,			txt_fg_alpha=0.8,
    	caption='RAM ',				caption2=' %',
    },
    			-- MEMORY CIRCLE
    {
    	name='fs_used_perc',			arg='/home',
    	max_value=100,					x=105,	y=230,
    
    	cup_radius=12,					cup_wall_thickness=27,
    	cup_bg_clr=0xFFFFFF,			cup_bg_alpha=0.0,
    	cup_fg_clr=0xFFFFFF,			cup_fg_alpha=0.0,
    	cup_start_angle=0,
    
    	handle_fg_clr=0xFFFFFF,			handle_fg_alpha=0.0,
    	handle_length=40,				handle_circ=4,
    
    	graduation_radius=35,			graduation_thickness=6,
    	graduation_mark_circ=2,			graduation_mark_angle=36,
    	graduation_fg_clr=0xFFFFFF,		graduation_fg_alpha=0.6,
    
    	saucer_thickness=6,				thick_saucer_circ=0.85,
    	saucer_radius=40,				thin_saucer_circ=0.85,
    	saucer_fg_clr=0xFFFFFF,			saucer_fg_alpha=0.3,
    	saucer_mark_fg_clr=0xFFFFFF,		saucer_mark_fg_alpha=0.5,
    	inner_saucer=true,
    
    	xtxt=-30,						ytxt= 12,
    	txt_weight=0,					txt_size=10.0,
    	txt_fg_clr=0xFFFFFF,			txt_fg_alpha=0.8,
    	caption=' FS H: ',				caption2=' %',
    },
    			-- MEMORY CIRCLE
    {
    	name='fs_used_perc',			arg='/',
    	max_value=100,					x=105,	y=230,
    
    	cup_radius=12,					cup_wall_thickness=27,
    	cup_bg_clr=0xFFFFFF,			cup_bg_alpha=0.0,
    	cup_fg_clr=0xFFFFFF,			cup_fg_alpha=0.0,
    	cup_start_angle=0,
    
    	handle_fg_clr=0xFFFFFF,			handle_fg_alpha=0.0,
    	handle_length=40,				handle_circ=4,
    
    	graduation_radius=25,			graduation_thickness=4,
    	graduation_mark_circ=4,			graduation_mark_angle=36,
    	graduation_fg_clr=0xFFFFFF,		graduation_fg_alpha=0.0,
    
    	saucer_thickness=6,				thick_saucer_circ=0.85,
    	saucer_radius=45,				thin_saucer_circ=0.85,
    	saucer_fg_clr=0xFFFFFF,			saucer_fg_alpha=0.3,
    	saucer_mark_fg_clr=0xFFFFFF,		saucer_mark_fg_alpha=0.5,
    	inner_saucer=true,
    
    	xtxt=-30,						ytxt= -5,
    	txt_weight=0,					txt_size=10.0,
    	txt_fg_clr=0xFFFFFF,			txt_fg_alpha=0.8,
    	caption=' FS /: ',				caption2=' %',
    	},
    }
    
    --Fixed code -do not edit unless you know what you are doing------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    -- converts color in hexa to decimal
    function rgb_to_r_g_b(clr, alpha)
    	return ((clr / 0x10000) % 0x100) / 255., ((clr / 0x100) % 0x100) / 255., (clr % 0x100) / 255., alpha
    end
    -------------------------------------------------------------------------------
    ------------------------------------------------------------------------
    local function draw_coffee_table(display, data, value)
    	 max_value = data['max_value']
    	 x, y = data['x'], data['y']
    	 if x==nil then x=conky_window.width/2 end
    	 if y==nil then y=conky_window.height/2 end
    	 cup_radius = data['cup_radius']
    	 if cup_radius==nil then cup_radius=conky_window.width/4 end
    	 cup_wall_thickness = data['cup_wall_thickness']
    	 if cup_wall_thickness==nil then cup_wall_thickness=20 end
    	 handle_length, handle_circ = data['handle_length'], data['handle_circ']
    	 if handle_length==nil then handle_length=20 end
    	 if handle_circ==nil then handle_circ=1 end
    	 cup_start_angle = data['cup_start_angle']
    	 if cup_start_angle == nil then cup_start_angle =0 end
    	 total_angle = data['total_angle']
    	 if total_angle == nil then total_angle=360 end
    	 cup_sector_angle = (math.abs(total_angle))/max_value
    	 cup_end_angle = total_angle + cup_start_angle
    	 cup_bg_clr, cup_bg_alpha = data['cup_bg_clr'], data['cup_bg_alpha']
    	 if cup_bg_clr==nil then cup_bg_clr =0xffffff end
    	 cup_fg_clr, cup_fg_alpha = data['cup_fg_clr'], data['cup_fg_alpha']
    	 if cup_fg_clr==nil then cup_fg_clr =0xffffff end
    	 if cup_fg_alpha==nil then cup_fg_alpha=0 end
    	 handle_fg_clr, handle_fg_alpha = data['handle_fg_clr'], data['handle_fg_alpha']
    	 if handle_fg_clr==nil then handle_fg_clr = 0xffffff end
    	 if handle_fg_alpha==nil then handle_fg_alpha=0 end
    
    	 saucer_radius = data['saucer_radius']
    	 if saucer_radius==nil then saucer_radius=conky_window.width/2 end
    	 total_saucer_angle=data['total_saucer_angle']
    	 if total_saucer_angle==nil then total_saucer_angle=360 end
    	 saucer_sector_angle=(math.abs(total_saucer_angle))/max_value
    	 saucer_thickness = data['saucer_thickness']
    	 if saucer_thickness==nil then saucer_thickness=6 end
    	 saucer_fg_clr = data['saucer_fg_clr']
    	 if saucer_fg_clr ==nil then saucer_fg_clr=0 end
    	 saucer_fg_alpha = data['saucer_fg_alpha']
    	 if saucer_fg_alpha ==nil then saucer_fg_alpha=0 end
    
    	 saucer_mark_fg_alpha = data['saucer_mark_fg_alpha']
    	 if saucer_mark_fg_alpha ==nil then saucer_mark_fg_alpha=0 end
    	 saucer_mark_fg_clr = data['saucer_mark_fg_clr']
    	 if saucer_mark_fg_clr ==nil then saucer_mark_fg_clr=0xffffff end
    	 thick_saucer_circ = data['thick_saucer_circ']
    	 if thick_saucer_circ==nil then thick_saucer_circ =0.9 end
    	 thin_saucer_circ = data['thin_saucer_circ']
    	 if thin_saucer_circ==nil then thin_saucer_circ =0.9 end
    	 inner_saucer = data['inner_saucer']
    
    	 graduation_radius = data['graduation_radius']
    	 if graduation_radius ==nil then graduation_radius = conky_window.width/3 end
    	 graduation_thickness, graduation_mark_circ = data['graduation_thickness'], data['graduation_mark_circ']
    	 if graduation_thickness ==nil then graduation_thickness = 2 end
    	 if graduation_mark_circ ==nil then graduation_mark_circ = 1 end
    	 graduation_mark_angle = data['graduation_mark_angle']
    	 if graduation_mark_angle == nil then graduation_mark_angle = total_angle/10 end
    	 graduation_fg_clr, graduation_fg_alpha = data['graduation_fg_clr'], data['graduation_fg_alpha']
    	 if graduation_fg_clr ==nil then graduation_fg_clr= 0xffffff end
    	 if graduation_fg_alpha==nil then graduation_fg_alpha =0 end
    
    
    	 txt_weight, txt_size = data['txt_weight'], data['txt_size']
    	 if txt_weight == nil then txt_weight=1 end
    	 if txt_size == nil then txt_size=8 end
    	 txt_fg_clr, txt_fg_alpha = data['txt_fg_clr'], data['txt_fg_alpha']
    	 if txt_fg_clr ==nil then txt_fg_clr= 0xffffff end
    	 if txt_fg_alpha==nil then txt_fg_alpha =0 end
    	 caption = data['caption']
    	 if caption==nil then caption='' end
    	 caption2 = data['caption2']
    	 if caption2==nil then caption2='' end
    	 xtxt, ytxt= data ['xtxt'], data['ytxt']
    	 if xtxt ==nil then xtxt=0 end
    	 if ytxt ==nil then ytxt=0 end
    
    --convert degree to rad and rotate (0 degree is top/north)
    	function angle_to_position(start_angle, current_angle)
    	  if total_angle < 0 then
    		local pos = start_angle - current_angle
    		return ( ( pos * (math.pi / 180) ) - (math.pi / 2) )
    	  else
    		local pos = current_angle + start_angle
    		return ( ( pos * (math.pi / 180) ) - (math.pi / 2) )
    	  end
    	end
    --cup centre background
      if cup_bg_alpha >0   then
    	if total_angle < 0 then
    	  cairo_arc_negative(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_end_angle, 0))
    	else
    	  cairo_arc(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_start_angle, cup_end_angle))
    	end
    	cairo_set_source_rgba(display, rgb_to_r_g_b(cup_bg_clr, cup_bg_alpha))
    	cairo_set_line_width(display, cup_wall_thickness)
    	cairo_stroke(display)
      end
    --cup wall fg
      if cup_fg_alpha > 0 then
       local fg_stop_arc = (cup_sector_angle * value)
    	if total_angle < 0 then
    	cairo_arc_negative(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_start_angle, fg_stop_arc))
    	else
    	cairo_arc(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_start_angle, fg_stop_arc))
    	end
    	cairo_set_source_rgba(display, rgb_to_r_g_b(cup_fg_clr, cup_fg_alpha))
    	cairo_set_line_width(display, cup_wall_thickness)
    	cairo_stroke(display)
      end
    -- cup handle
      if handle_fg_alpha>0 then
    	local start_handle = (cup_sector_angle * value) - (handle_circ*0.5)
    	local stop_handle = (cup_sector_angle * value) +  (handle_circ*0.5)
    	if total_angle < 0 then
    	cairo_arc_negative(display, x, y, cup_radius, angle_to_position(cup_start_angle, start_handle), angle_to_position(cup_start_angle, stop_handle))
    	else
    	cairo_arc(display, x, y, cup_radius, angle_to_position(cup_start_angle, start_handle), angle_to_position(cup_start_angle, stop_handle))
    	end
    	cairo_set_line_width(display, handle_length)
    	cairo_set_source_rgba(display, rgb_to_r_g_b(handle_fg_clr, handle_fg_alpha))
    	cairo_stroke(display)
      end
    --saucers
    ---thick saucer
    	if saucer_fg_alpha > 0 and (thin_saucer_circ >0 or thick_saucer_circ > 0)
    	  then
    	if value < (max_value/2)
    		then j = value + ((max_value*total_saucer_angle)/720)
    		else j = value - ((max_value*total_saucer_angle)/720)
    	end
    
    	local start_saucer = (saucer_sector_angle * j) - (value*saucer_sector_angle*0.5*thick_saucer_circ)
    	local stop_saucer = (saucer_sector_angle * j) + (value*saucer_sector_angle*0.5*thick_saucer_circ)
    	if total_angle < 0 then
    	cairo_arc_negative(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_saucer), angle_to_position(cup_start_angle, stop_saucer))
    	else
    	cairo_arc(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_saucer), angle_to_position(cup_start_angle, stop_saucer))
    	end
    	cairo_set_source_rgba(display, rgb_to_r_g_b(saucer_fg_clr, saucer_fg_alpha))
    	cairo_set_line_width(display, saucer_thickness)
    	cairo_stroke(display)
    	--thin saucer
    	  if inner_saucer == true
    	  then rt = (saucer_radius - 0.5) + (0.5 * saucer_thickness)
    	  else rt = (saucer_radius + 0.5) - (0.5 * saucer_thickness)
    	  end
    	local start_thin_saucer = (saucer_sector_angle * j) - (max_value *0.5*saucer_sector_angle*thin_saucer_circ)
    	local stop_thin_saucer = (saucer_sector_angle * j) + (max_value *0.5*saucer_sector_angle*thin_saucer_circ)
    	if total_angle < 0 then
    	cairo_arc_negative(display, x, y, rt, angle_to_position(cup_start_angle, start_thin_saucer), angle_to_position(cup_start_angle, stop_thin_saucer))
    	else
    	cairo_arc(display, x, y, rt, angle_to_position(cup_start_angle, start_thin_saucer), angle_to_position(cup_start_angle, stop_thin_saucer))
    	end
    	cairo_set_source_rgba(display, rgb_to_r_g_b(saucer_fg_clr, saucer_fg_alpha))
    	cairo_set_line_width(display, 1)
    	cairo_stroke(display)
       end
    --saucer mark
    	if saucer_mark_fg_alpha > 0 then
    	local start_cm = (saucer_sector_angle * value) - (handle_circ *0.5 )
    	local stop_cm = (saucer_sector_angle * value) + (handle_circ *0.5 )
    	if total_angle < 0 then
    	  cairo_arc_negative(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_cm), angle_to_position(cup_start_angle, stop_cm))
    	else
    	  cairo_arc(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_cm), angle_to_position(cup_start_angle, stop_cm))
    	end
    	cairo_set_source_rgba(display, rgb_to_r_g_b(saucer_mark_fg_clr, saucer_mark_fg_alpha))
    		cairo_set_line_width(display, saucer_thickness)
    		cairo_stroke(display)
    	end
    --graduation mark
    	 if graduation_radius > 0 and graduation_thickness > 0 and graduation_mark_angle > 0 then
    		number_graduation = (math.abs(total_angle) +1)/ graduation_mark_angle
    		local start_arc_grad = 0
    		local stop_arc_grad = 0
    	local i = 0
    		while i < number_graduation do
    			local start_arc_grad = (graduation_mark_angle * (i)) - (graduation_mark_circ *0.5)
    			local stop_arc_grad = (graduation_mark_angle * (i)) + (graduation_mark_circ *0.5)
    			if total_angle < 0 then
    		  cairo_arc_negative(display, x, y, graduation_radius, angle_to_position(cup_start_angle, start_arc_grad), angle_to_position(cup_start_angle, stop_arc_grad))
    		else
    		  cairo_arc(display, x, y, graduation_radius, angle_to_position(cup_start_angle, start_arc_grad), angle_to_position(cup_start_angle, stop_arc_grad))
    		end
    		cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_clr,graduation_fg_alpha))
    			cairo_set_line_width(display, graduation_thickness)
    		cairo_stroke(display)
    			i = i + 1
    		end
    	end
    -- text
      if txt_fg_alpha>0 then
    	cairo_select_font_face (display, "hooge 05_53", CAIRO_FONT_SLANT_NORMAL, txt_weight);
    	cairo_set_font_size (display,txt_size)
    	cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_clr, txt_fg_alpha))
    	cairo_move_to (display,x+xtxt,y+ytxt)
    	cairo_show_text (display, caption ) cairo_show_text (display,value)cairo_show_text (display, caption2 )
    	cairo_stroke (display)
      end
    end
    -------------------------------------------------------------------------------
    -- loads data and displays table_settings
    
    function display_coffee_table(display)
    	local function load_coffee_table(display, data)
    		local str, value = '', 0
    	if data['name'] == 'time2' then
    		local max_value = data['max_value']
    			str = string.format('${time %s}', data['arg'])
    			str = conky_parse(str)
    			local value2 = tonumber(str:sub(0,2))
    		if value2 == max_value then value2 = 0 end
    		value = value2 + (tonumber(str:sub(4,5))/60)
    	else
    			str = string.format('${%s %s}',data['name'], data['arg'])
    			str = conky_parse(str)
    			value = tonumber(str)
    		end
    		if value == nil then value = 0 end
    		draw_coffee_table(display, data, value)
    	end
    	for i in pairs(coffee_table) do
    		load_coffee_table(display, coffee_table[i])
    	end
    end
    -------------------------------------------------------------------------------
    runscheck = 0 -- fix for draw shades running script twice on every update
    function conky_main()
    	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 display = cairo_create(cs)
    	local updates = conky_parse('${updates}')
    	update_num = tonumber(updates)
    	if update_num > 5 then
    	  cairo_set_antialias (display, CAIRO_ANTIALIAS_SUBPIXEL)
    	  display_coffee_table(display)
    	  cairo_set_antialias (display, CAIRO_ANTIALIAS_DEFAULT)
    	end
    	cairo_surface_destroy(cs)
    	cairo_destroy(display)
    end

  7. #21197
    Join Date
    Jun 2012
    Beans
    0

    Re: Post your .conkyrc files w/ screenshots

    Variation weather chrono with filter sphérical working on sat map.(Thanks jpdipsy who helped me on the french forum)
    I'm looking for an us map sat to use in the script for you, the settings are not easy because the us map is not a square...
    I find this one :
    http://weather.msfc.nasa.gov/GOES/ICG13-09312012339.jpg
    many links for maps here :
    http://wwwghcc.msfc.nasa.gov/GOES/satlinks.html
    conky gws:
    http://pix.toile-libre.org/upload/or...1354623355.png

  8. #21198
    Join Date
    Jun 2012
    Beans
    0

    Re: Post your .conkyrc files w/ screenshots

    @Sector11
    Big Thanks for all these new chrono code !
    Sehr schön Herr Sector11 NICE work !

  9. #21199
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by ragamatrix View Post
    @Sector11
    Big Thanks for all these new chrono code !
    Sehr schön Herr Sector11 NICE work !
    Not a part of "The Chronograph" code - it uses the revolutionary clock by abuyahya.

    I got upset when a friend found it somewhere with my v9000 template scripted down and all information as to the creator of the template and the cups_n_saucers.lua gone!

    Like whoever did it wanted people to think it was "his". If you're going to use someone's code at least give credit where credit is due. (My opinion)

    BTW, I'm not German. But thank you anyway.

  10. #21200
    Join Date
    Mar 2009
    Beans
    4

    Re: Post your .conkyrc files w/ screenshots

    Did some adjustments to Infinity Conky for my Ubuntu desktop.

    Thought I'd share the screeny.



    Gotta love Ubuntu!
    >>Ubuntu 12.10 / res:1366x768
    Last edited by Onyxrune; December 4th, 2012 at 07:33 PM.

Page 2120 of 2348 FirstFirst ... 1120162020202070211021182119212021212122213021702220 ... 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
  •