Conky Showoff thread

Forum rules
Before you post please read how to get help
User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 »

@ 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 =
Using: BunsenLabs based on Debian Stable.
Conky PitStop

McLovin

Re: Conky Showoff thread

Post by McLovin »

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!

FrankenCub
Level 1
Level 1
Posts: 34
Joined: Thu Nov 01, 2012 4:44 am

Re: Conky Showoff thread

Post by FrankenCub »

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

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 »

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.
Using: BunsenLabs based on Debian Stable.
Conky PitStop

FrankenCub
Level 1
Level 1
Posts: 34
Joined: Thu Nov 01, 2012 4:44 am

Re: Conky Showoff thread

Post by FrankenCub »

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
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 »

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.
Using: BunsenLabs based on Debian Stable.
Conky PitStop

FrankenCub
Level 1
Level 1
Posts: 34
Joined: Thu Nov 01, 2012 4:44 am

Re: Conky Showoff thread

Post by FrankenCub »

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/+sour ... 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
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 »

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/+sour ... 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:
Using: BunsenLabs based on Debian Stable.
Conky PitStop

FrankenCub
Level 1
Level 1
Posts: 34
Joined: Thu Nov 01, 2012 4:44 am

Re: Conky Showoff thread

Post by FrankenCub »

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
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 »

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
Using: BunsenLabs based on Debian Stable.
Conky PitStop

FrankenCub
Level 1
Level 1
Posts: 34
Joined: Thu Nov 01, 2012 4:44 am

Re: Conky Showoff thread

Post by FrankenCub »

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:

fog
Level 1
Level 1
Posts: 14
Joined: Mon Apr 30, 2007 7:35 am
Location: Athens, Greece
Contact:

Re: Conky Showoff thread

Post by fog »

Image

A simple conky. Mint 13, openbox and tint2.
I’m not antisocial, I’m just not user friendly.
blog || dArt

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 »

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!
Using: BunsenLabs based on Debian Stable.
Conky PitStop

fog
Level 1
Level 1
Posts: 14
Joined: Mon Apr 30, 2007 7:35 am
Location: Athens, Greece
Contact:

Re: Conky Showoff thread

Post by fog »

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 antisocial, I’m just not user friendly.
blog || dArt

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 »

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
Using: BunsenLabs based on Debian Stable.
Conky PitStop

fog
Level 1
Level 1
Posts: 14
Joined: Mon Apr 30, 2007 7:35 am
Location: Athens, Greece
Contact:

Re: Conky Showoff thread

Post by fog »

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 antisocial, I’m just not user friendly.
blog || dArt

Angelaki
Level 1
Level 1
Posts: 6
Joined: Fri Nov 13, 2009 3:40 am

Re: Conky Showoff thread

Post by Angelaki »

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!!!

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 »

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
Using: BunsenLabs based on Debian Stable.
Conky PitStop

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 »

Changed my distro, changed my look, here's my latest. A modified version of the default VSIDO conky, split from one line to three and weather added.

Uses the mono font: Monofur

Image

The conky: S11_VSIDO_v9.conkyrc

Code: Select all

# killall conky && conky -c /media/5/Conky/S11_VSIDO_v9.conkyrc &
# Original by: VastOne on VSIDO

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer none #right

# Use Xft?
use_xft yes
xftfont Monofur:bold:size=12
xftalpha 1.0
# text_buffer_size 256

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

own_window yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_transparent yes
# own_window_argb_visual yes
own_window_class Conky

# Stippled borders?
stippled_borders 0

# border margins
border_inner_margin 3

# border width
border_width 0

# Default colors and also border colors
default_color 00BFFF #  0 191 255	DeepSkyBlue
color0 FFDEAD #255 222 173	NavajoWhite
color1 7FFF00 #127 255   0	Chartreuse
color2 778899 #119 136 153	LightSlateGray
color3 FF8C00 #255 140   0	DarkOrange
color4 F0FFFF #240 255 255	Azure
color5 FFDEAD #255 222 173	NavajoWhite
color6 7B68EE #123 104 238	MediumSlateBlue
color7 00FFFF #  0 255 255	Cyan
color8 FFFF00 #255 255   0	Yellow
color9 FF0000 #255   0   0	Red

