Find the answer to your Linux question:
Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 34
Like Tree3Likes
Originally Posted by Sector11 Would you believe interactive conkys? No? Check it out: http··//crunchbang.org/forums/viewtopic.php?id=18419&p=1 And interactive v9000 weather: http··//crunchbang.org/forums/viewtopic.php?id=18072 NOTE the ·· vs the : in the URLs. All of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #21
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864

    Quote Originally Posted by Sector11 View Post
    Would you believe interactive conkys?

    No? Check it out:
    http··//crunchbang.org/forums/viewtopic.php?id=18419&p=1

    And interactive v9000 weather:
    http··//crunchbang.org/forums/viewtopic.php?id=18072

    NOTE the ·· vs the : in the URLs.

    All of this is beyond my scope of expertise, this is thanks to the LUA magic of the people mentioned in my scripts. I believe in credit where credit is due. I just play with the layout.
    Just awesome. I love them.
    On an unrelated note, you now have 15 posts, I believe you can post links now.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  2. #22
    Just Joined! Sector11's Avatar
    Join Date
    Aug 2012
    Location
    With my wife.
    Posts
    23
    Quote Originally Posted by MikeTbob View Post
    Just awesome. I love them.
    On an unrelated note, you now have 15 posts, I believe you can post links now.
    OH! Yes, you're right - but I can't edit the above posts that are mine.

  3. #23
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Quote Originally Posted by Sector11 View Post
    OH! Yes, you're right - but I can't edit the above posts that are mine.
    Yes, after a certain amount of time...only a member of the admin team can edit forum posts (see the FAQ in my signature). I think you have done more than provided a good enough link for anyone to follow. If you still want to edit the previous posts, let us know.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  4. #24
    Just Joined! Sector11's Avatar
    Join Date
    Aug 2012
    Location
    With my wife.
    Posts
    23
    Quote Originally Posted by MikeTbob View Post
    Yes, after a certain amount of time...only a member of the admin team can edit forum posts (see the FAQ in my signature). I think you have done more than provided a good enough link for anyone to follow. If you still want to edit the previous posts, let us know.
    Thank you, getting late must get to bed, will read the FAQ it total tomorrow.

    No need to update at the moment, but there is a bug in the Chronograph-Didier-T-2.lua that causes it to fail if not running with draw-bg.lua. So once I get the fix I'd like the code changed in my post #14 and rokytnji's quote in post #17. I'll contact you at that time. Thank you.

    Mean time here's one that will work but doesn't have all the features:
    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
    
    use in conkyrc
    
    lua_load /path/Chronograph.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
    
    NOTE:  Putting ### CLOCK A ### last insures that it's functions are written
           over the other dials.
    ]]
    
    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 ~/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 DIAL B ### Top - Week Day Names Dial #########
    -- DIAL POSITION FOR TEXT
    local center_x=175
    local center_y=95
    local radius=50
    -- FONT
    cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    cairo_set_font_size (cr, 11)
    cairo_set_source_rgba (cr,1,1,1,1) --(cr,194/255,204/255,255/255,1)	-- (cr,1,1,1,1)
    -- TABLE OF TEXT -- in order
    text_days={"Sun","Mon","Tue","Wed","Thr","Fri","Sat",}	-- English
    --text_days={"Dom","Lun","Mar","Mie","Jue","Vie","Sab",}		-- Spanish
    --text_days={"dim","lun","mar","mer","jeu","ven","sam",}		-- French
    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
    --local extents=cairo_text_extents_t:create()
    --tolua.takeownership(extents)
    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=35
    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 -- snaps to current day of week
    local hand_length=30
    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))
    local hand_width=2
    cairo_move_to (cr,center_x,center_y)
    cairo_line_to (cr,center_x+x,center_y+y)
    cairo_stroke (cr)
    -- ### END DIAL B #########################################
    
    -- ########################################################
    -- ### START DIAL C ### Right - Month Names Dial ##########
    -- DIAL POSITION FOR TEXT
    local center_x=260
    local center_y=175
    local radius=45
    -- FONT
    cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    cairo_set_font_size (cr, 11)
    cairo_set_source_rgba (cr,1,1,1,1) --(cr,194/255,204/255,255/255,1)	-- (cr,1,1,1,1)
    -- TABLE OF TEXT -- in order
    text_days={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",}  -- English
    --text_days={"Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic",} -- Spanish
    --text_days={"jan","fév","mar","avr","mai","jui","jul","aôu","sep","oct","nov","déc",} -- French
    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
    --local extents=cairo_text_extents_t:create()
    --tolua.takeownership(extents)
    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
    -- DRAW HAND -- snaps to current month
    local this_month=tonumber(os.date("%m"))
    local hand_length=28 --radius for this calculation
    local point=(math.pi/180)*((360/12)*(this_month-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 C ########################################
    
    -- ########################################################
    -- ### START DIAL D ### Left - 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});
    febdaynum=tonumber((os.difftime(t1,t2))/(24*60*60))
    -- 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
    local center_x=95
    local center_y=175
    local radius=50
    cairo_select_font_face (cr, "Digital tech", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    cairo_set_font_size (cr, 11)
    cairo_set_source_rgba (cr,1,1,1,1) --(cr,194/255,204/255,255/255,1)	-- (cr,1,1,1,1)
    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 then
    --set text when even
    text=string.format("%02d",i) --formats numbers to double digits
    else
    --set text when odd
    text=""
    end--odd even matching
    --local extents=cairo_text_extents_t:create()
    --tolua.takeownership(extents)
    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=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 -- snaps to current DAY
    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 HANDS #######################################
    -- 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 HANDS #####################################
    -- 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 HANDS #####################################
    -- 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,169/255,169/255,169/255,1)
    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-- MARKS AROUND CLOCK E
    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, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    cairo_set_font_size (cr, 11)
    cairo_set_source_rgba (cr,194/255,204/255,255/255,1)	-- (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
    --local extents=cairo_text_extents_t:create()
    --tolua.takeownership(extents)
    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 ########################################
    -- ########################################################
    
    -- ### 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,.5-- 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,.5-- fully opaque white
    -- SETUP SECOND HANDS #####################################
    -- CLOCK A SECOND HAND SETUP
    -- set length of seconds hand
    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
    -- CLOCK A ###### 12 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_source_rgba (cr,169/255,169/255,169/255,1)
    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_source_rgba (cr,169/255,169/255,169/255,1)
    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))BOLD
    -- 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)
    ]]
    -- ####################################################################
    -- part of a second hand
    --position
    local center_x=175
    local center_y=175
    --get seconds value
    local seconds=tonumber(os.date("%S"))
    --calculate rotation of second hand in degrees
    local arc=(math.pi/180)*((360/60)*seconds)
    --calculate point 1
    local radius1=140
    local x1=0+radius1*math.sin(arc)
    local y1=0-radius1*math.cos(arc)
    --calculate point 2
    local radius2=158
    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)
    cairo_stroke (cr)
    -- ####################################################################
    -- POSITION FOR TEXT HOUR NUMBERS
    local center_x=175
    local center_y=175
    local radius=165
    -- FONT
    cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    cairo_set_font_size (cr, 15)
    cairo_set_source_rgba (cr,1,1,1,1) --(cr,194/255,204/255,255/255,1)	-- (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
    --local extents=cairo_text_extents_t:create()
    --tolua.takeownership(extents)
    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
    --[[ HOUR POINTS CIRCLES,  ##########Uncoment section to draw rings around numbers
    local radius=162
    for i=1,60 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,12,0,2*math.pi)
    cairo_stroke (cr)
    end]]
    -- ### END CLOCK A ########################################
    
    -- ########################################################
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    end-- end main function

  5. #25
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,284
    Siduction running XFCE (with Compiz, Emerald and two conkys)



    The left hand conky
    Code:
    ##############################################
    #  Settings
    ##############################################
    background yes
    use_xft yes
    xftfont sans:size=9
    xftalpha 1
    update_interval 1.0
    total_run_times 0
    own_window yes
    own_window_argb_visual true
    own_window_argb_value 75
    own_window_colour 121215
    own_window_type normal
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    double_buffer yes
    minimum_size 250 710
    maximum_width 375
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders yes
    default_color FEFFEF
    color0 FEFFEF
    default_shade_color 000000
    default_outline_color d9d7d6
    alignment top_left
    gap_x 10
    gap_y 2
    no_buffers yes
    uppercase no
    cpu_avg_samples 2
    override_utf8_locale no
    
    ##############################################
    #  Output
    ##############################################
    lua_load /home/richard/v9000/v9000.lua
    lua_draw_hook_pre weather
    lua_load /home/richard/v9000/weather_script.lua
    
    TEXT
    
    S Y S T E M    I N F O
    ${hr}
    Host:$alignr$nodename
    Kernel:$alignr${exec /home/richard/Documents/scripts/kernel-name} 
    Uptime:$alignr$uptime
    
    RAM:$alignr$mem/$memmax
    Swap usage:$alignr $swap/$swapmax
    
    /$alignr${fs_used /}/${fs_size /}
    /home/$alignr${fs_used /home/}/${fs_size /home/}
    /tmp/$alignr${fs_used /tmp/}/${fs_size /tmp/}
    
    ${iconv_start UTF-8 ISO_8859-1}
    B B C   H E A D L I N E S
    ${hr}
    ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 0}
    ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 1}
    ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 2}
    ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 3}
    ${rss http://feeds.bbci.co.uk/news/rss.xml 60 item_title 4}
    
    S I D U C T I O N
    ${hr}
    ${rss http://news.siduction.org/feed/ 60 item_title 0}
    ${rss http://news.siduction.org/feed/ 60 item_title 1}
    ${rss http://news.siduction.org/feed/ 60 item_title 2}
    ${rss http://news.siduction.org/feed/ 60 item_title 3}
    ${rss http://news.siduction.org/feed/ 60 item_title 4}${iconv_stop}
    The right hand conky
    Code:
    ##############################################
    #  Settings
    ##############################################
    background yes
    use_xft yes
    xftfont sans:size=9
    xftalpha 1
    update_interval 1.0
    total_run_times 0
    own_window yes
    own_window_argb_visual true
    own_window_argb_value 75
    own_window_colour 121215
    own_window_type normal
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    double_buffer yes
    minimum_size 200 200
    maximum_width 220
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders yes
    default_color FEFFEF
    color0 FEFFEF
    default_shade_color 000000
    default_outline_color d9d7d6
    alignment top_right
    gap_x 10
    gap_y 2
    no_buffers yes
    uppercase no
    cpu_avg_samples 2
    override_utf8_locale no
    
    lua_load /home/richard/Documents/scripts/colourise.lua
    
    ##############################################
    #  Output
    ##############################################
    TEXT
    
    C P U
    ${hr}
    Core 1:$alignr${cpu cpu1}%
    Frequency:$alignr${freq cpu1}MHz
    ${lua_parse conky_colourise_cpu_bar 1 0x666666}${cpubar cpu1 10}${color}
    Core 2:$alignr${cpu cpu2}%
    Frequency:$alignr${freq cpu2}MHz 
    ${lua_parse conky_colourise_cpu_bar 2 0x666666}${cpubar cpu2 10}${color}
    Core 3:$alignr${cpu cpu3}%
    Frequency:$alignr${freq cpu3}MHz 
    ${lua_parse conky_colourise_cpu_bar 3 0x666666}${cpubar cpu3 10}${color}
    Core 4:$alignr${cpu cpu4}%
    Frequency:$alignr${freq cpu4}MHz 
    ${lua_parse conky_colourise_cpu_bar 4 0x666666}${cpubar cpu4 10}${color}
    Core 5:$alignr${cpu cpu5}%
    Frequency:$alignr${freq cpu5}MHz
    ${lua_parse conky_colourise_cpu_bar 5 0x666666}${cpubar cpu5 10}${color}
    Core 6:$alignr${cpu cpu6}%
    Frequency:$alignr${freq cpu6}MHz 
    ${lua_parse conky_colourise_cpu_bar 6 0x666666}${cpubar cpu6 10}${color}
    Core 7:$alignr${cpu cpu7}%
    Frequency:$alignr${freq cpu7}MHz 
    ${lua_parse conky_colourise_cpu_bar 7 0x666666}${cpubar cpu7 10}${color}
    Core 8:$alignr${cpu cpu8}%
    Frequency:$alignr${freq cpu8}MHz 
    ${lua_parse conky_colourise_cpu_bar 8 0x666666}${cpubar cpu8 10}${color}
    
    Load:${alignr}${loadavg}
    
    P R O C E S S
    ${hr}
    Name${goto 145}CPU%${goto 185}MEM%
    ${top name 1}${goto 145}${top cpu 1}${goto 185}${top mem 1}
    ${top name 2}${goto 145}${top cpu 2}${goto 185}${top mem 2}
    ${top name 3}${goto 145}${top cpu 3}${goto 185}${top mem 3}
    ${top name 4}${goto 145}${top cpu 4}${goto 185}${top mem 4}
    ${top name 5}${goto 145}${top cpu 5}${goto 185}${top mem 5}
    ${top name 6}${goto 145}${top cpu 6}${goto 185}${top mem 6}
    ${top name 7}${goto 145}${top cpu 7}${goto 185}${top mem 7}
    ${top name 8}${goto 145}${top cpu 8}${goto 185}${top mem 8}
    
    W I R E L E S S 
    ${hr}
    Down:${alignr}${downspeed wlan0}
    Up:${alignr}${upspeed wlan0}
    ${downspeedgraph wlan0 25,120 000000 ff0000} ${alignr}${upspeedgraph wlan0 
    25,120 000000 00ff00}$color
    Total: ${totaldown wlan0} ${alignr}Total: ${totalup wlan0}
    And a modified weather_script.lua from v9000. Thanks to Sector11 for linking to this set of scripts by mrpeachy on the #! forums
    Code:
    --DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION-
    _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="mono"--font must be in quotes
    default_font_size=12
    default_color=0xffffff--white
    default_alpha=1--fully opaque
    default_image_width=50
    default_image_height=50
    --END OF DEFAULTS #######################################################
    --START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
    starty=455
    gap=15
    ypos=0
    ypos=starty+ypos
    out({c=0xffffff,a=1,f="mono",fs=14,x=5,y=ypos,txt="Current Weather for "..now["time"]})
    ypos=gap+ypos
    out({c=0xffffff,a=1,f="mono",fs=12,x=5,y=ypos,txt=weather_location})
    image({x=170,y=0,h=40,w=40,file=now["weather_icon"]})
    image({x=220,y=0,h=40,w=40,file=now["wind_icon"]})
    --data titles
    ypos=gap+ypos + 10
    out({c=0xffffff,a=1,f="mono",fs=12,x=5,y=ypos,txt="Conditions:"})
    ypos=gap+ypos
    out({c=0xffffff,a=1,f="mono",fs=12,x=25,y=ypos,txt="Temperature:"})
    ypos=gap+ypos
    out({c=0xffffff,a=1,f="mono",fs=12,x=25,y=ypos,txt="Feels Like:"})
    ypos=gap+ypos
    out({c=0xffffff,a=1,f="mono",fs=12,x=25,y=ypos,txt="      Wind:"})
    --output of data options
    ypos=0
    ypos=starty+gap+gap+ypos + 10
    out({c=0xffffff,a=1,f="mono",fs=12,x=125,y=ypos,txt=now["conditions_short"]})
    ypos=gap+ypos
    out({c=0xffffff,a=1,f="mono",fs=12,x=125,y=ypos,txt=now["temp"].."°"})
    ypos=gap+ypos
    out({c=0xffffff,a=1,f="mono",fs=12,x=125,y=ypos,txt=now["feels_like"].."°"})
    ypos=gap+ypos
    out({c=0xffffff,a=1,f="mono",fs=12,x=125,y=ypos,txt=now["wind_mph"]})
    
    --########################################################################################
    --start or weather forecast repeat section
    --set start forecast day
    start_day=1
    --set total forecast days you want to display
    number_of_days=4
    topy=570
    ygap=80
    --set coordinates for top lef corners for each repeat
    top_left_x_coordinate[1],top_left_y_coordinate[1]=5,topy
    top_left_x_coordinate[2],top_left_y_coordinate[2]=150,topy
    ady=topy+ygap
    top_left_x_coordinate[3],top_left_y_coordinate[3]=5,ady
    top_left_x_coordinate[4],top_left_y_coordinate[4]=150,ady
    --########################################################################################
    for i=start_day,number_of_days-(start_day-1) do--start of day repeat, do not edit ########
    local tlx=top_left_x_coordinate[i]--sets top left x position for each repeat ###################
    local tly=top_left_y_coordinate[i]--sets top left y position for each repeat ###################
    --########################################################################################
    out({c=0xffffff,a=1,f="mono",fs=12,x=tlx,y=tly,txt=forecast_day[i].." "..forecast_date[i]})
    image({x=tlx,y=tly+5,h=30,w=30,file=weather_icon[i]})
    out({c=0xffffff,a=1,f="mono",fs=12,x=tlx+35,y=tly+15,txt=high_temp[i].."°/"..low_temp[i].."°"})
    out({c=0xffffff,a=1,f="mono",fs=12,x=tlx,y=tly+50,txt=conditions_short[i]})
    --########################################################################################
    end--of forecast repeat section ##########################################################
    --########################################################################################
    
    --########################################################################################
    --END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
    --#######################################################################
    end--of weather_display function do not edit this line ##################
    --#######################################################################
    Sector11 likes this.
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    Conkybots: Interactive plugins for your Conkys!

  6. #26
    Just Joined! Sector11's Avatar
    Join Date
    Aug 2012
    Location
    With my wife.
    Posts
    23
    Quote Originally Posted by elija View Post
    Siduction running XFCE (with Compiz, Emerald and two conkys)
    Nice ... There were conkys on the screen? All I saw was a tattoo and had a terrific urge to take up swimming lessons.
    Until my wife smacked me in the back of the head that is.

    8 cores! {sigh} See I saw the conkys too. Nice work.

    PS:
    Keep tabs on mrpeachy's v9000 LUA weather script, there's a few updates in the wind.

    Always being interested in "weather" for conky I would be remiss if I didn't mention some alternatives:

    1. conkyForecast (deb based version - python scripts works with Debian just fine) - [ARCH] yes the original works again without the:
    Code:
    XOAP_PARTNER_ID = <No Longer Required>
    XOAP_LICENCE_KEY = <No Longer Required>
    Check the last couple of pages of that thread.

    2. TeoBigusGeekus - 'Bash' weather scripts using Accuweather/WUnderground/NWS/Weather.com, and

    3. Arclance's weather - he get's the information from various sites and uses mrpeachys "button" script to make it interactive.

    Other than the last I've samples them all and offer support for them as well.

  7. #27
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,284
    You can look at that - it's a drawing!

    A drawing by a scarily talented artist called Hajime Soryama. That link is not safe for kids, work or wives.
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    Conkybots: Interactive plugins for your Conkys!

  8. #28
    Just Joined! Sector11's Avatar
    Join Date
    Aug 2012
    Location
    With my wife.
    Posts
    23
    There is a fix to the Chronograph-Didier-T-2.lua found in post #14 and post #17 - and better than the alternative.

    It works but the code could be and is being cleaned up. Here it is with the latest fix by mrpeachy, depending on the day it shows odd or even number days in the day number circle

    <<-- 22 Nov | Nov 23 -->>

    And some options in action: http://dl.dropbox.com/u/16070765/Oth...ronograph.mpeg

  9. #29
    Just Joined! Sector11's Avatar
    Join Date
    Aug 2012
    Location
    With my wife.
    Posts
    23
    Quote Originally Posted by elija View Post
    You can look at that - it's a drawing!

    A drawing by a scarily talented artist called Hajime Soryama. That link is not safe for kids, work or wives.
    That "or wives" got a chuckle. My wife actually liked the tattoo and the artwork. But definitely not on "our" computer.

  10. #30
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    Quote Originally Posted by elija View Post
    You can look at that - it's a drawing!

    A drawing by a scarily talented artist called Hajime Soryama. That link is not safe for kids, work or wives.
    You could almost use that exact quote as advertisement for the art and/or site!
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

Page 3 of 4 FirstFirst 1 2 3 4 LastLast

Posting Permissions

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