Conky Showoff thread

Forum rules
Before you post please read this

Re: Conky Showoff thread

Postby Sector11 on Sat Nov 03, 2012 5:09 pm

fog wrote:An "old fashioned" conky and openbox.

Image

@ Sector11 This means a lot to hear from a conky master. Thank you. :)


You're welcome, that was without a doubt a beauty. I see you did another. Oh the nostalgia of that.
Back in the days when conky didn't do much more that text. I think we all revisit a text conky now and then.
#! pushed to Debian SID & OpenBox
Conky PitStop
User avatar
Sector11
Level 1
Level 1
 
Posts: 37
Joined: Mon Nov 22, 2010 10:33 am

Linux Mint is funded by ads and donations.
 

Re: Conky Showoff thread

Postby Sector11 on Sat Nov 03, 2012 5:13 pm

McLovin over on the #! Forums borrowed my Chronograph clock and made it his way. I stole his and made it my way.

Image
We both learn!
BTW: That's ConkyForecast up and running again.
I like it!
#! pushed to Debian SID & OpenBox
Conky PitStop
User avatar
Sector11
Level 1
Level 1
 
Posts: 37
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby Sector11 on Sat Nov 03, 2012 8:04 pm

@ McLovin - looks like we're following each other. :D

McLoving borrowed mine, I borrowed his:
Image

The conky: /media/5/Conky/McBars/Chronograph.conky

Code: Select all
# killall conky & conky -c /media/5/Conky/McBars/Chronograph.conky &
######################
# - Conky settings - #
######################

background no
update_interval 1
cpu_avg_samples 1
total_run_times 0
override_utf8_locale yes

double_buffer yes
#no_buffers yes

text_buffer_size 1024 #10240
imlib_cache_size 0 #10240

minimum_size 350 350
maximum_width 350

#####################
# - Text settings - #
#####################
use_xft yes
xftfont CorporateMonoExtraBold:size=10
xftalpha 1 #.8

uppercase no

# Text alignment, other possible values are commented
#alignment middle_left
#alignment middle_middle
#alignment middle_right
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
#alignment bottom_middle

gap_x 5
gap_y 5


######################
# - Color settings - #
######################
default_color c3c3c3
default_shade_color gray
default_outline_color black

color0 c3c3c3 #mid gray
color1 FF0000 #red
color2 09FF00 #bright green
color3 007EFF #bright blue
color4 E3E3E3 #very light gray
color5 FF8600 #an orange shade
color6 CA8718 #a dust like color
color7 FFE500 #a darker yellow color
color8 C3FF00 #lime green
color9 00FCFF #sky blue
#############################
# - Window specifications - #
#############################
###################################################################################################
# - Create own window instead of using desktop (required in all file-managers, other than caja) - #
###################################################################################################
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_colour gray
own_window_class Conky
own_window_title Chronograph


border_inner_margin 0
border_outer_margin 0

#########################
# - Graphics settings - #
#########################
draw_shades no #yes
draw_outline no
draw_borders no
stippled_borders 0
draw_graph_borders no

####################
# - LUA Settings - #
####################
#lua_load /media/5/conky/McBars_McLovin/McBars/scripts/draw-bg.lua  ###########################################################
#lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.3  #### - Uncoment these lines to have BG-Image -#
#lua_draw_hook_post draw-bg 125 0 0 0 0 0x000000 0.01  ############################################
lua_load /media/5/Conky/McBars/scripts/Chronograph.lua
lua_draw_hook_post main
#lua_load /media/5/conky/McBars_McLovin/McBars/scripts/clock_rings.lua
#lua_draw_hook_pre clock_rings
lua_load /media/5/Conky/LUA/draw-bg.lua

TEXT
${lua conky_draw_bg 15 0 0 0 0 0x000000 0.5}${execpi 3600 conkyForecast --hideunits --template=/media/5/Conky/McBars/scripts/chronograph.weather.template}


/media/5/Conky/McBars/scripts/Chronograph.lua
Code: Select all
--[[ 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

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)
-- ########################################################
-- 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, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 12)
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",}
-- text_days={"DOM","LUN","MAR","MIE","JUE","VIE","SAB",}
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()
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, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 12)
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",}
-- text_days={"ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC",}
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()
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, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 8)
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
local text=i
local extents=cairo_text_extents_t:create()
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,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, 12)
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()
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_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)
]]
-- ####################################################################
-- 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, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 16)
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()
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


The conkyForecast template: /media/5/Conky/McBars/scripts/chronograph.weather.template
Code: Select all
 Sunrise${goto 290}Sunset
 [--datatype=SR]${goto 300}[--datatype=SS]


${goto 55}Visible${goto 240}Rain?
${goto 55}[--datatype=VI]${goto 240}[--datatype=PC]







${goto 55}High: [--datatype=HT --startday=0]${goto 235}Now: [--datatype=LT --night]
${goto 70}Low: [--datatype=LT --startday=0]${goto 230}FL: [--datatype=LT --night]
${goto 90}Bar: [--datatype=BR]${goto 220}UV: [--datatype=UI]
${goto 120}Humidity: [--datatype=HM]${image [--datatype=MI] -p 150,73 -s 50x50}
 Daylight${goto 140}Dew: [--datatype=DP]${image [--datatype=WI] -p 125,170 -s 100x100 -n}${goto 300}Wind
 [--datatype=DL]${goto 260}[--datatype=WD] @ [--datatype=WS]


/media/5/Conky/LUA/draw-bg.lua
Code: Select all
--[[Background originally by londonali1010 (2009)
    ability to set any size for background mrpeachy 2011
    ability to set variables for bg in conkyrc dk75

  the change is that if you set width and/or height to 0
  then it assumes the width and/or height of the conky window

so:

Above and After TEXT  (requires a composite manager or it blinks!)

 lua_load ~/wea_conky/draw_bg.lua
 TEXT
 ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}

OR Both above TEXT (no composite manager required - no blinking!)

 lua_load ~/wea_conky/draw_bg.lua
 lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
 TEXT

Note
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
  See below:        1  2 3 4 5 6        7

${lua conky_draw_bg corner_radius x_position y_position width height color alpha}

covers the whole window and will change if you change the minimum_size setting

1 = 20             corner_radius
2 = 0             x_position
3 = 0             y_position
3 = 0             width
5 = 0             height
6 = 0x000000      color
7 = 0.4           alpha

######### calendar function ##################################################

then to use it, you activate the calendar function BELOW TEXT like this

${lua luacal {settings}}

#${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}
#    x=x position top left
#    y=y position top left
#    tf=title font, eg "mono" must be in quotes
#    tfs=title font size
#    tc=title color
#    ta=title alpha
#    bf=body font, eg "mono" must be in quotes
#    bfs=body font size
#    bc=body color
#    ba=body alpha
#    hf=highlight font, eg "mono" must be in quotes
#    hfs=highlight font size
#    hc=highlight color
#    ha=highlight alpha
#    sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts

#    gt=gap from title to body
#    gh=gap horizontal between columns
#    gv=gap vertical between rows
#    sd=start day, 0=Sun, 1=Mon

#    hstyle = heading style, 0=just days, 1=date insert
#    tdf=title date font, eg "mono" must be in quotes
#    tdfs=title date font size
#    tdc=title date color
#    tda=title date alpha

# test line
-- ${lua luacal {x=10,y=100,tf="Purisa",tfs=24,tc=0xf67e16,ta=1,bf="First Order",bfs=26,bc=0xecd32a,ba=1,hf="Purisa",hfs=18,hc=0xf67e16,ha=1,sp=" ",gh=40,gt=25,gv=20,sd=0,hstyle=1,tdf="First Order",tdfs=28,tdc=0xff0000,tda=1}}


]]

require 'cairo'
local    cs, cr = nil
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end
-- ###### calendar function ##################################################
function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--############################################################################
if caltab.x==nil then
caltab=loadstring("return" .. caltab)()
end
local cal_x=caltab.x
local cal_y=caltab.y
local tfont=caltab.tf        or "mono"
local tfontsize=caltab.tfs    or 12
local tc=caltab.tc        or 0xffffff
local ta=caltab.ta        or 1
local bfont=caltab.bf        or "mono"
local bfontsize=caltab.bfs    or 12
local bc=caltab.bc        or 0xffffff
local ba=caltab.ba        or 1
local hfont=caltab.hf        or "mono"
local hfontsize=caltab.hfs    or 12
local hc=caltab.hc        or 0xff0000
local ha=caltab.ha        or 1
local spacer=caltab.sp        or " "
local gaph=caltab.gh        or 20
local gapt=caltab.gt        or 15
local gapl=caltab.gv        or 15
local sday=caltab.sd        or 0
local hstyle=caltab.hstyle    or 0
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
--############################################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
    if i<=start_day then
    dnum[i]="  "
    else
    dn=i-start_day
        if dn=="nil" then dn=0 end
        if dn<=9 then dn=(spacer .. dn) end
        if i>x then dn="" end
        dnum[i]=dn
        dnumh[i]=dn
        if dn==(spacer .. today) or dn==today then
        dnum[i]=""
        end
        if dn==(spacer .. today) or dn==today then
        dnumh[i]=dn
        place=i
        else dnumh[i]="  "
        end
    end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
if hstyle==0 then
    if tonumber(sday)==0 then
    dys={"SU","MO","TU","WE","TH","FR","SA"}
    else
    dys={"MO","TU","WE","TH","FR","SA","SU"}
    end
    --draw calendar titles
elseif hstyle==1 then
    if tonumber(sday)==0 then
    dys={"SU","MO"," ","  ","  ","FR","SA"}
    cairo_text_extents(cr,"MO",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    else
    dys={"MO","TU"," ","  ","  ","SA","SU"}
    cairo_text_extents(cr,"TU",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    end
end
--draw calendar titles
for i=1,7 do
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnum[i])
    cairo_stroke (cr)
    end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnumh[i])
    cairo_stroke (cr)
    end
end
--############################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function#######################################################


and my: /home/sector11/.conkyForecast.config
Code: Select all
#=============================================#
# EXPERT SETTINGS, NOT REQUIRED TO BE ALTERED #
#=============================================#
#BASE_XOAP_URL = http://xoap.weather.com/weather/local/<LOCATION>?cc=*&dayf=5&link=xoap&prod=xoap&par=<XOAP_PARTNER_ID>&key=<XOAP_LICENCE_KEY>&unit=m
BASE_XOAP_URL = http://xml.weather.com/weather/local/<LOCATION>?cc=*&dayf=10&link=xoap&prod=xoap&par=<XOAP_PARTNER_ID>&key=<XOAP_LICENCE_KEY>&unit=m
MAXIMUM_DAYS_FORECAST = 9