#default_shade_color black
#default_outline_color grey
own_window_colour 000000

# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 5 # left-right
gap_y 5 # up-down

minimum_size 1265 0  ## width, height
#maximum_width 1250     ## width


# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off (no).
short_units yes

###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load ~/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load /media/5/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.4
# lua_draw_hook_post draw-bg 125 0 0 0 0 0x000000 0.01
#
# TEXT
#
############### V9000 ########################################################
#starts the lua weather data gathering function, call once at top of conkyrc
 lua_load ~/v9000/v9000.lua
 lua_draw_hook_post weather
 lua_load /media/5/Conky/templates/VSIDO-v9-template.lua
#######################################################  End LUA Settings  ###
#
TEXT
${execi 600 bash /media/5/Conky/accuweather_conky/accuw_script}\
        ${color}Kernel ${color4}${kernel}\
 ${color}MEM${color4}${if_match ${memperc}<10}  ${memperc}\
${else}${if_match ${memperc}<100} ${memperc}\
${else}${memperc}${endif}${endif}%\
 ${color}(${mem})\
 ${color}CPU${color4}${if_match ${platform f71882fg.2560 temp 1}<100} ${platform f71882fg.2560 temp 1}\
${else}${platform f71882fg.2560 temp 1}${endif}°\
 ${color}MB${color4}${if_match ${platform f71882fg.2560 temp 2}<100} ${platform f71882fg.2560 temp 2}\
${else}${platform f71882fg.2560 temp 2}${endif}°\
 ${color}HD${color4}${if_match ${execi 5 hddtemp -n /dev/sda}<100} ${execi 5 hddtemp -n /dev/sda}\
${else}${execi 5 hddtemp -n /dev/sda}${endif}°
        ${color}NET${color4} Dn: ${color2}${downspeedgraph eth0 12,150 00ff00 ff0000 -t -l}     ${color}Up: ${color2}${upspeedgraph eth0 12,150 ff0000 00ff00 -t -l}  ${color}Uptime ${color1}${uptime_short}
        ${color}CPU: 1${color4}${if_match ${cpu cpu1}<10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1}<100} ${cpu cpu1}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}2${color4}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}3${color4}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}4${color4}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}Fan ${color4}${platform f71882fg.2560 fan 1} rpm\
  ${color}VRX·${color7}03  ${color4}04·${color1}${exec conkyDaysDiff 20130304}  ${color4}11·${color7}${exec conkyDaysDiff 20130311}  ${color4}16·${color3}${exec conkyDaysDiff 20130316}${color4}
VSIDO-v9-template.lua mrpeachy's v9000 is required.

Code: Select all

--[[
 The latest script is a lua only weather script. aka: v9000
 http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/

 the file:
 http://dl.dropbox.com/u/19008369/current%20v9000/v9000.tar.gz

 mrppeachys LUA Tutorial
 http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
]]
_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="CorporateMonoExtraBold"--font must be in quotes
-- default_font_size=10
default_font="monofur"--font must be in quotes
default_font_size=12
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=20
default_image_height=20
-- ## 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

datax=670
dataxx=55
dataxx1=dataxx+30

datay1=13
datay2=25
datay3=40
datay4=55

datayy=13 --datay+(datayy*1)

imgx=687
imgx1=55 -- (imgx1*1)

imgyh=165
imgyf=190
imgyy=39 -- imgy+(imgyy*1)

-- out({c=0x00FFFF,,a=1,x=6,y=50,txt="cpu:"..conky_parse("${cpu}")})
-- VSIDO ICON ORB
image({w=55,h=55,x=5,y=5,file="/home/sector11/images/vsido/orbwallpaper3.png"})
-- today
out({c=0x00FFFF,a=1,x=datax,y=datay1,txt=forecast_day_short[1]})
out({c=0x00FFFF,a=1,x=datax+30,y=datay1,txt=forecast_date[1]})
  image({x=imgx,y=17,h=25,w=25,file=weather_icon[1]})
--image({x=imgx,y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax,y=datay2,txt=high_temp[1]})
out({c=0xF0FFFF,a=1,x=datax,y=datay3,txt=low_temp[1]})

