Page 2117 of 2328 FirstFirst ... 1117161720172067210721152116211721182119212721672217 ... LastLast
Results 21,161 to 21,170 of 23272

Thread: Post your .conkyrc files w/ screenshots

  1. #21161
    Join Date
    Aug 2010
    Location
    Earth, usually...
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Man I sure do like Didier-T's chrono! Looks really nice on my desktop! @Sector11, your not going to believe this but it's the only 'conky' that's changed on my desktop for over a week! Not to worry though, I'm almost keeping up with you when it comes to 'breaking' perfectly functioning scripts! My brain is still trying to wrap itself around the fact that 'Lua' isn't something you do while in Hawaii!
    Latest screen-shot below!

    Jed
    Attached Images Attached Images
    Last edited by Jedcurtis; November 24th, 2012 at 09:17 PM.

  2. #21162
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mrpeachy View Post
    @ragamatrix - im sure ive seen a script by wlourf that does line graphs somewhere

    would be an good project, but it wont be coming from me any time soon im afraid
    Yes he did: Graph Widget.

  3. #21163
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by arclance View Post
    If you think they are crazy now you should watch the videos of the ones with buttons that are posted here.

    Most of the drives are for backing up all the photographs I take.
    When your camera takes 20-30 MiB pictures and you use 32 GiB memory cards it adds up fast.
    Yea, I remember watching them - YIKES! I'd need about 20 years to figure those out.

  4. #21164
    Join Date
    Aug 2011
    Beans
    32

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by arclance View Post
    You can also try setting
    Code:
    imlib_cache_size 0
    To completely disable image caching in conky.
    That worked PERFECTLY!

    Thanks you very much.

  5. #21165
    Join Date
    Jun 2012
    Beans
    0

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    Yes he did: Graph Widget.
    Thanks a lot for these precious infos.
    It's an idea on the way...a project
    I've got a new idea again, I don't really know if it's good...
    I'd like to write the infos of North,east,west, wind speeds and degrees around this circle or inside ones...I know that you've already done with thermometer.lua...
    What do you think ?
    example :



    project:
    http://pix.toile-libre.org/upload/or...1353873079.png
    Last edited by ragamatrix; November 25th, 2012 at 09:19 PM.

  6. #21166
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by ragamatrix View Post
    Thanks a lot for these precious infos.
    It's an idea on the way...a project
    I've got a new idea again, I don't really know if it's good...
    I'd like to write the infos of North,east,west and degrees around this circle...I know that you've already done with thermometer.lua...
    What do you think ?
    example code...

    project:
    http://pix.toile-libre.org/upload/or...1353873079.png
    Nice idea but you have me confused with someone that can write LUA, I can only tweak it.

    mrpeachy did it in and older version of the The Chronograph:
    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
     23 Jun 2012 - crono.lua by mrprachy - modified by Sector11 23/24 Jun 2012
    
    use in conkyrc
    
    lua_load /path/crono.lua
    lua_draw_hook_pre main
    TEXT
    
    
    -- INDEX (use find with):
    
    -- ###### 12 OR 24 CLOCK FACE
    -- SET BORDER OPTIONS ######  ALL CLOCKS
    
    -- ### START CLOCK A ######################################
    -- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
    -- CLOCK A HOUR HAND
    -- CLOCK A MINUTE HAND SETUP
    -- CLOCK A SECOND HAND SETUP
    -- CLOCK A ###### 24 HR TIME
    
    -- ### START DIAL B ### Top - Week Day Names Dial #########
    -- ### START DIAL C ### Right - Month Names Dial ##########
    -- ### START DIAL D ### Left - Day Numbers Dial ###########
    
    -- ### START CLOCK E ######################################
    -- MARKS AROUND CLOCK E -- Bottom - 12 HR Clock
    -- CLOCK E HOUR HAND
    -- CLOCK E MINUTE HAND SETUP
    -- CLOCK E SECOND HAND SETUP
    -- CLOCK E ###### 12 HR TIME
    ]]
    
    require 'cairo'
    
    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)
    -- ########################################################
    -- SETTINGS AREA
    -- local cpu=conky_parse("${cpu}")
    -- local red-1=conky_parse("${image /media/5/Conky/images/red_1.png -p 0,0 -s 35x35}")
    
    -- ###### 12 OR 24 CLOCK FACE #############################
    local clock_type_A=24 -- Large Main 24 HR Clock
    local clock_type_E=12 -- Bottom - 12 HR Clock
    
    -- ###### CLOCK SETTINGS ##################################
    -- 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=1
    
    -- ########################################################
    -- ### START CLOCK A ######################################
    -- SET MARKS
    -- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
    local number_marks_A=24
    -- set mark length
    local m_length_A=0
    -- set mark width
    local m_width_A=0
    -- 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,1-- opaque white
    -- SETUP HOUR HANDS
    -- CLOCK A HOUR HAND
    -- set length of hour hand
    hh_length_A=130
    -- set hour hand width
    hh_width_A=3
    -- set hour hand line cap
    hh_cap=CAIRO_LINE_CAP_ROUND
    -- set hour hand color
    hhr,hhg,hhb,hha=1,1,1,1-- fully opaque white
    -- SETUP MINUTE HANDS
    -- CLOCK A MINUTE HAND SETUP
    -- set length of minute hand
    mh_length_A=145
    -- 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,1-- fully opaque white
    -- SETUP SECOND HANDS
    -- CLOCK A SECOND HAND SETUP
    -- set length of seconds hand
    sh_length_A=160
    -- set hour hand width
    sh_width_A=1
    -- 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
    -- CLOCK A ###### 24 HR TIME
    -- CLOCK SETTINGS
    clock_radius=200
    clock_centerx=175
    clock_centery=175
    -- DRAWING CODE
    -- DRAW BORDER
    cairo_set_source_rgba (cr,cbr,cbg,cbb,cba)
    cairo_set_line_width (cr,clock_border_width)
    cairo_arc (cr,clock_centerx,clock_centery,clock_radius,0,2*math.pi)
    cairo_stroke (cr)
    -- 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
    -- 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,hhr,hhg,hhb,hha)
    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,mhr,mhg,mhb,mha)
    cairo_set_line_cap  (cr, mh_cap)
    cairo_stroke (cr)
    --[[ DRAW SECOND HAND
    -- calculate degrees for each second
    sec_degs=seconds*6
    -- set radius to calculate hand points
    radius=sh_length_A
    -- set start line coordinates, the center of the circle
    cairo_move_to (cr,clock_centerx,clock_centery)
    -- calculate coordinates for end of seconds hand
    point=(math.pi/180)*sec_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
    cairo_set_line_width (cr,sh_width_A)
    cairo_set_source_rgba (cr,shr,shg,shb,sha)
    cairo_set_line_cap  (cr, sh_cap)
    cairo_stroke (cr) ]]
    -- POSITION FOR TEXT HOUR NUMBERS
    local center_x=175
    local center_y=175
    local radius=160
    -- FONT
    cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, 10)
    cairo_set_source_rgba (cr,1,1,1,1)
    -- TABLE OF TEXT -- in order
    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=150
    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_stroke (cr)
    end
    -- ### END CLOCK A ########################################
    
    -- ########################################################
    -- ### START DIAL B ### Top - Week Day Names Dial #########
    -- days of week
    -- positioning
    local center_x=175
    local center_y=95
    local radius=50
    cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, 10)
    cairo_set_source_rgba (cr,1,1,1,1)
    -- table holds text you want to see in order
    text_days={"SUN","MON","TUE","WED","THR","FRI","SAT",}
    -- draw days
    local tx_deg=30
    for i=1,7 do
    start=((360/7)*(i-1))-(tx_deg/2)
    circlewriting (text_days[i], "CorporateMonoExtraBold", 10, radius, center_x, center_y, {0xffffff,1}, start, start+tx_deg)
    end
    --draw points, radius smaller than text circle
    
    local radius=45
    for i=1,7 do
    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
    --draw hand pointing to current day
    local hand_length=40--radius for this calculation
    local day_number=tonumber(os.date("%w"))
    local point=(math.pi/180)*((360/7)*(day_number))
    local x=0+hand_length*(math.sin(point))
    local y=0-hand_length*(math.cos(point))
    cairo_move_to (cr,center_x,center_y)
    cairo_line_to (cr,center_x+x,center_y+y)
    cairo_stroke (cr)
    -- ### END CLOCK B ########################################
    
    -- ########################################################
    -- ### START DIAL C ### Right - Month Names Dial ##########
    -- DIAL POSITION FOR TEXT
    local center_x=260
    local center_y=175
    local radius=45
    cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, 10)
    cairo_set_source_rgba (cr,1,1,1,1)
    -- table holds text you want to see in order
    text_days={"DEC","JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV",}
    -- draw days
    local tx_deg=20
    for i=1,12 do
    start=((360/12)*(i-1))-(tx_deg/2)
    circlewriting (text_days[i], "CorporateMonoExtraBold", 10, radius, center_x, center_y, {0xffffff,1}, start, start+tx_deg)
    end
    --draw points, radius smaller than text circle
    
    local radius=40
    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_stroke (cr)
    end
    --draw hand pointing to current day
    local hand_length=35 --radius for this calculation
    local day_number=tonumber(os.date("%m"))
    local point=(math.pi/180)*((360/12)*(day_number))
    local x=0+hand_length*(math.sin(point))
    local y=0-hand_length*(math.cos(point))
    cairo_move_to (cr,center_x,center_y)
    cairo_line_to (cr,center_x+x,center_y+y)
    cairo_stroke (cr)
    -- ### END CLOCK C ########################################
    
    -- ########################################################
    -- ### START DIAL D ### Left - Day Numbers Dial ###########
    -- DAYS IN MONTH - NUMBERS
    --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} );
    febdaynum=tonumber((os.difftime(t1,t2))/(24*60*60))
    monthdays={31,febdaynum,31,30,31,30,31,31,30,31,30,31}
    local this_month=tonumber(os.date("%m"))
    local number_days=monthdays[this_month]
    --positioning
    local center_x=95
    local center_y=175
    local radius=45
    --draw numbers
    local tx_deg=8
    for i=1,number_days do
    if i<10 then text="0"..i else text=i end
    start=((360/number_days)*(i-1))-(tx_deg/2)
    circlewriting (text, "CorporateMonoExtraBold", 8, radius, center_x, center_y, {0xffffff,1}, start, start+tx_deg)
    end
    --draw points, radius smaller than text circle
    local radius=40
    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))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
    end
    --draw hand pointing to current day of month
    local this_day=tonumber(os.date("%d"))
    local hand_length=35 --radius for this calculation
    local point=(math.pi/180)*((360/number_days)*(this_day-1))
    local x=0+hand_length*(math.sin(point))
    local y=0-hand_length*(math.cos(point))
    cairo_move_to (cr,center_x,center_y)
    cairo_line_to (cr,center_x+x,center_y+y)
    cairo_stroke (cr)
    -- ### END CLOCK D ########################################
    
    -- ########################################################
    -- ### START CLOCK E ######################################
    -- MARKS AROUND CLOCK E -- Bottom - 12 HR Clock
    local number_marks_E=12
    -- set mark length
    local m_length_E=0
    -- set mark width
    local m_width_E=0
    -- 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,0,1-- opaque white
    -- SETUP HOUR HAND
    -- CLOCK E HOUR HAND
    -- set length of hour hand
    hh_length_E=25
    -- set hour hand width
    hh_width_E=2
    -- set hour hand line cap
    hh_cap=CAIRO_LINE_CAP_ROUND
    -- set hour hand color
    hhr,hhg,hhb,hha=1,1,0,1-- fully opaque white
    -- SETUP MINUTE HAND
    -- CLOCK E MINUTE HAND SETUP
    -- set length of minute hand
    mh_length_E=35
    -- set minute hand width
    mh_width_E=2
    -- set minute hand line cap
    mh_cap=CAIRO_LINE_CAP_ROUND
    -- set minute hand color
    mhr,mhg,mhb,mha=1,1,0,1-- fully opaque white
    -- SETUP SECOND HAND
    -- CLOCK E SECOND HAND SETUP
    -- set length of seconds hand
    sh_length_E=32
    -- set hour hand width
    sh_width_E=1
    -- 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
    -- CLOCK E ###### 12 HR TIME
    -- CLOCK SETTINGS
    clock_radius=45
    clock_centerx=175
    clock_centery=260
    -- DRAWING CODE
    -- DRAW BORDER
    cairo_set_source_rgba (cr,cbr,cbg,cbb,cba)
    cairo_set_line_width (cr,clock_border_width)
    cairo_arc (cr,clock_centerx,clock_centery,clock_radius,0,2*math.pi)
    cairo_stroke (cr)
    -- 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_E
    -- set line cap type
    cairo_set_line_cap  (cr, m_cap)
    -- set line width
    cairo_set_line_width (cr,m_width_E)
    -- set color and alpha for marks
    cairo_set_source_rgba (cr,mr,mg,mb,ma)
    -- START LOOP FOR SECOND MARKS
    for i=1,number_marks_E 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_E))
    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_E))
    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
    -- TIME CALCULATIONS CLOCK E
    if clock_type_E==12 then
    hours=tonumber(os.date("%I"))
    -- convert hours to seconds
    h_to_s=hours*60*60
    elseif clock_type_E==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 and draw it
    hsecs=h_to_s+m_to_s+seconds
    -- calculate degrees for each second
    hsec_degs=hsecs*(360/(60*60*clock_type_E))-- use equation ~ eliminate decimals
    -- set radius to calculate hand points
    radius=hh_length_E
    -- 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)*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_E)
    cairo_set_source_rgba (cr,hhr,hhg,hhb,hha)
    cairo_set_line_cap  (cr, hh_cap)
    cairo_stroke (cr)
    -- DRAW MINUTE HAND
    -- get minutes and seconds 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_E
    -- 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_E)
    cairo_set_source_rgba (cr,mhr,mhg,mhb,mha)
    cairo_set_line_cap  (cr, mh_cap)
    cairo_stroke (cr)
    -- DRAW SECOND HAND
    -- calculate degrees for each second
    sec_degs=seconds*6
    -- set radius to calculate hand points
    radius=sh_length_E
    -- set start line coordinates, the center of the circle
    cairo_move_to (cr,clock_centerx,clock_centery)
    -- calculate coordinates for end of seconds hand
    point=(math.pi/180)*sec_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
    cairo_set_line_width (cr,sh_width_E)
    cairo_set_source_rgba (cr,shr,shg,shb,sha)
    cairo_set_line_cap  (cr, sh_cap)
    cairo_stroke (cr)
    -- POSITION FOR TEXT HOUR NUMBERS
    local center_x=175
    local center_y=260
    local radius=45
    -- FONT
    cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, 10)
    cairo_set_source_rgba (cr,1,1,1,1)
    -- TABLE OF TEXT -- in order
    --text_days={"12","01","02","03","04","05","06","07","08","09","10","11",}
    -- FOR A 12 HOUR CLOCK WITH THE NUMBERS 13-00
    text_days={"00","13","14","15","16","17","18","19","20","21","22","23",}
    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_stroke (cr)
    end
    -- INNER POINTS POSITION, radius smaller than text circle
    local radius=32
    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_stroke (cr)
    end
    -- ### END CLOCK E ########################################
    
    -- ########################################################
    end-- end main function
    
    function circlewriting(text, font, fsize, radi, horiz, verti, text_color, start, finish)
    local function rgb_to_r_g_b(col_a)
    return ((col_a[1] / 0x10000) % 0x100) / 255, ((col_a[1] / 0x100) % 0x100) / 255, (col_a[1] % 0x100) / 255, col_a[2]
    end
    cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, fsize)
    cairo_set_source_rgba (cr,rgb_to_r_g_b(text_color));
    local inum=string.len(text)
    local deg=(finish-start)/(inum)
    local r2d=(math.pi/180)
    	for i=1,inum do
    	local cha=string.sub(text,i,i)
    	local interval=(r2d*(start+(deg*(i-1))))
    	local txs=0+radi*(math.sin(interval))
    	local tys=0-radi*(math.cos(interval))
    	cairo_move_to (cr, txs+horiz, tys+verti);
    	cairo_rotate (cr, interval)
    	cairo_show_text (cr, cha)
    	cairo_stroke (cr)
    	cairo_rotate (cr, -interval)
    	end
    end--of function
    If this is what you are looking for:
    Attached Images Attached Images

  7. #21167
    Join Date
    Jun 2012
    Beans
    0

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    Nice idea but you have me confused with someone that can write LUA, I can only tweak it.

    mrpeachy did it in and older version of the The Chronograph:
    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
     23 Jun 2012 - crono.lua by mrprachy - modified by Sector11 23/24 Jun 2012
    
    use in conkyrc
    
    lua_load /path/crono.lua
    lua_draw_hook_pre main
    TEXT
    
    
    -- INDEX (use find with):
    
    -- ###### 12 OR 24 CLOCK FACE
    -- SET BORDER OPTIONS ######  ALL CLOCKS
    
    -- ### START CLOCK A ######################################
    -- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
    -- CLOCK A HOUR HAND
    -- CLOCK A MINUTE HAND SETUP
    -- CLOCK A SECOND HAND SETUP
    -- CLOCK A ###### 24 HR TIME
    
    -- ### START DIAL B ### Top - Week Day Names Dial #########
    -- ### START DIAL C ### Right - Month Names Dial ##########
    -- ### START DIAL D ### Left - Day Numbers Dial ###########
    
    -- ### START CLOCK E ######################################
    -- MARKS AROUND CLOCK E -- Bottom - 12 HR Clock
    -- CLOCK E HOUR HAND
    -- CLOCK E MINUTE HAND SETUP
    -- CLOCK E SECOND HAND SETUP
    -- CLOCK E ###### 12 HR TIME
    ]]
    
    require 'cairo'
    
    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)
    -- ########################################################
    -- SETTINGS AREA
    -- local cpu=conky_parse("${cpu}")
    -- local red-1=conky_parse("${image /media/5/Conky/images/red_1.png -p 0,0 -s 35x35}")
    
    -- ###### 12 OR 24 CLOCK FACE #############################
    local clock_type_A=24 -- Large Main 24 HR Clock
    local clock_type_E=12 -- Bottom - 12 HR Clock
    
    -- ###### CLOCK SETTINGS ##################################
    -- 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=1
    
    -- ########################################################
    -- ### START CLOCK A ######################################
    -- SET MARKS
    -- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
    local number_marks_A=24
    -- set mark length
    local m_length_A=0
    -- set mark width
    local m_width_A=0
    -- 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,1-- opaque white
    -- SETUP HOUR HANDS
    -- CLOCK A HOUR HAND
    -- set length of hour hand
    hh_length_A=130
    -- set hour hand width
    hh_width_A=3
    -- set hour hand line cap
    hh_cap=CAIRO_LINE_CAP_ROUND
    -- set hour hand color
    hhr,hhg,hhb,hha=1,1,1,1-- fully opaque white
    -- SETUP MINUTE HANDS
    -- CLOCK A MINUTE HAND SETUP
    -- set length of minute hand
    mh_length_A=145
    -- 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,1-- fully opaque white
    -- SETUP SECOND HANDS
    -- CLOCK A SECOND HAND SETUP
    -- set length of seconds hand
    sh_length_A=160
    -- set hour hand width
    sh_width_A=1
    -- 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
    -- CLOCK A ###### 24 HR TIME
    -- CLOCK SETTINGS
    clock_radius=200
    clock_centerx=175
    clock_centery=175
    -- DRAWING CODE
    -- DRAW BORDER
    cairo_set_source_rgba (cr,cbr,cbg,cbb,cba)
    cairo_set_line_width (cr,clock_border_width)
    cairo_arc (cr,clock_centerx,clock_centery,clock_radius,0,2*math.pi)
    cairo_stroke (cr)
    -- 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
    -- 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,hhr,hhg,hhb,hha)
    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,mhr,mhg,mhb,mha)
    cairo_set_line_cap  (cr, mh_cap)
    cairo_stroke (cr)
    --[[ DRAW SECOND HAND
    -- calculate degrees for each second
    sec_degs=seconds*6
    -- set radius to calculate hand points
    radius=sh_length_A
    -- set start line coordinates, the center of the circle
    cairo_move_to (cr,clock_centerx,clock_centery)
    -- calculate coordinates for end of seconds hand
    point=(math.pi/180)*sec_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
    cairo_set_line_width (cr,sh_width_A)
    cairo_set_source_rgba (cr,shr,shg,shb,sha)
    cairo_set_line_cap  (cr, sh_cap)
    cairo_stroke (cr) ]]
    -- POSITION FOR TEXT HOUR NUMBERS
    local center_x=175
    local center_y=175
    local radius=160
    -- FONT
    cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, 10)
    cairo_set_source_rgba (cr,1,1,1,1)
    -- TABLE OF TEXT -- in order
    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=150
    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_stroke (cr)
    end
    -- ### END CLOCK A ########################################
    
    -- ########################################################
    -- ### START DIAL B ### Top - Week Day Names Dial #########
    -- days of week
    -- positioning
    local center_x=175
    local center_y=95
    local radius=50
    cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, 10)
    cairo_set_source_rgba (cr,1,1,1,1)
    -- table holds text you want to see in order
    text_days={"SUN","MON","TUE","WED","THR","FRI","SAT",}
    -- draw days
    local tx_deg=30
    for i=1,7 do
    start=((360/7)*(i-1))-(tx_deg/2)
    circlewriting (text_days[i], "CorporateMonoExtraBold", 10, radius, center_x, center_y, {0xffffff,1}, start, start+tx_deg)
    end
    --draw points, radius smaller than text circle
    
    local radius=45
    for i=1,7 do
    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
    --draw hand pointing to current day
    local hand_length=40--radius for this calculation
    local day_number=tonumber(os.date("%w"))
    local point=(math.pi/180)*((360/7)*(day_number))
    local x=0+hand_length*(math.sin(point))
    local y=0-hand_length*(math.cos(point))
    cairo_move_to (cr,center_x,center_y)
    cairo_line_to (cr,center_x+x,center_y+y)
    cairo_stroke (cr)
    -- ### END CLOCK B ########################################
    
    -- ########################################################
    -- ### START DIAL C ### Right - Month Names Dial ##########
    -- DIAL POSITION FOR TEXT
    local center_x=260
    local center_y=175
    local radius=45
    cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, 10)
    cairo_set_source_rgba (cr,1,1,1,1)
    -- table holds text you want to see in order
    text_days={"DEC","JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV",}
    -- draw days
    local tx_deg=20
    for i=1,12 do
    start=((360/12)*(i-1))-(tx_deg/2)
    circlewriting (text_days[i], "CorporateMonoExtraBold", 10, radius, center_x, center_y, {0xffffff,1}, start, start+tx_deg)
    end
    --draw points, radius smaller than text circle
    
    local radius=40
    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_stroke (cr)
    end
    --draw hand pointing to current day
    local hand_length=35 --radius for this calculation
    local day_number=tonumber(os.date("%m"))
    local point=(math.pi/180)*((360/12)*(day_number))
    local x=0+hand_length*(math.sin(point))
    local y=0-hand_length*(math.cos(point))
    cairo_move_to (cr,center_x,center_y)
    cairo_line_to (cr,center_x+x,center_y+y)
    cairo_stroke (cr)
    -- ### END CLOCK C ########################################
    
    -- ########################################################
    -- ### START DIAL D ### Left - Day Numbers Dial ###########
    -- DAYS IN MONTH - NUMBERS
    --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} );
    febdaynum=tonumber((os.difftime(t1,t2))/(24*60*60))
    monthdays={31,febdaynum,31,30,31,30,31,31,30,31,30,31}
    local this_month=tonumber(os.date("%m"))
    local number_days=monthdays[this_month]
    --positioning
    local center_x=95
    local center_y=175
    local radius=45
    --draw numbers
    local tx_deg=8
    for i=1,number_days do
    if i<10 then text="0"..i else text=i end
    start=((360/number_days)*(i-1))-(tx_deg/2)
    circlewriting (text, "CorporateMonoExtraBold", 8, radius, center_x, center_y, {0xffffff,1}, start, start+tx_deg)
    end
    --draw points, radius smaller than text circle
    local radius=40
    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))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
    end
    --draw hand pointing to current day of month
    local this_day=tonumber(os.date("%d"))
    local hand_length=35 --radius for this calculation
    local point=(math.pi/180)*((360/number_days)*(this_day-1))
    local x=0+hand_length*(math.sin(point))
    local y=0-hand_length*(math.cos(point))
    cairo_move_to (cr,center_x,center_y)
    cairo_line_to (cr,center_x+x,center_y+y)
    cairo_stroke (cr)
    -- ### END CLOCK D ########################################
    
    -- ########################################################
    -- ### START CLOCK E ######################################
    -- MARKS AROUND CLOCK E -- Bottom - 12 HR Clock
    local number_marks_E=12
    -- set mark length
    local m_length_E=0
    -- set mark width
    local m_width_E=0
    -- 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,0,1-- opaque white
    -- SETUP HOUR HAND
    -- CLOCK E HOUR HAND
    -- set length of hour hand
    hh_length_E=25
    -- set hour hand width
    hh_width_E=2
    -- set hour hand line cap
    hh_cap=CAIRO_LINE_CAP_ROUND
    -- set hour hand color
    hhr,hhg,hhb,hha=1,1,0,1-- fully opaque white
    -- SETUP MINUTE HAND
    -- CLOCK E MINUTE HAND SETUP
    -- set length of minute hand
    mh_length_E=35
    -- set minute hand width
    mh_width_E=2
    -- set minute hand line cap
    mh_cap=CAIRO_LINE_CAP_ROUND
    -- set minute hand color
    mhr,mhg,mhb,mha=1,1,0,1-- fully opaque white
    -- SETUP SECOND HAND
    -- CLOCK E SECOND HAND SETUP
    -- set length of seconds hand
    sh_length_E=32
    -- set hour hand width
    sh_width_E=1
    -- 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
    -- CLOCK E ###### 12 HR TIME
    -- CLOCK SETTINGS
    clock_radius=45
    clock_centerx=175
    clock_centery=260
    -- DRAWING CODE
    -- DRAW BORDER
    cairo_set_source_rgba (cr,cbr,cbg,cbb,cba)
    cairo_set_line_width (cr,clock_border_width)
    cairo_arc (cr,clock_centerx,clock_centery,clock_radius,0,2*math.pi)
    cairo_stroke (cr)
    -- 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_E
    -- set line cap type
    cairo_set_line_cap  (cr, m_cap)
    -- set line width
    cairo_set_line_width (cr,m_width_E)
    -- set color and alpha for marks
    cairo_set_source_rgba (cr,mr,mg,mb,ma)
    -- START LOOP FOR SECOND MARKS
    for i=1,number_marks_E 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_E))
    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_E))
    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
    -- TIME CALCULATIONS CLOCK E
    if clock_type_E==12 then
    hours=tonumber(os.date("%I"))
    -- convert hours to seconds
    h_to_s=hours*60*60
    elseif clock_type_E==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 and draw it
    hsecs=h_to_s+m_to_s+seconds
    -- calculate degrees for each second
    hsec_degs=hsecs*(360/(60*60*clock_type_E))-- use equation ~ eliminate decimals
    -- set radius to calculate hand points
    radius=hh_length_E
    -- 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)*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_E)
    cairo_set_source_rgba (cr,hhr,hhg,hhb,hha)
    cairo_set_line_cap  (cr, hh_cap)
    cairo_stroke (cr)
    -- DRAW MINUTE HAND
    -- get minutes and seconds 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_E
    -- 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_E)
    cairo_set_source_rgba (cr,mhr,mhg,mhb,mha)
    cairo_set_line_cap  (cr, mh_cap)
    cairo_stroke (cr)
    -- DRAW SECOND HAND
    -- calculate degrees for each second
    sec_degs=seconds*6
    -- set radius to calculate hand points
    radius=sh_length_E
    -- set start line coordinates, the center of the circle
    cairo_move_to (cr,clock_centerx,clock_centery)
    -- calculate coordinates for end of seconds hand
    point=(math.pi/180)*sec_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
    cairo_set_line_width (cr,sh_width_E)
    cairo_set_source_rgba (cr,shr,shg,shb,sha)
    cairo_set_line_cap  (cr, sh_cap)
    cairo_stroke (cr)
    -- POSITION FOR TEXT HOUR NUMBERS
    local center_x=175
    local center_y=260
    local radius=45
    -- FONT
    cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, 10)
    cairo_set_source_rgba (cr,1,1,1,1)
    -- TABLE OF TEXT -- in order
    --text_days={"12","01","02","03","04","05","06","07","08","09","10","11",}
    -- FOR A 12 HOUR CLOCK WITH THE NUMBERS 13-00
    text_days={"00","13","14","15","16","17","18","19","20","21","22","23",}
    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_stroke (cr)
    end
    -- INNER POINTS POSITION, radius smaller than text circle
    local radius=32
    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_stroke (cr)
    end
    -- ### END CLOCK E ########################################
    
    -- ########################################################
    end-- end main function
    
    function circlewriting(text, font, fsize, radi, horiz, verti, text_color, start, finish)
    local function rgb_to_r_g_b(col_a)
    return ((col_a[1] / 0x10000) % 0x100) / 255, ((col_a[1] / 0x100) % 0x100) / 255, (col_a[1] % 0x100) / 255, col_a[2]
    end
    cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, fsize)
    cairo_set_source_rgba (cr,rgb_to_r_g_b(text_color));
    local inum=string.len(text)
    local deg=(finish-start)/(inum)
    local r2d=(math.pi/180)
    	for i=1,inum do
    	local cha=string.sub(text,i,i)
    	local interval=(r2d*(start+(deg*(i-1))))
    	local txs=0+radi*(math.sin(interval))
    	local tys=0-radi*(math.cos(interval))
    	cairo_move_to (cr, txs+horiz, tys+verti);
    	cairo_rotate (cr, interval)
    	cairo_show_text (cr, cha)
    	cairo_stroke (cr)
    	cairo_rotate (cr, -interval)
    	end
    end--of function
    If this is what you are looking for:
    Sorry It was only the scale of wind directions around the big circle.Just write letters of directions and km/h too like the picture...I'll try... I difficult for a frenchy guy to explain

  8. #21168
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by ragamatrix View Post
    Sorry It was only the scale of wind directions around the big circle.Just write letters of directions and km/h too like the picture...I'll try... I difficult for a frenchy guy to explain
    Explain in French then

  9. #21169
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    @ragamatrix
    you are in the same position as me a couple of years ago
    i had lots of idead about things i wanted to do in conky
    but i didnt know anything about writing scripts so i was at the mercy of others to write the code for me.

    the problem was when they weren't interested in doing it, I was stuck. This situation is what prompted me to start writing lua scripts for myself and the rest is history

    Right now I'm in a phase where, unless the mood takes me, I don't plan on writing any new code.
    Last edited by mrpeachy; November 26th, 2012 at 12:59 AM.

  10. #21170
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by ragamatrix View Post
    What do you think ?
    example :
    Hey, that's very nice. I like the barometer.

    Are you going to share the code for all of it when done?

Page 2117 of 2328 FirstFirst ... 1117161720172067210721152116211721182119212721672217 ... 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
  •