#===============================================#
# USER SETTINGS, EDIT BASED ON DOCUMENTED SETUP #
#===============================================#
CACHE_FOLDERPATH = /home/sector11/Conky/cache/
CONNECTION_TIMEOUT = 5
EXPIRY_MINUTES = 30
TIME_FORMAT = %H:%M
DATE_FORMAT = %Y-%m-%d
LOCALE = en
XOAP_PARTNER_ID =
XOAP_LICENCE_KEY =
DEFAULT_LOCATION = ARBA0009
AUTO_NIGHT = TRUE
PROXY_HOST =
PROXY_PORT = 8080
PROXY_USERNAME =
PROXY_PASSWORD =
#! pushed to Debian SID & OpenBox
Conky PitStop
User avatar
Sector11
Level 1
Level 1
 
Posts: 37
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby McLovin on Sun Nov 04, 2012 5:55 pm

Lol, well, I actually started in the Linux devel world here at Mint, been involved since v2.1, user since 2.0, but yeah.......
Ring around the rosie, pocket full of posies, ashes ashes, we all fall down

ok, now for musical conki, (would that be the plural of conky? hmmm, I think the conky world needs to get together to discuss this).
Ok, once again, altered the clock, moved the wind info inside the clock, ad added the minute numbers.
Other than that, still more or less the same
Image
Here is the altered Chronograph.lua with the minutes in it,
Code: Select all
--[[ 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
 02 Nov 2012 - edited by McLovin to add the outside rings, and minute numbers
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)
-- ########################################################
-- 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=12 -- 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, "Santana", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 12)
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",}
-- text_days={"DOM","LUN","MAR","MIE","JUE","VIE","SAB",}
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()
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, "Santana", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 12)
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",}
-- text_days={"ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC",}
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()
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, "Santana", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 8)
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
local text=i
local extents=cairo_text_extents_t:create()
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,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, "Santana", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 12)
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()
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=12
-- 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_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)
]]
-- ####################################################################
-- 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=100
local x1=0+radius1*math.sin(arc)
local y1=0-radius1*math.cos(arc)
--calculate point 2
local radius2=151
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, "Santana", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 16)
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={"12","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,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()
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

-- POSITION FOR TEXT HOUR NUMBERS
local center_x=175
local center_y=175
local radius=160
-- FONT
cairo_select_font_face (cr, "Santana", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 12)
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={"","1","2","3","4","","6","7","8","9","","11","12","13","14","","16","17","18","19","","21","22","23","24","","26","27","28","29","","31","32","33","34","","36","37","38","39","","41","42","43","44","","46","47","48","49","","51","52","53","54","","56","57","58","59","",}
for i=1,60 do
-- OUTTER POINTS POSTION FOR TEXT
local point=(math.pi/180)*((360/60)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
local text=text_days[i]--gets text from table
local extents=cairo_text_extents_t:create()
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,60 do
local point=(math.pi/180)*((360/60)*(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

ok, Sector11, aaaaaaaaaaaaaaand GO!
User avatar
McLovin
Level 5
Level 5
 
Posts: 782
Joined: Thu Aug 23, 2007 6:53 pm

Re: Conky Showoff thread

Postby FrankenCub on Wed Nov 07, 2012 12:57 am

Wow, Sector11, that clock is sweet !
Making some headway with mine.
Image
User avatar
FrankenCub
Level 1
Level 1
 
Posts: 9
Joined: Thu Nov 01, 2012 4:44 am

Re: Conky Showoff thread

Postby Sector11 on Wed Nov 07, 2012 8:54 am

FrankenCub wrote:Wow, Sector11, that clock is sweet !
Making some headway with mine.
Image


VinDSL and Teo combo?

Thank you, I've made some changes:
Image

I wonder how long it will be before I change again.
#! pushed to Debian SID & OpenBox
Conky PitStop
User avatar
Sector11
Level 1
Level 1
 
Posts: 37
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby FrankenCub on Wed Nov 07, 2012 7:44 pm

Sector11 wrote:
FrankenCub wrote:Wow, Sector11, that clock is sweet !
Making some headway with mine.
Image


VinDSL and Teo combo?

Thank you, I've made some changes:
Image

I wonder how long it will be before I change again.


Yep :-) You've had a huge hand in helping me sort out many issues over on the Ubuntu forum also. I have been stuck in the crowd that was experiancing constant freezes, found workarounds then freezes again after updates. So, until things are sorted out with Ubuntu I've abandoned it. I'm actually taking a liking to Mint though. Once I get these sorted I have some ideas to pull information for my astronomy forcast that shows the skys transparency and seeing from a local observatory.
User avatar
FrankenCub
Level 1
Level 1
 
Posts: 9
Joined: Thu Nov 01, 2012 4:44 am

Re: Conky Showoff thread

Postby Sector11 on Thu Nov 08, 2012 9:19 pm

FrankenCub wrote:Yep :-) You've had a huge hand in helping me sort out many issues over on the Ubuntu forum also. I have been stuck in the crowd that was experiancing constant freezes, found workarounds then freezes again after updates. So, until things are sorted out with Ubuntu I've abandoned it. I'm actually taking a liking to Mint though. Once I get these sorted I have some ideas to pull information for my astronomy forcast that shows the skys transparency and seeing from a local observatory.


CLICK! Now I hear the bells ringing. :D

What version of Mint you running?

Anyway, I came here to post a new look for me - two tiny conkys on the right top and bottom and one huge on on the left. Been many a year since I've run one conky that big down a sided of my screen, and it was on the right. :D

Image <<-- Here I am reving it up for it's third public appearance.
#! pushed to Debian SID & OpenBox
Conky PitStop
User avatar
Sector11
Level 1
Level 1
 
Posts: 37
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby FrankenCub on Thu Nov 08, 2012 10:02 pm

Sector11 wrote:
FrankenCub wrote:Yep :-) You've had a huge hand in helping me sort out many issues over on the Ubuntu forum also. I have been stuck in the crowd that was experiancing constant freezes, found workarounds then freezes again after updates. So, until things are sorted out with Ubuntu I've abandoned it. I'm actually taking a liking to Mint though. Once I get these sorted I have some ideas to pull information for my astronomy forcast that shows the skys transparency and seeing from a local observatory.


CLICK! Now I hear the bells ringing. :D

What version of Mint you running?

Anyway, I came here to post a new look for me - two tiny conkys on the right top and bottom and one huge on on the left. Been many a year since I've run one conky that big down a sided of my screen, and it was on the right. :D

Image <<-- Here I am reving it up for it's third public appearance.


Ding Ding Ding :-D It's a great forum, and the nets best conky thread IMO. I'm running Mint 13 Cinnamon due to https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/993187. Mint is winning me over pretty good, it's simple and plain works. I like Unity and the Lens set up but I'm learning to live without it :wink:

rofl...I was just telling my wife today she should buy herself one of those Smart cars, her Neon has 300k on it and is starting to get tired lol. I GOTTA show her this one !! I love how your panel has the transparent boxes, how did you do that ?
User avatar
FrankenCub
Level 1
Level 1
 
Posts: 9
Joined: Thu Nov 01, 2012 4:44 am

Re: Conky Showoff thread

Postby Sector11 on Thu Nov 08, 2012 10:27 pm

FrankenCub wrote:Ding Ding Ding :-D It's a great forum, and the nets best conky thread IMO. I'm running Mint 13 Cinnamon due to https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/993187. Mint is winning me over pretty good, it's simple and plain works. I like Unity and the Lens set up but I'm learning to live without it :wink:

rofl...I was just telling my wife today she should buy herself one of those Smart cars, her Neon has 300k on it and is starting to get tired lol. I GOTTA show her this one !! I love how your panel has the transparent boxes, how did you do that ?


There is a reason Mint is #1 at DistroWatch and Ubuntu has dropped to 3rd slot! Mint is doing something right. :mrgreen:

But I am stuck on Debian SID and #! OpenBox.

The CrunchBang Monster Conky Thread is giving the Ubuntu thread a run for it's money. :D

That panel on the bottom is "tint2" and I LOVE IT! highly configurable. Check it out.
1. a left click on the clock - and it's KFC!! --- Kentucky Fried Conky (Killall conky)
2. a right click does the ssc.sh trick - kills all conkys that are running or starts them all if they aren't.

I kind like the look of the new Fiat 500, I call them "back pocket cars" :lol:
#! pushed to Debian SID & OpenBox
Conky PitStop
User avatar
Sector11
Level 1
Level 1
 
Posts: 37
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby FrankenCub on Fri Nov 09, 2012 7:10 pm

Sector11 wrote:
There is a reason Mint is #1 at DistroWatch and Ubuntu has dropped to 3rd slot! Mint is doing something right. :mrgreen:

But I am stuck on Debian SID and #! OpenBox.

The CrunchBang Monster Conky Thread is giving the Ubuntu thread a run for it's money. :D

That panel on the bottom is "tint2" and I LOVE IT! highly configurable. Check it out.
1. a left click on the clock - and it's KFC!! --- Kentucky Fried Conky (Killall conky)
2. a right click does the ssc.sh trick - kills all conkys that are running or starts them all if they aren't.

I kind like the look of the new Fiat 500, I call them "back pocket cars" :lol:

Yes. they certainly are ! The only OS's I've ever used after Microlimp are Ubuntu and Mint, I thought about trying #! after getting so upset with U12.04 but settled here. I'd like to get an SDD to play around with different flavors of Linux at some point.

I'll read through that #! conky thread some tonight, took a quick look at the tint2 threads last night, looks interesting. So that will work with Mint Cinnamon ? I will definitely look more at that tonight too.

I like that new Fiat too, the back pocket seating is a big plus lol. That has a regular manual trans too which I like better, but the wife can't drive those. I guess the Smart wouldn't work very well here with having to transport kids and grandkids. I really like that Mercedes is involved with them, I drove a Mercedes 220 for a long time and absolutly loved it. For an old model it handled surprisingly well, rode beautifully, and was quite fuel efficiant. Wouldn't mind having another one actually.
User avatar
FrankenCub
Level 1
Level 1
 
Posts: 9
Joined: Thu Nov 01, 2012 4:44 am

Re: Conky Showoff thread

Postby Sector11 on Fri Nov 09, 2012 9:49 pm

FrankenCub wrote:I'll read through that #! conky thread some tonight, took a quick look at the tint2 threads last night, looks interesting. So that will work with Mint Cinnamon ? I will definitely look more at that tonight too.


Not sure, you'd have to check the Mint forums - I'll bet it's in the repos - works well with OpenBox, but I don't know Cinnamon other than on apple pies and eggnogs. :D
#! pushed to Debian SID & OpenBox
Conky PitStop
User avatar
Sector11
Level 1
Level 1
 
Posts: 37
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby FrankenCub on Sat Nov 10, 2012 1:25 am

Sector11 wrote:
FrankenCub wrote:I'll read through that #! conky thread some tonight, took a quick look at the tint2 threads last night, looks interesting. So that will work with Mint Cinnamon ? I will definitely look more at that tonight too.


Not sure, you'd have to check the Mint forums - I'll bet it's in the repos - works well with OpenBox, but I don't know Cinnamon other than on apple pies and eggnogs. :D

oh oh oh it IS in the repos :D
After furthor reading it looks like I'll be violating my new os resolution, I was gonna leave well enough alone. Shot that all to hell, tint2 look cool :lol:
Cinnamon & Eggnog.....the best part of this season too, I may have to run to town tonight :mrgreen:
User avatar
FrankenCub
Level 1
Level 1
 
Posts: 9
Joined: Thu Nov 01, 2012 4:44 am

Re: Conky Showoff thread

Postby fog on Sun Nov 11, 2012 4:23 am

Image

A simple conky. Mint 13, openbox and tint2.
I'm not anti-social I'm just not user friendly
Sometimes I shoot, sometimes I write
fog
Level 1
Level 1
 
Posts: 9
Joined: Mon Apr 30, 2007 7:35 am
Location: Athens, Greece

Re: Conky Showoff thread

Postby Sector11 on Sun Nov 11, 2012 11:02 am

fog wrote:Image

A simple conky. Mint 13, openbox and tint2.


@ FrankenCub - see Mint with OB and Tint2 --- you're on your way. :)

@ fog - that's one interesting conky.
- Care to share the code?
- What are "dots" under TEMP, FREE UP DOWN NEW for?
- - or are they there to match the two "bars"?

Took me a second or third look to notice those. Nice idea!
#! pushed to Debian SID & OpenBox
Conky PitStop
User avatar
Sector11
Level 1
Level 1
 
Posts: 37
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby fog on Tue Nov 13, 2012 8:53 am

Sector11 wrote:
fog wrote:Image

A simple conky. Mint 13, openbox and tint2.


@ fog - that's one interesting conky.
- Care to share the code?
- What are "dots" under TEMP, FREE UP DOWN NEW for?
- - or are they there to match the two "bars"?

Took me a second or third look to notice those. Nice idea!

The dots are indicators.
Place change: AM or PM, cpu or ram line etc.
Color change: emails or updates for yes or no, temp (green low temp, yellow not so low, red hot) etc.

Better looking on black for this colors:

Image

Details here:

Code: Select all
background yes
update_interval 1

cpu_avg_samples 2
net_avg_samples 2
temperature_unit celsius

double_buffer yes
no_buffers yes
text_buffer_size 2048

gap_x 0
gap_y 10
minimum_size 101 500
maximum_width 101
own_window yes
#own_window_argb_visual yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
alignment top_right

draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

override_utf8_locale yes
use_xft yes
xftfont DS\-Digital:Bold:size=20
xftalpha 0.8
uppercase no
default_shade_color 000000
default_color F3F3F3  #B54A27
color1 FFFF00
color2 FF3939
color3 00FFFB

TEXT

${font DS\-Digital:Bold:size=24}
${voffset 16}${offset 15}${time %I}:${time %M}
$font    ${voffset 40}${cpu cpu0}${font DS\-Digital:Bold:size=15}%
$font    ${voffset 42}${memperc}${font DS\-Digital:Bold:size=15}%
$font  ${voffset 42}${hwmon 0 temp 1}${font DS\-Digital:Bold:size=15} c
$font  ${voffset 34}${fs_free_perc /}${font DS\-Digital:Bold:size=15}% 
$font  ${voffset 32}${fs_free_perc /media/data}${font DS\-Digital:Bold:size=15}% 
$font  ${voffset 118}${texeci 300 python ~/.scripts/gmailfix.py > ~/.gm}${exec tail -n 1 ~/.gm}${font Ubuntu:Bold:size=7}   MAILS 
$font  ${voffset 37}${execi 6000 aptitude search "~U" | wc -l > ~/.up}${exec tail -n 1 ~/.up}${font Ubuntu:Bold:size=7}   PACKAGES
${voffset -532}${offset 18}AM                  PM${font Ubuntu:size=7}
$color3${voffset -2}${if_match ${time %H}<12}${offset 23}$else${offset 73}${endif}*
$color${offset 5}${voffset 8}Cpu ${stippled_hr 1}
    ${voffset 34}${hr 1}$color3${voffset 3}${if_match ${cpu cpu0}<5}${offset -93}$else${if_match ${cpu cpu0}<10}${offset -88}$else${if_match ${cpu cpu0}<15}${offset -84}$else${if_match ${cpu cpu0}<20}${offset -79}$else${if_match ${cpu cpu0}<25}${offset -74}$else${if_match ${cpu cpu0}<30}${offset -70}$else${if_match ${cpu cpu0}<35}${offset -65}$else${if_match ${cpu cpu0}<40}${offset -60}$else${if_match ${cpu cpu0}<45}${offset -56}$else${if_match ${cpu cpu0}<50}${offset -51}$else${if_match ${cpu cpu0}<55}$color1${offset -46}$else${if_match ${cpu cpu0}<60}${offset -42}$color1$else${if_match ${cpu cpu0}<65}${offset -37}$color1$else${if_match ${cpu cpu0}<70}$color1${offset -32}$else${if_match ${cpu cpu0}<75}${offset -28}$color1$else${if_match ${cpu cpu0}<80}$color1${offset -23}$else${if_match ${cpu cpu0}<85}$color2${offset -18}$else${if_match ${cpu cpu0}<90}${offset -14}$color2$else${if_match ${cpu cpu0}<95}$color2${offset -9}$else${if_match ${cpu cpu0}<=100}$color2${offset -4}$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif*
$color${offset 5}${voffset 9}Ram ${stippled_hr 1}
    ${voffset 34}${hr 1}$color3${voffset 3}${if_match ${memperc}<5}${offset -93}$else${if_match ${memperc}<10}${offset -88}$else${if_match ${memperc}<15}${offset -84}$else${if_match ${memperc}<20}${offset -79}$else${if_match ${memperc}<25}${offset -74}$else${if_match ${memperc}<30}${offset -70}$else${if_match ${memperc}<35}${offset -65}$else${if_match ${memperc}<40}${offset -60}$else${if_match ${memperc}<45}${offset -56}$else${if_match ${memperc}<50}${offset -51}$else${if_match ${memperc}<55}$color1${offset -46}$else${if_match ${memperc}<60}$color1${offset -42}$else${if_match ${memperc}<65}$color1${offset -37}$else${if_match ${memperc}<70}${offset -32}$color1$else${if_match ${memperc}<75}$color1${offset -28}$else${if_match ${memperc}<80}$color1${offset -23}$else${if_match ${memperc}<85}${offset -18}$color2$else${if_match ${memperc}<90}$color2${offset -14}$else${if_match ${memperc}<95}${offset -9}$color2$else${if_match ${memperc}<=100}${offset -4}$color2$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif$endif* 
$color${offset 5}${voffset 9}Cpu Temp ${stippled_hr 1}   
${voffset 30}${offset 70}Temp
${color3}${if_match ${hwmon 0 temp 1} >45}${color1}${if_match ${hwmon 0 temp 1} >55}${color2}${endif}${endif}${voffset -1}${offset 79}* 
${voffset -2}$color${offset 5}System ${stippled_hr 1}
${voffset 28}${offset 70}Free
${color2}${if_match ${fs_free_perc /} >50}${color3}$else${if_match ${fs_free_perc /} >10}${color1}${endif}${endif}${voffset -1}${offset 78}*
${voffset -2}$color${offset 5}Data ${stippled_hr 1}
${voffset 28}${offset 70}Free
${color2}${if_match ${fs_free_perc /media/data} >50}${color3}$else${if_match ${fs_free_perc /media/data} >10}${color1}${endif}${endif}${voffset -1}${offset 78}*
${voffset -2}$color${offset 5}Net ${stippled_hr 1}
${voffset 23}${offset 73}Up
${color3}${voffset -1}${offset 76}*
$color${voffset 12}${offset 66}Down
${color3}${voffset -1}${offset 76}*
${voffset -2}$color${offset 5}Gmail ${stippled_hr 1}
${voffset 31}${offset 69}New
${color3}${voffset -1}${offset 76}${if_match ${exec tail -n 1 ~/.gm}>0}${color2}${endif}*
${voffset -2}$color${offset 5}Update ${stippled_hr 1}
${voffset 34}${offset 69}New
${color3}${voffset -2}${offset 76}${if_match ${exec tail -n 1 ~/.up}>0}${color2}${endif}*${voffset -13}
$color${font DS\-Digital:Bold:size=15}${voffset -178}    ${upspeedf wlan0}
    ${voffset 12}${downspeedf wlan0}
I'm not anti-social I'm just not user friendly
Sometimes I shoot, sometimes I write
fog
Level 1
Level 1
 
Posts: 9
Joined: Mon Apr 30, 2007 7:35 am
Location: Athens, Greece

Re: Conky Showoff thread

Postby Sector11 on Tue Nov 13, 2012 2:45 pm

fog wrote:The dots are indicators.
Place change: AM or PM, cpu or ram line etc.
Color change: emails or updates for yes or no, temp (green low temp, yellow not so low, red hot) etc.


OK ... now I have to play with it - I don't have wlan gmail etc ...

Every now an then along comes a nice simple conky that stands out and needs to be seen. because not all conkys are equal and that's the beauty of them.

I wanted yours for Conky PitStop, it's a piece of elegance that wants to be seen.

Gallery 2012 (2) and Featured (until the next one goes up)
I also added the text above explaining the dots in a README file.

Trying it now ... it's missing:
~/.scripts/gmailfix.py
~/.gm
~/.up
#! pushed to Debian SID & OpenBox
Conky PitStop
User avatar
Sector11
Level 1
Level 1
 
Posts: 37
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby fog on Tue Nov 13, 2012 3:38 pm

Updates in this version are for Ubuntu/Debian based distros (ubuntu users should install aptitude).
~/.gm and ~/.up files created "on the fly" from .conkyrc.
You can change wlan0 with eth0.

Original conky from nale12.

Thank you. :)