out({c=0x00FFFF,a=1,x=datax+dataxx,y=datay1,txt="Current"})
out({c=0xF0FFFF,a=1,x=datax+dataxx,y=datay2,txt=now["temp"]})
out({c=0xFFDEAD,a=1,x=datax+dataxx,y=datay3,txt=now["feels_like"]})
  image({x=imgx+(imgx1*1),y=17,h=25,w=25,file=now["weather_icon"]})
--image({x=imgx+(imgx1*1),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})

out({c=0x00FFFF,a=1,x=datax+(dataxx*2),y=datay1,txt=forecast_day_short[2]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*2+30),y=datay1,txt=forecast_date[2]})
  image({x=imgx+(imgx1*2),y=17,h=25,w=25,file=weather_icon[2]})
--image({x=imgx+(imgx1*2),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*2),y=datay2,txt=high_temp[2]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*2),y=datay3,txt=low_temp[2]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*3),y=datay1,txt=forecast_day_short[3]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*3+30),y=datay1,txt=forecast_date[3]})
  image({x=imgx+(imgx1*3),y=17,h=25,w=25,file=weather_icon[3]})
--image({x=imgx+(imgx1*3),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*3),y=datay2,txt=high_temp[3]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*3),y=datay3,txt=low_temp[3]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*4),y=datay1,txt=forecast_day_short[4]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*4+30),y=datay1,txt=forecast_date[4]})
  image({x=imgx+(imgx1*4),y=17,h=25,w=25,file=weather_icon[4]})
--image({x=imgx+(imgx1*4),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*4),y=datay2,txt=high_temp[4]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*4),y=datay3,txt=low_temp[4]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*5),y=datay1,txt=forecast_day_short[5]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*5+30),y=datay1,txt=forecast_date[5]})
  image({x=imgx+(imgx1*5),y=17,h=25,w=25,file=weather_icon[5]})
--image({x=imgx+(imgx1*5),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*5),y=datay2,txt=high_temp[5]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*5),y=datay3,txt=low_temp[5]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*6),y=datay1,txt=forecast_day_short[6]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*6+30),y=datay1,txt=forecast_date[6]})
  image({x=imgx+(imgx1*6),y=17,h=25,w=25,file=weather_icon[6]})
--image({x=imgx+(imgx1*6),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*6),y=datay2,txt=high_temp[6]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*6),y=datay3,txt=low_temp[6]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*7),y=datay1,txt=forecast_day_short[7]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*7+30),y=datay1,txt=forecast_date[7]})
  image({x=imgx+(imgx1*7),y=17,h=25,w=25,file=weather_icon[7]})
--image({x=imgx+(imgx1*7),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*7),y=datay2,txt=high_temp[7]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*7),y=datay3,txt=low_temp[7]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*8),y=datay1,txt=forecast_day_short[8]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*8+30),y=datay1,txt=forecast_date[8]})
  image({x=imgx+(imgx1*8),y=17,h=25,w=25,file=weather_icon[8]})
--image({x=imgx+(imgx1*8),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*8),y=datay2,txt=high_temp[8]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*8),y=datay3,txt=low_temp[8]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*9),y=datay1,txt=forecast_day_short[9]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*9+30),y=datay1,txt=forecast_date[9]})
  image({x=imgx+(imgx1*9),y=17,h=25,w=25,file=weather_icon[9]})
--image({x=imgx+(imgx1*9),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*9),y=datay2,txt=high_temp[9]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*9),y=datay3,txt=low_temp[9]})

out({c=0x00FFFF,a=10,x=datax+(dataxx*10),y=datay1,txt=forecast_day_short[10]})
out({c=0x00FFFF,a=10,x=datax+(dataxx*10+30),y=datay1,txt=forecast_date[10]})
  image({x=imgx+(imgx1*10),y=17,h=25,w=25,file=weather_icon[10]})
--image({x=imgx+(imgx1*10),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*10),y=datay2,txt=high_temp[10]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*10),y=datay3,txt=low_temp[10]})

-- BOTTOM LINE
out({c=0xF0FFFF,a=1,x=datax,y=datay4,txt="Today's Weather:"})
out({c=0x00FFFF,a=1,x=datax+115,y=datay4,txt="Pressure"})
out({c=0xF0FFFF,a=1,x=datax+175,y=datay4,txt=now["pressure_mb"].." mb"})
out({c=0x00FFFF,a=1,x=datax+245,y=datay4,txt="Humidity"})
out({c=0xF0FFFF,a=1,x=datax+305,y=datay4,txt=now["humidity"].."%"})

out({c=0x00FFFF,a=1,x=datax+338,y=datay4,txt="Dew Point"})
out({c=0xF0FFFF,a=1,x=datax+405,y=datay4,txt=now["dew_point"].."°"})
out({c=0x00FFFF,a=1,x=datax+435,y=datay4,txt="UV Index"})
out({c=0xF0FFFF,a=1,x=datax+495,y=datay4,txt=uv_index_num[1]})
out({c=0xF0FFFF,a=1,x=datax+515,y=datay4,txt=uv_index_txt[1]})

-- yellow line
--image({w=45,h=1,x=5,y=550,file="/media/5/Conky/images/yellow_1.png"})

--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################
Using: BunsenLabs based on Debian Stable.
Conky PitStop

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 »

I'd be remiss if I didn't give everyone the full story or at least a fairly good running break down of what this is and how it came about.

We can all thank GrouchyGaijin for this!

I love it when someone says "Nope, not possible" and the answer is "Oh yea, watch this!" type of thing.

This started when GrouchyGaijin asked stinkeye this question regarding the "start stop conky" script (ssc.sh)

GrouchyGaijin:
Cool idea. Thanks for sharing. I have a question though, does the toggle script allow you to kill the conkies one at a time or is it all or nothing?
stinkeye responded:
Scripts been around a while. Not my idea.
All or nuttin'. Go hard or go home. ;)
A little while later GrouchyGaijin came back with:
For what it is worth, I wrote a script that will find the PID of a particular conky, then kill it.

I'm sure this could be done more efficiently. But this works on my system.

Code: Select all

#!/bin/bash
##This is something like the 5th script I've ever written ##                      
var1=$(ps xu | grep calendar-conky | grep -v grep | awk '{ print $2 }')
echo "$var1"
kill $var1
Change calendar-conky to the name of your conkyrc file.
Then, make a launcher, put it in a quick list or whatever.
arclance piped up:
Why not use?

Code: Select all

pkill -f "conky.*-c.*calendar-conky"
That will kill conky process running with the "calendar-conky" .conkyrc.
It should also not kill certain text editors if you have your .conkyrc open in them.
Can you see where this is going?

After a discussion between arclance and stinkeye, about it not working with a conky in a terminal stinkeye has a version that will work with his demo conky in a terminal:
stinkeye:
Could't find a solution so I added a sed command to change
background yes
to
background no
in any pasted in configs.

Code: Select all

#!/bin/bash
## click to start, click to stop

if pgrep -f "conky -c /home/glen/conky/configs/demo-conkyrc"
then
	pkill -xf "conky -c /home/glen/conky/configs/demo-conkyrc" 
else
	[B]sed -i 's/background yes/background no/g' /home/glen/conky/configs/demo-conkyrc &[/B]
	gnome-terminal -e "conky -c /home/glen/conky/configs/demo-conkyrc"
fi
From GrouchyGaijin's "oh yea, watch this post!" I started playing ... incorporating things as it happened.

All my conkys start with "conky -c /path/to/the/conkyrc", I don't run conkys in a terminal, start them yes, run them no!

I played with this a lot yesterday getting "ERROR" here an "Oops!" there, but not before one tweak restarted my entire session.
Now that was an Oops!

The second last line is the fix it was:

Code: Select all

	"conky -c $1"
Here's the 'first' working version, - "SUPER" script
that requires two clicks, or twice in a terminal:


ggsia <<-- the bash script for GrouchyGaijin, Stinkeye and arclance

Code: Select all

#!/bin/bash
## Original idea by: GrouchyGaijin
## This idea by: Stinkeye - Jan 2013
## With another tweak by: arclance
## Final tweak by: Sector11
## click to start, click to re-start

if pgrep -f "conky -c $1"
then
	pkill -xf "conky -c $1"
else
	conky -c "$1"
fi
Terminal output