gmailfix.py (change username and password inside the "" with yours)
Code: Select all
import os
import string

#Enter your username and password below within double quotes
# eg. username="username" and password="password"
username="username"
password="password"

com="wget -O - https://"+username+":"+password+"@mail.google.com/mail/feed/atom --no-check-certificate"

temp=os.popen(com)
msg=temp.read()
index=string.find(msg,"<fullcount>")
index2=string.find(msg,"</fullcount>")
fc=int(msg[index+11:index2])

if fc==0:
   print "0"
else:
   print str(fc)

I'm not anti-social I'm just not user friendly
Sometimes I shoot, sometimes I write
fog
Level 1
Level 1
 
Posts: 9
Joined: Mon Apr 30, 2007 7:35 am
Location: Athens, Greece

Re: Conky Showoff thread

Postby Angelaki on Thu Nov 15, 2012 11:48 am

McLovin wrote:This is my latest conky, I used a lua script made by Sector11 from Conky Pit-Stop, and added another lua to draw a background a,d boarders to it, as well as make the hands have a thick to thin look to them.
The CPU bars come out from the center, and there are alarm colors for when things start to run really high.
The weather in the clock is conkyForecast from conky-companions, and there is a now playing feature on the bottom of the config on the right, it scrolls "Media Player Not Currently Running" if there is no medai player runng, and the noew playing info if there is, it auto detects which one is running (using Exaile. Rhythmbox, Banshee, Clementine, Guaydeque) and uses conky<Medaplayer> scripts from conky-companions as well.
There is also a transmission display on the bottom of the config on the left, using conkyTransmission, again, by conky-companions, that only shows if Transmission is running.
The calendar is shown with conkyGoogleCalendar by, you guessed it, conky-companions.

Image
click for full size preview

And you can download the full set-up, including a script that you can use a switch to turn it on and off, in an archive from here Download the full config


Please may I have your config??? Dropbox has 404 error!!!
Angelaki
Level 1
Level 1
 
Posts: 6
Joined: Fri Nov 13, 2009 3:40 am

Re: Conky Showoff thread

Postby Sector11 on Mon Dec 03, 2012 5:13 pm

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

Bunch of people to thank for this,

An extremely interesting clock!

conky:
Code: Select all
# killall conky && conky -c /media/5/Conky/jed_greyclock_conkyrc &
# from jed
# — Conky settings — #

background yes

update_interval 1
#total_run_times 0
#net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 256
imlib_cache_size 0


# — Window specifications — #
own_window_type normal #override
own_window_class Conky
own_window yes
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager

border_inner_margin 0
border_outer_margin 0

minimum_size 600 840
maximum_width 460

alignment br
gap_x 10
gap_y 30



# — Graphics settings — #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# — Text settings — #
use_xft yes
xftfont DS\-Digital:size=12
xftalpha 1.0

default_color 227992 ##dark red A84C47 ##opaque white FFFFFF
default_shade_color gray
default_outline_color black

color0 8FBC8F #143 188 143   DarkSeaGreen
color1 778899 #119 136 153   LightSlateGray
color2 FF8C00 #255 140   0   DarkOrange
color3 7FFF00 #127 255   0   Chartreuse
color4 FFA07A #255 160 122   LightSalmon
color5 FFDEAD #255 222 173   NavajoWhite
color6 00BFFF #  0 191 255   DeepSkyBlue
color7 00FFFF #  0 255 255   Cyan
color8 FFFF00 #255 255   0   Yellow
color9 B22222 #178  34  34   FireBrick

uppercase no
use_spacer right

# — Lua Load — #
lua_load /media/5/Conky/LUA/greyclock.lua
lua_draw_hook_post main
lua_load ~/v9000/v9000.lua
lua_draw_hook_pre weather
lua_load /media/5/Conky/LUA/chrono-full_jed.template.lua
#lua_load /media/5/Conky/LUA/crono_full_2.template.lua
lua_load /media/5/Conky/LUA/draw-bg.lua

TEXT
${lua conky_draw_bg 30 0 0 0 0 0x000000 0.5}