Code: Select all

 sector11 @ sector11
 21 Jan 13 | 09:29:06 ~
         $ ggsia /media/5/Conky/S11_VSIDO_v9.conkyrc
18708
 sector11 @ sector11
 21 Jan 13 | 09:29:48 ~
         $ ggsia /media/5/Conky/S11_VSIDO_v9.conkyrc
Conky: forked to background, pid is 19627
 sector11 @ sector11
 21 Jan 13 | 09:29:50 ~
         $ 
Conky: desktop window (260) is root window
Conky: window type - normal
Conky: drawing to created window (0x1c00001)
Conky: drawing to double buffer
gathering data with curl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 71036  100 71036    0     0  81086      0 --:--:-- --:--:-- --:--:--   99k
not checking for alerts
processing complete

 sector11 @ sector11
 21 Jan 13 | 09:30:06 ~
         $ 
Stopped it and started it like it was meant to do!
but it took one to kill it, one to start it

Thank you GrouchyGaijin, stinkeye & arclance

I didn't stop there ... I have another version of ssc.sh that uses "exit" .... hmmmmmmmmm!!!

So here it is, the new improved ggsia that is even better, this is for [shadow=red,left]"conky addicts"[/shadow], because sometimes just "saving a conky" isn't enough, you need to kill it and restart it!

If you are developing a conky and
[o]have not started it yet, this will start it.
[o]if it is already running, this script will kill it and restart it 2 seconds later

ggsia - Super script #2

Code: Select all

#!/bin/bash
## Original idea by: GrouchyGaijin
## This idea by: Stinkeye - Jan 2013
## With another tweak by: arclance
## Final tweak by: Sector11
## click to start, click to stop & re-start

if pgrep -f "conky -c $1"
	then
	pkill -xf "conky -c $1"
	(sleep 2s && conky -c "$1") &
	exit
else
	conky -c "$1"
	exit
fi
Nice stuff guys!

stinkeye points out a weakness of the above above a question:

HA!!!! jedi has compition!
Along comes: CapMan

stinkeye:
Hi Sector11,
just a bit confused as to what the $1 variable is
and how to use the script.
Do I just add the path to a conkyrc as a variable to the script?

It may appear I know what I'm doing but I'm essentially a copy and paste man.
CapMan :P
$1 for a bash script is a command line variable.

stinki

Code: Select all

#!/bin/bash
echo $1 $2

Code: Select all

 sector11 @ sector11
 21 Jan 13 | 11:52:44 ~
         $ stinki something
something
 sector11 @ sector11
 21 Jan 13 | 11:52:46 ~
         $ stinki something else
something else
 sector11 @ sector11
 21 Jan 13 | 11:52:50 ~
         $ stinki Hi stinkeye
Hi stinkeye
 sector11 @ sector11
 21 Jan 13 | 11:54:16 ~
         $ 
To continue:
Yea, me too, I gotta use that line, CapMan sounds like a superhero!
Maybe change it to C&PDude so as not to interfere with any © you may have.

The top of 90% of my conkys have something like this:

Code: Select all

# killall conky && conky -c /media/5/Conky/S11_VSIDO_v9.conkyrc &
I copy that line - less the hash - to kill all conkys and restart the one I'm working on. BUT it does what you said a while back:
stinkeye:
All or nuttin'. Go hard or go home. ;)
So now at the top of my conkys I'll do:

Code: Select all

# ggsia /media/5/Conky/S11_VSIDO_v9.conkyrc
then I'll pull a CapMan in the terminal

Code: Select all

 sector11 @ sector11
 21 Jan 13 | 11:25:16 ~
         $ ggsia /media/5/Conky/S11_VSIDO_v9.conkyrc
Like I said earlier in this post,
[o] if the conky is not running that script will start it,
[o] if it is running, it will kill it, wait 2 seconds and restart it.

Perfect for editing!

Now to do a search and replace on "all files" in my conky directories:
Search: "# killall conky && conky -c"
Replace: "# ggsia"

Hmmmm, that will take a while, I'll probably have to watch a movie.

Thanks GrouchyGaijin ǝʎǝʞuıʇs sʞuɐɥʇ & arclance
Using: BunsenLabs based on Debian Stable.
Conky PitStop

Post Reply

Return to “Compiz, Conky, Docks, & Widgets”