chrono-full_jed.template.lua - now modified
Code: Select all
--[[
 The latest script is a lua only weather script. aka: v9000
 http://crunchbang.org/forums/viewtopic.php?id=16100

 the file:
 http://dl.dropbox.com/u/19008369/weatheragain9000.lua.tar.gz

 mrppeachys LUA Tutorial
 http://crunchbang.org/forums/viewtopic.php?id=17246
]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="monofur"--font must be in quotes
default_font_size=16
default_color=0xffffff   --white
default_alpha=1      --fully opaque
default_image_width=50
default_image_height=50
-- ## New Options ###
default_face="bold"
-- "normal" for normal/normal
-- "bold" for normal/bold
-- "italic" for italic/normal
-- "bolditalic" for italic/bold
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE

--[[ forecast
datay=450  --375
datayy=15 --datay+(datayy*1)

datafx1=20

imgx=35
imgy=575
imgyy=60 -- imgy+(imgyy*1)
]]
-- forecast
datay=450
datayy=15 --datay+(datayy*1)

datafx1=20

imgx=45
imgy=575
imgyy=60 -- imgy+(imgyy*1)

ih=60
iw=60
-- ======================================================================
-- SUN & MOON RISE ------------------------------------------------------
   out({c=0xFAFAEC,a=1,x=10,y=25,txt="Sunrise"})
      out({c=0xFAFAEC,a=1,x=20,y=40,txt=sun_rise_24[1]})
   out({c=0xC0C0C0,a=1,x=382,y=25,txt="Moonrise"})
      out({c=0xC0C0C0,a=1,x=392,y=40,txt=moon_rise_24[1]})
-- SUN & MOON SET -------------------------------------------------------
   out({c=0xFAFAEC,a=1,x=10,y=410,txt="Sunset"})
      out({c=0xFAFAEC,a=1,x=15,y=425,txt=sun_set_24[1]})
   out({c=0xC0C0C0,a=1,x=382,y=410,txt="Moonset"})
      out({c=0xC0C0C0,a=1,x=392,y=425,txt=moon_set_24[1]})
-- ======================================================================
-- MOON PHASE - CENTRE --------------------------------------------------
   image({x=170,y=170,w=120,h=120,file=moon_icon[1]})
-- image({x=170,y=170,w=120,h=120,file="/media/5/Conky/images/red+.png"})
   out({c=0xFFFFFF,a=1.0,x=190,y=235,txt=moon_phase[1]})

-- ======================================================================
-- CURRENT FOR TODAY - SEE TOP LEFT -------------------------------------
   image({x=110,y=100,w=60,h=60,file=now["weather_icon"]})
-- image({x=110,y=100,w=60,h=60,file="/media/5/Conky/images/red+.png"})
   out({c=0xFAFAEC,a=1,x=120,y=100,txt="T "})
      out({c=0xFF8C00,fs=14,a=1,x=135,y=100,txt=now["temp"].."°"})
   out({c=0xC0C0C0,a=1,x=120,y=170,txt="± "})
      out({c=0xC0C0C0,fs=14,a=1,x=135,y=170,txt=now["feels_like"].."°"})

-- FORECAST TODAY - SEE TOP RIGHT ---------------------------------------
   image({x=285,y=100,w=60,h=60,file=weather_icon[1]})
-- image({x=285,y=100,w=60,h=60,file="/media/5/Conky/images/red+.png"})
   out({c=0xFF8C00,fs=14,a=1,x=295,y=100,txt="↑"})
     out({c=0xFF8C00,fs=14,a=1,x=305,y=100,txt=high_temp[1].."°"})
   out({c=0xC0C0C0,fs=14,a=1,x=295,y=170,txt="↓"})
     out({c=0xC0C0C0,fs=14,a=1,x=305,y=170,txt=low_temp[1].."°"})

-- ======================================================================
-- WIND INFORMATION - SEE BOTTOM ----------------------------------------
   image({x=185,y=290,w=90,h=90,file=now["wind_icon"]})
-- image({x=185,y=290,w=90,h=90,file="/media/5/Conky/images/red+.png"})
   out({c=0xffffff,a=0.5,x=158,y=341,txt=now["wind_deg"]})
   out({c=0xffffff,a=0.5,x=273,y=341,txt=now["wind_nesw"]})
--   out({c=0xffffff,a=1,x=333,y=295,txt="@"})
      out({c=0xffffff,a=0.5,x=200,y=390,txt=now["wind_km"].."3"})

-- ======================================================================
-- BOTTOM LEFT
-- Barometric Pressure
   out({c=0xFAFAEC,a=1,x=30,y=450,txt=" BP:"})
   out({c=0xC0C0C0,a=1,x=60,y=450,txt=now["pressure_mb"].." mb"})
-- Humidity -------------------------------------------------------------
   out({c=0xFAFAEC,a=1,x=90,y=495,txt="Hum:"})
      out({c=0xC0C0C0,a=1,x=135,y=495,txt=now["humidity"].."%"})
-- Dew Point ------------------------------------------------------------
   out({c=0xFAFAEC,a=1,x=90,y=520,txt="DP:"})
      out({c=0xC0C0C0,a=1,x=135,y=520,txt=now["dew_point"].."°"})
-- ======================================================================
-- BOTTOM RIGHT
-- Ceiling
-- out({c=0xFAFAEC,a=1,x=265,y=315,txt="Ceil:"})
--    out({c=0x227992,a=1,x=300,y=315,txt=now["ceiling"]})
-- Chance of Rain -------------------------------------------------------
   out({c=0xFAFAEC,a=1,x=270,y=495,txt="Rain:"})
      out({c=0xC0C0C0,a=1,x=325,y=495,txt=precipitation[1].."%"})
-- Cloud Cover
   out({c=0xFAFAEC,a=1,x=270,y=520,txt="Cloud:"})
      out({c=0xC0C0C0,a=1,x=325,y=520,txt=cloud_cover[1].."%"})
-- ======================================================================
-- BOTTOM CENTRE
-- UV -------------------------------------------------------------------
out({c=0xFAFAEC,a=1,x=330,y=450,txt="UV:"})
   out({c=0xC0C0C0,a=1,x=360,y=450,txt=uv_index_num[1]})
      out({c=0xC0C0C0,a=1,x=380,y=450,txt=uv_index_txt[1]})

-- ======================================================================
-- FORECAST FOR NEXT 3 HOURS --------------------------------------------
-- image({x=5,y=353,w=340,h=2,file="/media/5/Conky/images/LightSlateGrey_1.png"})
--out({c=0x227992,a=1,f="Arial",fs=16,x=10,y=448,txt="Next 3 Hours"})
-- out({c=0x227992,a=1,f="Arial",fs=16,x=35,y=463,txt="Hours"})
-- 1st hour
out({c=0xFF9600,x=31,y=470,txt=now["fc_hour1_time_24"]..":00"})
  image({w=60,h=60,x=20,y=475,file=now["fc_hour1_wicon"]})
-- image({w=60,h=60,x=20,y=475,file="/media/5/Conky/images/red+.png"})
out({c=0xAFAFAF,x=40,y=550,txt=now["fc_hour1_temp"] .."°"})
-- 2nd hour
out({c=0xFF9600,x=212,y=470,txt=now["fc_hour2_time_24"]..":00"})
  image({w=60,h=60,x=200,y=475,file=now["fc_hour2_wicon"]})
-- image({w=60,h=60,x=200,y=475,file="/media/5/Conky/images/red+.png"})
out({c=0xAFAFAF,x=221,y=550,txt=now["fc_hour2_temp"] .."°"})
-- 3rd hour
out({c=0xFF9600,x=392,y=470,txt=now["fc_hour3_time_24"]..":00"})
  image({w=60,h=60,x=380,y=475,file=now["fc_hour3_wicon"]})
-- image({w=60,h=60,x=380,y=475,file="/media/5/Conky/images/red+.png"})
out({c=0xAFAFAF,x=401,y=550,txt=now["fc_hour3_temp"] .."°"})

-- ======================================================================
-- FORECAST for the next 9 days
-- Forecast day 2 -- x = l|r  y = u|d
out({c=0x9ACD32,a=1,x=datafx1*0.4,y=datay+(datayy*8),txt=forecast_day_short[2]})
 out({c=0x9ACD32,a=1,x=datafx1*2.4,y=datay+(datayy*8),txt=forecast_date[2]})
  out({c=0x9ACD32,a=1,x=datafx1*4.0,y=datay+(datayy*8),txt=forecast_month_short[2]})
image({w=iw,h=ih,x=imgx*0.6,y=imgy,file=weather_icon[2]})
-- image({w=iw,h=ih,x=imgx*0.6,y=imgy,file="/media/5/Conky/images/red+.png"})
out({c=0xFF8C00,a=1,x=datafx1*0.4,y=datay+(datayy*9.5),txt=high_temp[2]})
out({c=0x00BFFF,a=1,x=datafx1*0.4,y=datay+(datayy*11),txt=low_temp[2]})
 out({c=0xFAFAEC,a=1,x=datafx1*4.6,y=datay+(datayy*9.0),txt=sun_rise_24[2]})
 out({c=0xFAFAEC,a=1,x=datafx1*4.6,y=datay+(datayy*10.1),txt=sun_set_24[2]})
  out({c=0xC0C0C0,a=1,x=datafx1*4.6,y=datay+(datayy*11.5),txt=moon_rise_24[2]})
  out({c=0xC0C0C0,a=1,x=datafx1*4.6,y=datay+(datayy*12.5),txt=moon_set_24[2]})
-- Forecast day 3 -- x = l|r  y = u|d
out({c=0x9ACD32,a=1,x=datafx1*8.3,y=datay+(datayy*8),txt=forecast_day_short[3]})
 out({c=0x9ACD32,a=1,x=datafx1*10.5,y=datay+(datayy*8),txt=forecast_date[3]})
  out({c=0x9ACD32,a=1,x=datafx1*12.2,y=datay+(datayy*8),txt=forecast_month_short[3]})
image({w=iw,h=ih,x=imgx*4.15,y=imgy,file=weather_icon[3]})
-- image({w=iw,h=ih,x=imgx*4.15,y=imgy,file="/media/5/Conky/images/red+.png"})
out({c=0xFF8C00,a=1,x=datafx1*8.2,y=datay+(datayy*9.5),txt=high_temp[3]})
out({c=0x00BFFF,a=1,x=datafx1*8.2,y=datay+(datayy*11),txt=low_temp[3]})
 out({c=0xFAFAEC,a=1,x=datafx1*12.6,y=datay+(datayy*9.0),txt=sun_rise_24[3]})
 out({c=0xFAFAEC,a=1,x=datafx1*12.6,y=datay+(datayy*10.1),txt=sun_set_24[3]})
  out({c=0xC0C0C0,a=1,x=datafx1*12.6,y=datay+(datayy*11.5),txt=moon_rise_24[3]})
  out({c=0xC0C0C0,a=1,x=datafx1*12.6,y=datay+(datayy*12.5),txt=moon_set_24[3]})
-- Forecast day 4 -- x = l|r  y = u|d
out({c=0x9ACD32,a=1,x=datafx1*16.0,y=datay+(datayy*8),txt=forecast_day_short[4]})
 out({c=0x9ACD32,a=1,x=datafx1*18.1,y=datay+(datayy*8),txt=forecast_date[4]})
  out({c=0x9ACD32,a=1,x=datafx1*19.8,y=datay+(datayy*8),txt=forecast_month_short[4]})
image({w=iw,h=ih,x=imgx*7.52,y=imgy,file=weather_icon[4]})
-- image({w=iw,h=ih,x=imgx*7.52,y=imgy,file="/media/5/Conky/images/red+.png"})
out({c=0xFF8C00,a=1,x=datafx1*15.8,y=datay+(datayy*9.5),txt=high_temp[4]})
out({c=0x00BFFF,a=1,x=datafx1*15.8,y=datay+(datayy*11),txt=low_temp[4]})
 out({c=0xFAFAEC,a=1,x=datafx1*20.3,y=datay+(datayy*9.0),txt=sun_rise_24[4]})
 out({c=0xFAFAEC,a=1,x=datafx1*20.3,y=datay+(datayy*10.1),txt=sun_set_24[4]})
  out({c=0xC0C0C0,a=1,x=datafx1*20.3,y=datay+(datayy*11.5),txt=moon_rise_24[4]})
  out({c=0xC0C0C0,a=1,x=datafx1*20.3,y=datay+(datayy*12.5),txt=moon_set_24[4]})
-- ======================================================================
-- Forecast day 5 -- x = l|r  y = u|d
  out({c=0x9ACD32,a=1,x=datafx1*0.4,y=datay+(datayy*14.5),txt=forecast_day_short[5]})
   out({c=0x9ACD32,a=1,x=datafx1*2.4,y=datay+(datayy*14.5),txt=forecast_date[5]})
    out({c=0x9ACD32,a=1,x=datafx1*4.0,y=datay+(datayy*14.5),txt=forecast_month_short[5]})
  image({w=iw,h=ih,x=imgx*0.6,y=imgy+(imgyy*1.6),file=weather_icon[5]})
--  image({w=iw,h=ih,x=imgx*0.6,y=imgy+(imgyy*1.6),file="/media/5/Conky/images/red+.png"})
  out({c=0xFF8C00,a=1,x=datafx1*0.4,y=datay+(datayy*16.2),txt=high_temp[5]})
  out({c=0x00BFFF,a=1,x=datafx1*0.4,y=datay+(datayy*17.7),txt=low_temp[5]})
   out({c=0xFAFAEC,a=1,x=datafx1*4.6,y=datay+(datayy*15.5),txt=sun_rise_24[5]})
   out({c=0xFAFAEC,a=1,x=datafx1*4.6,y=datay+(datayy*16.6),txt=sun_set_24[5]})
    out({c=0xC0C0C0,a=1,x=datafx1*4.6,y=datay+(datayy*18.0),txt=moon_rise_24[5]})
    out({c=0xC0C0C0,a=1,x=datafx1*4.6,y=datay+(datayy*18.9),txt=moon_set_24[5]})
-- Forecast day 6 -- x = l|r  y = u|d
  out({c=0x9ACD32,a=1,x=datafx1*8.3,y=datay+(datayy*14.5),txt=forecast_day_short[6]})
   out({c=0x9ACD32,a=1,x=datafx1*10.5,y=datay+(datayy*14.5),txt=forecast_date[6]})
    out({c=0x9ACD32,a=1,x=datafx1*12.2,y=datay+(datayy*14.5),txt=forecast_month_short[6]})
  image({w=iw,h=ih,x=imgx*4.18,y=imgy+(imgyy*1.6),file=weather_icon[6]})
--  image({w=iw,h=ih,x=imgx*4.18,y=imgy+(imgyy*1.6),file="/media/5/Conky/images/red+.png"})
  out({c=0xFF8C00,a=1,x=datafx1*8.2,y=datay+(datayy*16.2),txt=high_temp[6]})
  out({c=0x00BFFF,a=1,x=datafx1*8.2,y=datay+(datayy*17.7),txt=low_temp[6]})
  out({c=0xFAFAEC,a=1,x=datafx1*12.6,y=datay+(datayy*15.5),txt=sun_rise_24[6]})
  out({c=0xFAFAEC,a=1,x=datafx1*12.6,y=datay+(datayy*16.6),txt=sun_set_24[6]})
  out({c=0xC0C0C0,a=1,x=datafx1*12.6,y=datay+(datayy*18.0),txt=moon_rise_24[6]})
  out({c=0xC0C0C0,a=1,x=datafx1*12.6,y=datay+(datayy*18.9),txt=moon_set_24[6]})
-- Forecast day 7 -- x = l|r  y = u|d
  out({c=0x9ACD32,a=1,x=datafx1*16.0,y=datay+(datayy*14.5),txt=forecast_day_short[7]})
   out({c=0x9ACD32,a=1,x=datafx1*18.1,y=datay+(datayy*14.5),txt=forecast_date[7]})
    out({c=0x9ACD32,a=1,x=datafx1*19.8,y=datay+(datayy*14.5),txt=forecast_month_short[7]})
  image({w=iw,h=ih,x=imgx*7.49,y=imgy+(imgyy*1.6),file=weather_icon[7]})
--  image({w=iw,h=ih,x=imgx*7.49,y=imgy+(imgyy*1.6),file="/media/5/Conky/images/red+.png"})
  out({c=0xFF8C00,a=1,x=datafx1*15.8,y=datay+(datayy*16.2),txt=high_temp[7]})
  out({c=0x00BFFF,a=1,x=datafx1*15.8,y=datay+(datayy*17.7),txt=low_temp[7]})
  out({c=0xFAFAEC,a=1,x=datafx1*20.3,y=datay+(datayy*15.5),txt=sun_rise_24[7]})
  out({c=0xFAFAEC,a=1,x=datafx1*20.3,y=datay+(datayy*16.6),txt=sun_set_24[7]})
  out({c=0xC0C0C0,a=1,x=datafx1*20.3,y=datay+(datayy*18.0),txt=moon_rise_24[7]})
  out({c=0xC0C0C0,a=1,x=datafx1*20.3,y=datay+(datayy*18.9),txt=moon_set_24[7]})
-- ======================================================================
-- Forecast day 8 -- x = l|r  y = u|d
    out({c=0x9ACD32,a=1,x=datafx1*0.4,y=datay+(datayy*21),txt=forecast_day_short[8]})
     out({c=0x9ACD32,a=1,x=datafx1*2.5,y=datay+(datayy*21),txt=forecast_date[8]})
      out({c=0x9ACD32,a=1,x=datafx1*4.2,y=datay+(datayy*21),txt=forecast_month_short[8]})
    image({w=iw,h=ih,x=imgx*0.6,y=imgy+(imgyy*3.2),file=weather_icon[8]})
--    image({w=iw,h=ih,x=imgx*0.6,y=imgy+(imgyy*3.2),file="/media/5/Conky/images/red+.png"})
    out({c=0xFF8C00,a=1,x=datafx1*0.4,y=datay+(datayy*22.5),txt=high_temp[8]})
    out({c=0x00BFFF,a=1,x=datafx1*0.4,y=datay+(datayy*24),txt=low_temp[8]})
    out({c=0xFAFAEC,a=1,x=datafx1*4.6,y=datay+(datayy*21.9),txt=sun_rise_24[8]})
    out({c=0xFAFAEC,a=1,x=datafx1*4.6,y=datay+(datayy*22.9),txt=sun_set_24[8]})
    out({c=0xC0C0C0,a=1,x=datafx1*4.6,y=datay+(datayy*24.4),txt=moon_rise_24[8]})
    out({c=0xC0C0C0,a=1,x=datafx1*4.6,y=datay+(datayy*25.4),txt=moon_set_24[8]})
-- Forecast day 9 -- x = l|r  y = u|d
    out({c=0x9ACD32,a=1,x=datafx1*8.3,y=datay+(datayy*21),txt=forecast_day_short[9]})
     out({c=0x9ACD32,a=1,x=datafx1*10.5,y=datay+(datayy*21),txt=forecast_date[9]})
      out({c=0x9ACD32,a=1,x=datafx1*12.2,y=datay+(datayy*21),txt=forecast_month_short[9]})
    image({w=iw,h=ih,x=imgx*4.14,y=imgy+(imgyy*3.2),file=weather_icon[9]})
--    image({w=iw,h=ih,x=imgx*4.14,y=imgy+(imgyy*3.2),file="/media/5/Conky/images/red+.png"})
    out({c=0xFF8C00,a=1,x=datafx1*8.2,y=datay+(datayy*22.5),txt=high_temp[9]})
    out({c=0x00BFFF,a=1,x=datafx1*8.2,y=datay+(datayy*24),txt=low_temp[9]})
     out({c=0xFAFAEC,a=1,x=datafx1*12.6,y=datay+(datayy*21.9),txt=sun_rise_24[9]})
     out({c=0xFAFAEC,a=1,x=datafx1*12.6,y=datay+(datayy*22.9),txt=sun_set_24[9]})
      out({c=0xC0C0C0,a=1,x=datafx1*12.6,y=datay+(datayy*24.4),txt=moon_rise_24[9]})
      out({c=0xC0C0C0,a=1,x=datafx1*12.6,y=datay+(datayy*25.4),txt=moon_set_24[9]})
-- Forecast day 10 -- x = l|r  y = u|d
    out({c=0x9ACD32,a=1,x=datafx1*16.0,y=datay+(datayy*21),txt=forecast_day_short[10]})
     out({c=0x9ACD32,a=1,x=datafx1*18.1,y=datay+(datayy*21),txt=forecast_date[10]})
      out({c=0x9ACD32,a=1,x=datafx1*19.8,y=datay+(datayy*21),txt=forecast_month_short[10]})
    image({w=iw,h=ih,x=imgx*7.55,y=imgy+(imgyy*3.2),file=weather_icon[10]})
--    image({w=iw,h=ih,x=imgx*7.55,y=imgy+(imgyy*3.2),file="/media/5/Conky/images/red+.png"})
    out({c=0xFF8C00,a=1,x=datafx1*15.8,y=datay+(datayy*22.5),txt=high_temp[10]})
    out({c=0x00BFFF,a=1,x=datafx1*15.8,y=datay+(datayy*24),txt=low_temp[10]})
     out({c=0xFAFAEC,a=1,x=datafx1*20.3,y=datay+(datayy*21.9),txt=sun_rise_24[10]})
     out({c=0xFAFAEC,a=1,x=datafx1*20.3,y=datay+(datayy*22.9),txt=sun_set_24[10]})
      out({c=0xC0C0C0,a=1,x=datafx1*20.3,y=datay+(datayy*24.4),txt=moon_rise_24[10]})
      out({c=0xC0C0C0,a=1,x=datafx1*20.3,y=datay+(datayy*25.4),txt=moon_set_24[10]})

--#######################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################


what I call: greyclock.lua - a modified version of: cups_n_saucers.lua
Code: Select all
--==============================================================================
--              Cups and Saucers
--                               Lua conky script
--
--  author  : Abu Yahya (abuyahya) - http://tiny.cc/whbpow
--  license : Distributed under the terms of GNU GPL v3
--  30.05.2012
-- v.1.0.1
--==============================================================================
-- got this from jed who said some striiped the above info
-- I put it back in - Thanks to abuyahya for a nice clock.
-- greyclock.lua

require 'cairo'
--------------------------------------------------------------------------------
----Adjustable Settings
coffee_table = {
         -- HOUR HAND
   {
   name='time',               arg='%I.%M',
   max_value=12,               x=230,   y=230,

   cup_radius=112,            cup_wall_thickness=90,
   cup_bg_clr=0xFFFFFF,         cup_bg_alpha=0.0,
   cup_fg_clr=0xFFFFFF,         cup_fg_alpha=0.0,

   handle_length=70,            handle_circ=5,
   handle_fg_clr=0xFFFFFF,         handle_fg_alpha=0.6,

   graduation_radius=184,         graduation_thickness=8,
   graduation_mark_circ=1.5,      graduation_mark_angle=30,
   graduation_fg_clr=0xFFFFFF,      graduation_fg_alpha=0.5,

   saucer_thickness=6,            thick_saucer_circ=11/12,
   saucer_radius=195,            thin_saucer_circ=11/12,
   saucer_fg_clr=0xFFFFFF,         saucer_fg_alpha=0.3,
   saucer_mark_fg_clr=0xFFFFFF,      saucer_mark_fg_alpha=0.0,
   inner_saucer=true,

   txt_weight=0,               txt_size=8.0,
   txt_fg_clr=0xFFFFFF,         txt_fg_alpha=0.0,
   caption='',               caption2='',
   },
         -- DOT IN CENTRE
   {
   name='time',               arg='%H',
   max_value=12,               x=230,   y=230,

   cup_radius=2,               cup_wall_thickness=3,
   cup_bg_clr=0xFFFFFF,         cup_bg_alpha=0.0,
   cup_fg_clr=0xFFFFFF,         cup_fg_alpha=0.0,

   handle_length=40,            handle_circ=4,
   handle_fg_clr=0xFFFFFF,         handle_fg_alpha=0.0,

   graduation_radius=187,         graduation_thickness=1,
   graduation_mark_circ=0.5,      graduation_mark_angle=3,
   graduation_fg_clr=0xFFFFFF,      graduation_fg_alpha=0.5,

   saucer_thickness=6,            thick_saucer_circ=11/12,
   saucer_radius=195,            thin_saucer_circ=11/12,
   saucer_fg_clr=0xFFFFFF,         saucer_fg_alpha=0.0,
   saucer_mark_fg_clr=0xFFFFFF,      saucer_mark_fg_alpha=0.0,
   inner_saucer=true,

   txt_weight=0,               txt_size=8.0,
   txt_fg_clr=0xFFFFFF,         txt_fg_alpha=0.0,
   caption='',               caption2='',
   },
         -- MINUTE HAND
   {
   name='time',               arg='%M',
   max_value=60,               x=230,   y=230,

   cup_radius=118,            cup_wall_thickness=120,
   cup_bg_clr=0xFFFFFF,         cup_bg_alpha=0.0,
   cup_fg_clr=0xFFFFFF,         cup_fg_alpha=0.0,

   handle_length=110,            handle_circ=3,
   handle_fg_clr=0xFFFFFF,         handle_fg_alpha=0.6,

   graduation_radius=183,         graduation_thickness=10,
   graduation_mark_circ=2.5,      graduation_mark_angle=90,
   graduation_fg_clr=0xFFFFFF,      graduation_fg_alpha=0.5,

   saucer_thickness=6,            thick_saucer_circ=11/12,
   saucer_radius=220,            thin_saucer_circ=11/12,
   saucer_fg_clr=0xFFFFFF,         saucer_fg_alpha=0.3,
   saucer_mark_fg_clr=0xFFFFFF,      saucer_mark_fg_alpha=0.0,
   inner_saucer=true,

   txt_weight=0,               txt_size=8.0,
   txt_fg_clr=0xFFFFFF,         txt_fg_alpha=0.0,
   caption='',               caption2='',
   },
         -- SECOND HAND
   {
   name='time',               arg='%S',
   max_value=60,               x=230,   y=230,

   cup_radius=120,            cup_wall_thickness=120,
   cup_bg_clr=0xFFFFFF,         cup_bg_alpha=0.0,
   cup_fg_clr=0xFFFFFF,         cup_fg_alpha=0.0,

   handle_length=118,            handle_circ=1,
   handle_fg_clr=0xFFFFFF,         handle_fg_alpha=0.5,

   graduation_radius=185,         graduation_thickness=6,
   graduation_mark_circ=0.5,      graduation_mark_angle=6,
   graduation_fg_clr=0xFFFFFF,      graduation_fg_alpha=0.5,

   saucer_thickness=5,            thick_saucer_circ=1,
   saucer_radius=205,            thin_saucer_circ=11/12,
   saucer_fg_clr=0xFFFFFF,         saucer_fg_alpha=0.4,
   saucer_mark_fg_clr=0xFFFFFF,      saucer_mark_fg_alpha=0.4,
   inner_saucer=true,

   txt_weight=0,               txt_size=8.0,
   txt_fg_clr=0xFFFFFF,         txt_fg_alpha=0.0,
   caption='',               caption2='',
   },
         -- CPU CIRCLE - TOP
   {
   name='cpu',               arg='cpu0',
   max_value=100,               x=350,   y=230,

   cup_radius=20,               cup_wall_thickness=40,
   cup_bg_clr=0xFFFFFF,         cup_bg_alpha=0.0,
   cup_fg_clr=0xFFFFFF,         cup_fg_alpha=0.0,
   cup_start_angle=0,

   handle_fg_clr=0xFFFFFF,         handle_fg_alpha=0.0,
   handle_length=40,            handle_circ=4,

   graduation_radius=35,         graduation_thickness=3,
   graduation_mark_circ=2,         graduation_mark_angle=36,
   graduation_fg_clr=0xFFFFFF,      graduation_fg_alpha=0.6,

   saucer_thickness=6,            thick_saucer_circ=0.85,
   saucer_radius=40,            thin_saucer_circ=0.85,
   saucer_fg_clr=0xFFFFFF,         saucer_fg_alpha= 0.3,
   saucer_mark_fg_clr=0xFFFFFF,      saucer_mark_fg_alpha=0.5,
   inner_saucer=true,

   xtxt=-20,                  ytxt= -12,
   txt_weight=0,               txt_size=10.0,
   txt_fg_clr=0xFFFFFF,         txt_fg_alpha=0.8,
   caption='CPU ',            caption2=' %',
   },
--[[ -- BOTTOM RIGHT - LEFT OF WIND!
    {
    name='cpu',               arg='cpu1',
    max_value=100,               x=120,   y=320,

    cup_radius=20,               cup_wall_thickness=40,
    cup_bg_clr=0xFFFFFF,            cup_bg_alpha=0.0,
    cup_fg_clr=0xFFFFFF,            cup_fg_alpha=0.0,
    cup_start_angle=0,

    handle_fg_clr=0xFFFFFF,         handle_fg_alpha=0.0,
    handle_length=40,            handle_circ=4,

    xtxt=-20,                  ytxt= -8,
    txt_weight=0,               txt_size=8.0,
    txt_fg_clr=0xFFFFFF,            txt_fg_alpha=0.8,
    caption=' 1 ',               caption2=' %',

    graduation_radius=25,         graduation_thickness=3,
    graduation_mark_circ=2,         graduation_mark_angle=36,
    graduation_fg_clr=0xFFFFFF,      graduation_fg_alpha=0.6,

    saucer_thickness=3,            thick_saucer_circ=0.85,
    saucer_radius=30,            thin_saucer_circ=0.85,
    saucer_fg_clr=0xFFFFFF,         saucer_fg_alpha= 0.3,
    saucer_mark_fg_clr=0xFFFFFF,      saucer_mark_fg_alpha=0.5,
    inner_saucer=true,
    },

    {
    name='cpu',               arg='cpu2',
    max_value=100,               x=120,   y=320,

    cup_radius=20,               cup_wall_thickness=40,
    cup_bg_clr=0xFFFFFF,            cup_bg_alpha=0.0,
    cup_fg_clr=0xFFFFFF,            cup_fg_alpha=0.0,
    cup_start_angle=0,

    handle_fg_clr=0xFFFFFF,         handle_fg_alpha=0.0,
    handle_length=40,            handle_circ=4,

    xtxt=-20,                  ytxt= 3,
    txt_weight=0,               txt_size=8.0,
    txt_fg_clr=0xFFFFFF,            txt_fg_alpha=0.8,
    caption=' 2 ',               caption2=' %',

    graduation_radius=25,         graduation_thickness=3,
    graduation_mark_circ=2,         graduation_mark_angle=36,
    graduation_fg_clr=0xFFFFFF,      graduation_fg_alpha=0.6,

    saucer_thickness=3,            thick_saucer_circ=0.85,
    saucer_radius=30,            thin_saucer_circ=0.85,
    saucer_fg_clr=0xFFFFFF,         saucer_fg_alpha= 0.3,
    saucer_mark_fg_clr=0xFFFFFF,      saucer_mark_fg_alpha=0.5,
    inner_saucer=true,
    },

    {
    name='cpu',               arg='cpu3',
    max_value=100,               x=120,   y=320,

    cup_radius=20,               cup_wall_thickness=40,
    cup_bg_clr=0xFFFFFF,            cup_bg_alpha=0.0,
    cup_fg_clr=0xFFFFFF,            cup_fg_alpha=0.0,
    cup_start_angle=0,

    handle_fg_clr=0xFFFFFF,         handle_fg_alpha=0.0,
    handle_length=40,            handle_circ=4,

    xtxt=-20,                  ytxt= 14,
    txt_weight=0,               txt_size=8.0,
    txt_fg_clr=0xFFFFFF,            txt_fg_alpha=0.8,
    caption=' 3 ',               caption2=' %',

    graduation_radius=25,         graduation_thickness=3,
    graduation_mark_circ=2,         graduation_mark_angle=36,
    graduation_fg_clr=0xFFFFFF,      graduation_fg_alpha=0.6,

    saucer_thickness=3,            thick_saucer_circ=0.85,
    saucer_radius=30,            thin_saucer_circ=0.85,
    saucer_fg_clr=0xFFFFFF,         saucer_fg_alpha= 0.3,
    saucer_mark_fg_clr=0xFFFFFF,      saucer_mark_fg_alpha=0.5,
    inner_saucer=true,
    },
]]

         -- CPU CIRCLE - TOP
   {
   name='freq_g',               arg='/',
   max_value=5,               x=350,   y=230,

   cup_radius=12,               cup_wall_thickness=23,
   cup_bg_clr=0xFFFFFF,         cup_bg_alpha=0.0,
   cup_fg_clr=0xFFFFFF,         cup_fg_alpha=0.0,
   cup_start_angle=0,

   handle_fg_clr=0xFFFFFF,         handle_fg_alpha=0.0,
   handle_length=40,            handle_circ=4,

   graduation_radius=25,         graduation_thickness=6,
   graduation_mark_circ=4,         graduation_mark_angle=30,
   graduation_fg_clr=0xFFFFFF,      graduation_fg_alpha=0.0,

   saucer_thickness=6,            thick_saucer_circ=0.75,
   saucer_radius=45,            thin_saucer_circ=0.75,
   saucer_fg_clr=0xFFFFFF,         saucer_fg_alpha= 0.3,
   saucer_mark_fg_clr=0xFFFFFF,      saucer_mark_fg_alpha=0.5,
   inner_saucer=true,

   xtxt=-20,                  ytxt= 0,
   txt_weight=0,               txt_size=10.0,
   txt_fg_clr=0xFFFFFF,         txt_fg_alpha=0.8,
   caption='',               caption2=' GHz',
   },
         -- CPU CIRCLE - TOP
   {
   name='hwmon',               arg='temp 1',
   max_value=100,               x=350,   y=230,

   cup_radius=12,               cup_wall_thickness=23,
   cup_bg_clr=0xFFFFFF,         cup_bg_alpha=0.0,
   cup_fg_clr=0xFFFFFF,         cup_fg_alpha=0.0,
   cup_start_angle=0,

   handle_fg_clr=0xFFFFFF,         handle_fg_alpha=0.0,
   handle_length=40,            handle_circ=4,

   graduation_radius=35,         graduation_thickness=6,
   graduation_mark_circ=2,         graduation_mark_angle=36,
   graduation_fg_clr=0xFFFFFF,      graduation_fg_alpha=0.6,

   saucer_thickness=6,            thick_saucer_circ=0.85,
   saucer_radius=40,            thin_saucer_circ=0.85,
   saucer_fg_clr=0xFFFFFF,         saucer_fg_alpha= 0.3,
   saucer_mark_fg_clr=0xFFFFFF,      saucer_mark_fg_alpha=0.5,
   inner_saucer=true,

   xtxt=-15,                  ytxt= 12,
   txt_weight=0,               txt_size=10.0,
   txt_fg_clr=0xFFFFFF,         txt_fg_alpha=0.8,
   caption='',               caption2=' ºC',
   },
         -- RAM CIRCLE
   {
   name='memperc',            arg='/',
   max_value=100,               x=230,   y=105,

   cup_radius=12,               cup_wall_thickness=23,
   cup_bg_clr=0xFFFFFF,         cup_bg_alpha=0.0,
   cup_fg_clr=0xFFFFFF,         cup_fg_alpha=0.0,
   cup_start_angle=0,

   handle_fg_clr=0xFFFFFF,         handle_fg_alpha=0.0,
   handle_length=40,            handle_circ=4,

   graduation_radius=35,         graduation_thickness=6,
   graduation_mark_circ=2,         graduation_mark_angle=36,
   graduation_fg_clr=0xFFFFFF,      graduation_fg_alpha=0.6,

   saucer_thickness=6,            thick_saucer_circ=0.85,
   saucer_radius=40,            thin_saucer_circ=0.85,
   saucer_fg_clr=0xFFFFFF,         saucer_fg_alpha= 0.3,
   saucer_mark_fg_clr=0xFFFFFF,      saucer_mark_fg_alpha=0.5,
   inner_saucer=true,

   xtxt=-25,                  ytxt=0,
   txt_weight=0,               txt_size=10.0,
   txt_fg_clr=0xFFFFFF,         txt_fg_alpha=0.8,
   caption='RAM ',            caption2=' %',
},
         -- MEMORY CIRCLE
{
   name='fs_used_perc',         arg='/home',
   max_value=100,               x=105,   y=230,

   cup_radius=12,               cup_wall_thickness=27,
   cup_bg_clr=0xFFFFFF,         cup_bg_alpha=0.0,
   cup_fg_clr=0xFFFFFF,         cup_fg_alpha=0.0,
   cup_start_angle=0,

   handle_fg_clr=0xFFFFFF,         handle_fg_alpha=0.0,
   handle_length=40,            handle_circ=4,

   graduation_radius=35,         graduation_thickness=6,
   graduation_mark_circ=2,         graduation_mark_angle=36,
   graduation_fg_clr=0xFFFFFF,      graduation_fg_alpha=0.6,

   saucer_thickness=6,            thick_saucer_circ=0.85,
   saucer_radius=40,            thin_saucer_circ=0.85,
   saucer_fg_clr=0xFFFFFF,         saucer_fg_alpha=0.3,
   saucer_mark_fg_clr=0xFFFFFF,      saucer_mark_fg_alpha=0.5,
   inner_saucer=true,

   xtxt=-30,                  ytxt= 12,
   txt_weight=0,               txt_size=10.0,
   txt_fg_clr=0xFFFFFF,         txt_fg_alpha=0.8,
   caption=' FS H: ',            caption2=' %',
},
         -- MEMORY CIRCLE
{
   name='fs_used_perc',         arg='/',
   max_value=100,               x=105,   y=230,

   cup_radius=12,               cup_wall_thickness=27,
   cup_bg_clr=0xFFFFFF,         cup_bg_alpha=0.0,
   cup_fg_clr=0xFFFFFF,         cup_fg_alpha=0.0,
   cup_start_angle=0,

   handle_fg_clr=0xFFFFFF,         handle_fg_alpha=0.0,
   handle_length=40,            handle_circ=4,

   graduation_radius=25,         graduation_thickness=4,
   graduation_mark_circ=4,         graduation_mark_angle=36,
   graduation_fg_clr=0xFFFFFF,      graduation_fg_alpha=0.0,

   saucer_thickness=6,            thick_saucer_circ=0.85,
   saucer_radius=45,            thin_saucer_circ=0.85,
   saucer_fg_clr=0xFFFFFF,         saucer_fg_alpha=0.3,
   saucer_mark_fg_clr=0xFFFFFF,      saucer_mark_fg_alpha=0.5,
   inner_saucer=true,

   xtxt=-30,                  ytxt= -5,
   txt_weight=0,               txt_size=10.0,
   txt_fg_clr=0xFFFFFF,         txt_fg_alpha=0.8,
   caption=' FS /: ',            caption2=' %',
   },
}

--Fixed code -do not edit unless you know what you are doing------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- converts color in hexa to decimal
function rgb_to_r_g_b(clr, alpha)
   return ((clr / 0x10000) % 0x100) / 255., ((clr / 0x100) % 0x100) / 255., (clr % 0x100) / 255., alpha
end
-------------------------------------------------------------------------------
------------------------------------------------------------------------
local function draw_coffee_table(display, data, value)
    max_value = data['max_value']
    x, y = data['x'], data['y']
    if x==nil then x=conky_window.width/2 end
    if y==nil then y=conky_window.height/2 end
    cup_radius = data['cup_radius']
    if cup_radius==nil then cup_radius=conky_window.width/4 end
    cup_wall_thickness = data['cup_wall_thickness']
    if cup_wall_thickness==nil then cup_wall_thickness=20 end
    handle_length, handle_circ = data['handle_length'], data['handle_circ']
    if handle_length==nil then handle_length=20 end
    if handle_circ==nil then handle_circ=1 end
    cup_start_angle = data['cup_start_angle']
    if cup_start_angle == nil then cup_start_angle =0 end
    total_angle = data['total_angle']
    if total_angle == nil then total_angle=360 end
    cup_sector_angle = (math.abs(total_angle))/max_value
    cup_end_angle = total_angle + cup_start_angle
    cup_bg_clr, cup_bg_alpha = data['cup_bg_clr'], data['cup_bg_alpha']
    if cup_bg_clr==nil then cup_bg_clr =0xffffff end
    cup_fg_clr, cup_fg_alpha = data['cup_fg_clr'], data['cup_fg_alpha']
    if cup_fg_clr==nil then cup_fg_clr =0xffffff end
    if cup_fg_alpha==nil then cup_fg_alpha=0 end
    handle_fg_clr, handle_fg_alpha = data['handle_fg_clr'], data['handle_fg_alpha']
    if handle_fg_clr==nil then handle_fg_clr = 0xffffff end
    if handle_fg_alpha==nil then handle_fg_alpha=0 end

    saucer_radius = data['saucer_radius']
    if saucer_radius==nil then saucer_radius=conky_window.width/2 end
    total_saucer_angle=data['total_saucer_angle']
    if total_saucer_angle==nil then total_saucer_angle=360 end
    saucer_sector_angle=(math.abs(total_saucer_angle))/max_value
    saucer_thickness = data['saucer_thickness']
    if saucer_thickness==nil then saucer_thickness=6 end
    saucer_fg_clr = data['saucer_fg_clr']
    if saucer_fg_clr ==nil then saucer_fg_clr=0 end
    saucer_fg_alpha = data['saucer_fg_alpha']
    if saucer_fg_alpha ==nil then saucer_fg_alpha=0 end

    saucer_mark_fg_alpha = data['saucer_mark_fg_alpha']
    if saucer_mark_fg_alpha ==nil then saucer_mark_fg_alpha=0 end
    saucer_mark_fg_clr = data['saucer_mark_fg_clr']
    if saucer_mark_fg_clr ==nil then saucer_mark_fg_clr=0xffffff end
    thick_saucer_circ = data['thick_saucer_circ']
    if thick_saucer_circ==nil then thick_saucer_circ =0.9 end
    thin_saucer_circ = data['thin_saucer_circ']
    if thin_saucer_circ==nil then thin_saucer_circ =0.9 end
    inner_saucer = data['inner_saucer']

    graduation_radius = data['graduation_radius']
    if graduation_radius ==nil then graduation_radius = conky_window.width/3 end
    graduation_thickness, graduation_mark_circ = data['graduation_thickness'], data['graduation_mark_circ']
    if graduation_thickness ==nil then graduation_thickness = 2 end
    if graduation_mark_circ ==nil then graduation_mark_circ = 1 end
    graduation_mark_angle = data['graduation_mark_angle']
    if graduation_mark_angle == nil then graduation_mark_angle = total_angle/10 end
    graduation_fg_clr, graduation_fg_alpha = data['graduation_fg_clr'], data['graduation_fg_alpha']
    if graduation_fg_clr ==nil then graduation_fg_clr= 0xffffff end
    if graduation_fg_alpha==nil then graduation_fg_alpha =0 end


    txt_weight, txt_size = data['txt_weight'], data['txt_size']
    if txt_weight == nil then txt_weight=1 end
    if txt_size == nil then txt_size=8 end
    txt_fg_clr, txt_fg_alpha = data['txt_fg_clr'], data['txt_fg_alpha']
    if txt_fg_clr ==nil then txt_fg_clr= 0xffffff end
    if txt_fg_alpha==nil then txt_fg_alpha =0 end
    caption = data['caption']
    if caption==nil then caption='' end
    caption2 = data['caption2']
    if caption2==nil then caption2='' end
    xtxt, ytxt= data ['xtxt'], data['ytxt']
    if xtxt ==nil then xtxt=0 end
    if ytxt ==nil then ytxt=0 end

--convert degree to rad and rotate (0 degree is top/north)
   function angle_to_position(start_angle, current_angle)
     if total_angle < 0 then
      local pos = start_angle - current_angle
      return ( ( pos * (math.pi / 180) ) - (math.pi / 2) )
     else
      local pos = current_angle + start_angle
      return ( ( pos * (math.pi / 180) ) - (math.pi / 2) )
     end
   end
--cup centre background
  if cup_bg_alpha >0   then
   if total_angle < 0 then
     cairo_arc_negative(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_end_angle, 0))
   else
     cairo_arc(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_start_angle, cup_end_angle))
   end
   cairo_set_source_rgba(display, rgb_to_r_g_b(cup_bg_clr, cup_bg_alpha))
   cairo_set_line_width(display, cup_wall_thickness)
   cairo_stroke(display)
  end
--cup wall fg
  if cup_fg_alpha > 0 then
   local fg_stop_arc = (cup_sector_angle * value)
   if total_angle < 0 then
   cairo_arc_negative(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_start_angle, fg_stop_arc))
   else
   cairo_arc(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_start_angle, fg_stop_arc))
   end
   cairo_set_source_rgba(display, rgb_to_r_g_b(cup_fg_clr, cup_fg_alpha))
   cairo_set_line_width(display, cup_wall_thickness)
   cairo_stroke(display)
  end
-- cup handle
  if handle_fg_alpha>0 then
   local start_handle = (cup_sector_angle * value) - (handle_circ*0.5)
   local stop_handle = (cup_sector_angle * value) +  (handle_circ*0.5)
   if total_angle < 0 then
   cairo_arc_negative(display, x, y, cup_radius, angle_to_position(cup_start_angle, start_handle), angle_to_position(cup_start_angle, stop_handle))
   else
   cairo_arc(display, x, y, cup_radius, angle_to_position(cup_start_angle, start_handle), angle_to_position(cup_start_angle, stop_handle))
   end
   cairo_set_line_width(display, handle_length)
   cairo_set_source_rgba(display, rgb_to_r_g_b(handle_fg_clr, handle_fg_alpha))
   cairo_stroke(display)
  end
--saucers
---thick saucer
   if saucer_fg_alpha > 0 and (thin_saucer_circ >0 or thick_saucer_circ > 0)
     then
   if value < (max_value/2)
      then j = value + ((max_value*total_saucer_angle)/720)
      else j = value - ((max_value*total_saucer_angle)/720)
   end

   local start_saucer = (saucer_sector_angle * j) - (value*saucer_sector_angle*0.5*thick_saucer_circ)
   local stop_saucer = (saucer_sector_angle * j) + (value*saucer_sector_angle*0.5*thick_saucer_circ)
   if total_angle < 0 then
   cairo_arc_negative(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_saucer), angle_to_position(cup_start_angle, stop_saucer))
   else
   cairo_arc(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_saucer), angle_to_position(cup_start_angle, stop_saucer))
   end
   cairo_set_source_rgba(display, rgb_to_r_g_b(saucer_fg_clr, saucer_fg_alpha))
   cairo_set_line_width(display, saucer_thickness)
   cairo_stroke(display)
   --thin saucer
     if inner_saucer == true
     then rt = (saucer_radius - 0.5) + (0.5 * saucer_thickness)
     else rt = (saucer_radius + 0.5) - (0.5 * saucer_thickness)
     end
   local start_thin_saucer = (saucer_sector_angle * j) - (max_value *0.5*saucer_sector_angle*thin_saucer_circ)
   local stop_thin_saucer = (saucer_sector_angle * j) + (max_value *0.5*saucer_sector_angle*thin_saucer_circ)
   if total_angle < 0 then
   cairo_arc_negative(display, x, y, rt, angle_to_position(cup_start_angle, start_thin_saucer), angle_to_position(cup_start_angle, stop_thin_saucer))
   else
   cairo_arc(display, x, y, rt, angle_to_position(cup_start_angle, start_thin_saucer), angle_to_position(cup_start_angle, stop_thin_saucer))
   end
   cairo_set_source_rgba(display, rgb_to_r_g_b(saucer_fg_clr, saucer_fg_alpha))
   cairo_set_line_width(display, 1)
   cairo_stroke(display)
   end
--saucer mark
   if saucer_mark_fg_alpha > 0 then
   local start_cm = (saucer_sector_angle * value) - (handle_circ *0.5 )
   local stop_cm = (saucer_sector_angle * value) + (handle_circ *0.5 )
   if total_angle < 0 then
     cairo_arc_negative(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_cm), angle_to_position(cup_start_angle, stop_cm))
   else
     cairo_arc(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_cm), angle_to_position(cup_start_angle, stop_cm))
   end
   cairo_set_source_rgba(display, rgb_to_r_g_b(saucer_mark_fg_clr, saucer_mark_fg_alpha))
      cairo_set_line_width(display, saucer_thickness)
      cairo_stroke(display)
   end
--graduation mark
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_mark_angle > 0 then
      number_graduation = (math.abs(total_angle) +1)/ graduation_mark_angle
      local start_arc_grad = 0
      local stop_arc_grad = 0
   local i = 0
      while i < number_graduation do
         local start_arc_grad = (graduation_mark_angle * (i)) - (graduation_mark_circ *0.5)
         local stop_arc_grad = (graduation_mark_angle * (i)) + (graduation_mark_circ *0.5)
         if total_angle < 0 then
        cairo_arc_negative(display, x, y, graduation_radius, angle_to_position(cup_start_angle, start_arc_grad), angle_to_position(cup_start_angle, stop_arc_grad))
      else
        cairo_arc(display, x, y, graduation_radius, angle_to_position(cup_start_angle, start_arc_grad), angle_to_position(cup_start_angle, stop_arc_grad))
      end
      cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_clr,graduation_fg_alpha))
         cairo_set_line_width(display, graduation_thickness)
      cairo_stroke(display)
         i = i + 1
      end
   end
-- text
  if txt_fg_alpha>0 then
   cairo_select_font_face (display, "hooge 05_53", CAIRO_FONT_SLANT_NORMAL, txt_weight);
   cairo_set_font_size (display,txt_size)
   cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_clr, txt_fg_alpha))
   cairo_move_to (display,x+xtxt,y+ytxt)
   cairo_show_text (display, caption ) cairo_show_text (display,value)cairo_show_text (display, caption2 )
   cairo_stroke (display)
  end
end
-------------------------------------------------------------------------------
-- loads data and displays table_settings

function display_coffee_table(display)
   local function load_coffee_table(display, data)
      local str, value = '', 0
   if data['name'] == 'time2' then
      local max_value = data['max_value']
         str = string.format('${time %s}', data['arg'])
         str = conky_parse(str)
         local value2 = tonumber(str:sub(0,2))
      if value2 == max_value then value2 = 0 end
      value = value2 + (tonumber(str:sub(4,5))/60)
   else
         str = string.format('${%s %s}',data['name'], data['arg'])
         str = conky_parse(str)
         value = tonumber(str)
      end
      if value == nil then value = 0 end
      draw_coffee_table(display, data, value)
   end
   for i in pairs(coffee_table) do
      load_coffee_table(display, coffee_table[i])
   end
end
-------------------------------------------------------------------------------
runscheck = 0 -- fix for draw shades running script twice on every update
function conky_main()
   if conky_window == nil then
      return
   end
   local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
   local display = cairo_create(cs)
   local updates = conky_parse('${updates}')
   update_num = tonumber(updates)
   if update_num > 5 then
     cairo_set_antialias (display, CAIRO_ANTIALIAS_SUBPIXEL)
     display_coffee_table(display)
     cairo_set_antialias (display, CAIRO_ANTIALIAS_DEFAULT)
   end
   cairo_surface_destroy(cs)
   cairo_destroy(display)
end
#! pushed to Debian SID & OpenBox
Conky PitStop
User avatar
Sector11
Level 1
Level 1
 
Posts: 37
Joined: Mon Nov 22, 2010 10:33 am

Linux Mint is funded by ads and donations.
 
PreviousNext

Return to Compiz, Conky, Docks, & Widgets

Who is online

Users browsing this forum: No registered users and 3 guests