You are not logged in.
WOOOOOW! That's awesome, LOVE the external ring and you kould not have picked a better background.
KUDOS!
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
an old archive "peachy" conky and a maya theme:
http://pix.toile-libre.org/upload/thumb/1478968114.png ... but the clock gives me a stiff neck
That is one amazing conky!
"All we are is dust in the wind, dude"
- Theodore "Ted" Logan
"Led Zeppelin didn't write tunes that everybody liked, they left that to the Bee Gees."
- Wayne Campbell
Offline
thanks !
pleasure to re-share, I only borrow scripts and modify, and Sector11 you were in the story I think...
machupichu
conkymaya:
# To use #! in a conky use: ${exec echo '#!'}
# OB_topconky
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints skip_taskbar,skip_pager,undecorated,below ,sticky
own_window_title mayan-time
own_window_class mayan-time
background yes
border_inner_margin 0
border_width 0
default_outline_color black
default_shade_color black
double_buffer yes
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
no_buffers yes
override_utf8_locale yes
pad_percents 2
short_units yes
stippled_borders 0
text_buffer_size 1028
uppercase no
use_spacer right
use_xft yes
xftfont Consolas:Bold:size=8
xftalpha 1.0
# Colors
default_color DCDCDC #Gainsboro
color0 FFFFF0 #Ivory
color1 FFA07A #LightSalmon
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 778899 #LightSlateGrey
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
imlib_cache_size 0
update_interval 1
gap_x 50 # left &right
gap_y 50 # up & down
minimum_size 480 480 # width, height
alignment tr
# -- Lua load -- #
lua_load $HOME/.conky/ConkyMaya/mayanFR.lua
lua_draw_hook_pre draw_fig
lua_load $HOME/.conky/script/draw_bg.lua
TEXT
${lua conky_draw_bg 39 196 197 78 78 0x000000 0.7}
${lua conky_draw_bg 155 81 80 310 310 0x000000 0.7}
${image $HOME/.conky/ConkyMaya/Mayan/calmay.png -p 35,34 -s 400x400}
${image $HOME/.conky/ConkyMaya/Mayan/dec.png -p 205,205 -s 56x56}
--[[mayancalander by mrpeachy . version5.18.11
changes
improved and shortened number_to_words and date_to_words functions
increased number of settings (settings begin on line 65)
call in conkyrc like so
lua_load /path to file/filename.lua
lua_draw_hook_pre draw_fig
note about color and alpha
to set colors use the following format
color={0xFFFFFF,1}
^ ^
color alpha
]]
require 'cairo'
-------------------------------------------------------------------
function string:split(delimiter)
local result = { }
local from = 1
local delim_from, delim_to = string.find( self, delimiter, from )
while delim_from do
table.insert( result, string.sub( self, from , delim_from-1 ) )
from = delim_to + 1
delim_from, delim_to = string.find( self, delimiter, from )
end
table.insert( result, string.sub( self, from ) )
return result
end--of function
-------------------------------------------------------------------
function number_to_words(number)
--by mrpeachy 11-4-2012
number=tonumber(number)
local n_len=string.len(number)
if number>99 then
h=tonumber(string.sub(number,1,1))
tu=tonumber(string.sub(number,2,3))
t=tonumber(string.sub(number,2,2))
u=tonumber(string.sub(number,3,3))
elseif number<100 then
tu=number
t=tonumber(string.sub(number,1,1))
u=tonumber(string.sub(number,2,2))
end
n1_tab={"un","deux","trois","quatre","cinq","six","sept","huit","neuf","dix","onze","douze","treize","quatorze","quinze","seize","dix sept","dix huit","dix neuf",}
n2_tab={"dix","vingt","trente","quarante","cinquante","soixante","soixante dix","quatre vingt","quatre vingt dix"}
if tu<20 and tu~=10 and number~=0 then
nout=n1_tab[tu]
elseif tu==10 then
nout="dix"
elseif tu>19 then
if u>0 then
joinu=" "
u=n1_tab[u]
else
joinu=""
u=""
end
nout=n2_tab[t]..joinu..u
elseif number==0 then
nout="zero"
end
if number>99 and number~=100 then
h=n1_tab[h]
return h.." cent "..nout
elseif number==100 then
return " cent "
elseif number<100 then
return nout
end
end--function
---------------------------------------------------------------------
function date_to_words()
date=tonumber(os.date("%d"))
datecut=string.gsub(date, ".", "%1|")
datetable=string.split(datecut, "|")
d1_tab={d1="premier",d2="deux",d3="trois",d4="quatre",d5="cinq",d6="six",d7="sept",d8="huit",d9="neuf",d10="dix",d11="onze",d12="douze",d13="treize",d14="quatorze",d15="quinze",d16="seize",d17="dix sept",d18="dix huit",d19="dix neuf",d20="vingt",d30="trente"}
d2_tab={d2="vingt",d3="trente",}
if tonumber(date)<21 or tonumber(date)==30 then
return (d1_tab[tostring("d" .. date)])
elseif tonumber(date)>20 and tonumber(date)~=30 then
return (d2_tab[tostring("d" .. datetable[1])] .. " " .. d1_tab[tostring("d" .. datetable[2])])
end
end--function
----------------------------------------------------------------------
function rgb_to_r_g_b_cal(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end
----------------------------------------------------------------------
function conky_draw_fig()
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--#########################################################################################################
--#########################################################################################################
--SETTINGS--SETTINGS--SETTINGS--SETTINGS--SETTINGS--SETTINGS--SETTINGS--SETTINGS--SETTINGS--SETTINGS--SETTINGS--
--center position
hx0,hy0=235,235
inner_radius=40
--line width
linew=1
--general settings to apply globally, can be altered/overriden for each section below
--line color and alpha
local global_line_color={0x838B8B,1}
--font
local font="mono"
--font size
local fsize=10
--text color and alpha
local global_text_color={0xFFC125,1}
--gap under text
local tbg=3
--gap from indicator to text
local tig=6
--indicator circle width
local cw=10
--text circle width
local tcw=13
--indicator color and alpha
local global_indicator_color={0x838B8B,1}
--############################################
--settings for each section of calendar
--############################################
--MONTHS--------------------------------------
--line color and alpha
--eg month_line_color={0xFFFFFF,1}
local month_line_color=global_line_color
--text
local mfont=font
local mfsize=fsize
--text color and alpha
local month_text_color=global_text_color
--gap at bottom of text
local mtbg=tbg
--gap from indicator to text
local mtig=tig
--circle width
local mcw=cw
--text circle width
local mtcw=tcw
--indicator color and alpha
local month_indicator_color=global_indicator_color
--############################################
--DAYS----------------------------------------
--line color and alpha
--eg day_line_color={0xFFFFFF,1}
local day_line_color=global_line_color
--text
local dfont=font
local dfsize=fsize
--text color and alpha
local day_text_color=global_text_color
--gap at bottom of text
local dtbg=tbg
--gap from indicator to text
local dtig=tig
--circle width
local dcw=cw
--text circle width
local dtcw=tcw
--indicator color and alpha
local day_indicator_color=global_indicator_color
--############################################
--HOURS---------------------------------------
--line color and alpha
--eg hour_line_color={0xFFFFFF,1}
local hour_line_color=global_line_color
--text
local hfont=font
local hfsize=fsize
--text color
local hour_text_color=global_text_color
--gap at bottom of text
local htbg=tbg
--gap from indicator to text
local htig=tig
--indicator circle width
local hcw=cw
--text circle width
local htcw=tcw
--indicator color
local hour_indicator_color=global_indicator_color
--############################################
--MINUTES-------------------------------------
--line color and alpha
--eg min_line_color={0xFFFFFF,1}
local min_line_color=global_line_color
--text
local minfont=font
local minfsize=fsize
--text color and alpha
local min_text_color=global_text_color
--gap at bottom of text
local mintbg=tbg
--gap from indicator to text
local mintig=tig
--circle width
local mincw=cw
--text circle width
local mintcw=tcw
--indicator color and alpha
local min_indicator_color=global_indicator_color
--############################################
--SECONDS-------------------------------------
--line color and alpha
--eg sec_line_color={0xFFFFFF,1}
local sec_line_color=global_line_color
--text
local sfont=font
local sfsize=fsize
--text color and alpha
local sec_text_color=global_text_color
--gap at bottom of text
local stbg=tbg
--gap from indicator to text
local stig=tig
--circle width
local scw=cw
--text circle width
local stcw=tcw
--indicator color and alpha
local sec_indicator_color=global_indicator_color
--#################################################
--END OF SETTINGS--END OF SETTINGS--END OF SETTINGS
--#################################################
--months of the year---------------------------------------------------------------------------------------------------
mnrad1=inner_radius
mnrad2=mnrad1+mcw
cairo_set_source_rgba (cr,rgb_to_r_g_b_cal(month_line_color))
--draw circles
cairo_set_line_width (cr,linew)
cairo_arc (cr,hx0,hy0,mnrad1,0,2*math.pi)
cairo_stroke (cr)
cairo_arc (cr,hx0,hy0,mnrad2,0,2*math.pi)
cairo_stroke (cr)
--calculations
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))
yeardays=31+febdaynum+31+30+31+30+31+31+30+31+30+31
yearsec=(yeardays*24*60*60)
jan=31*24*60*60
feb=jan+(febdaynum*24*60*60)
mar=feb+(31*24*60*60)
apr=mar+(30*24*60*60)
may=apr+(31*24*60*60)
jun=may+(30*24*60*60)
jul=jun+(31*24*60*60)
aug=jul+(31*24*60*60)
sep=aug+(30*24*60*60)
oct=sep+(31*24*60*60)
nov=oct+(30*24*60*60)
dec=nov+(31*24*60*60)
secdays = {jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec}
--circle indicator lines
for i=1,12 do
arc=((2*math.pi/360)*((360/yearsec)*(secdays[i])))
mnx1=0+mnrad1*(math.sin(arc))
mny1=0-mnrad1*(math.cos(arc))
arc=((2*math.pi/360)*((360/yearsec)*(secdays[i])))
mnx2=0+mnrad2*(math.sin(arc))
mny2=0-mnrad2*(math.cos(arc))
cairo_move_to (cr,hx0+mnx1,hy0+mny1)
cairo_line_to (cr,hx0+mnx2,hy0+mny2)
cairo_stroke (cr)
end
--indicator-----------------------------------------------------
cairo_set_source_rgba (cr,rgb_to_r_g_b_cal(month_indicator_color))
doy=tonumber(os.date("%j"))
yrsecs=((doy-1)*24*60*60)+(tonumber(os.date('%H'))*60*60)+(tonumber(os.date('%M'))*60)+(tonumber(os.date('%S')))
mnrad3=mnrad2+mtcw
arc=(2*math.pi/360)*((360/yearsec)*(yrsecs))
mnx1=0+(mnrad2+linew)*(math.sin(arc))
mny1=0-(mnrad2+linew)*(math.cos(arc))
arc=(2*math.pi/360)*((360/yearsec)*((yrsecs))+4)
mnx2=0+mnrad3*(math.sin(arc))
mny2=0-mnrad3*(math.cos(arc))
arc=(2*math.pi/360)*((360/yearsec)*((yrsecs))-4)
mnx3=0+mnrad3*(math.sin(arc))
mny3=0-mnrad3*(math.cos(arc))
cairo_move_to (cr,hx0+mnx1,hy0+mny1)
cairo_line_to (cr,hx0+mnx2,hy0+mny2)
cairo_stroke (cr)
cairo_move_to (cr,hx0+mnx1,hy0+mny1)
cairo_line_to (cr,hx0+mnx3,hy0+mny3)
cairo_stroke (cr)
--circlewriting-------------------------------------------------
--text must be in quotes
local mois=conky_parse( '${exec date +%B}' ):gsub("é", "e"):gsub("û", "u")
text=((string.upper(mois)) .. " DEUX MILLE " .. string.upper(number_to_words(os.date('%y'))))
--text=((string.upper(os.date('%B'))) .. " DEUX MILLE " .. string.upper(number_to_words(os.date('%y'))))
start=((360/yearsec)*((yrsecs))+mtig)
slen2=string.len(text)
finish=start+270
circlewriting(text,mfont,mfsize,mnrad2+mtbg,hx0,hy0,month_text_color,start,finish)
--end of months around year-------------------------------------------------------------------------------------------------------------------------------
--##########################################################################################
--days around month----------------------------------------------------------------------
drad1=mnrad3
drad2=drad1+dcw
cairo_set_source_rgba (cr,rgb_to_r_g_b_cal(day_line_color))
--draw circles
cairo_arc (cr,hx0,hy0,drad1,0,2*math.pi)
cairo_stroke (cr)
cairo_arc (cr,hx0,hy0,drad2,0,2*math.pi)
cairo_stroke (cr)
--calculations
monthnum=(tonumber(os.date('%m')))
monthdays = { 31, febdaynum, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
--drawin circle indicator lines
for i=1,monthdays[monthnum] do
arc=((2*math.pi/360)*((360/monthdays[monthnum])*(i)))
dx1=0+drad1*(math.sin(arc))
dy1=0-drad1*(math.cos(arc))
arc=((2*math.pi/360)*((360/monthdays[monthnum])*(i)))
dx2=0+drad2*(math.sin(arc))
dy2=0-drad2*(math.cos(arc))
cairo_move_to (cr,hx0+dx1,hy0+dy1)
cairo_line_to (cr,hx0+dx2,hy0+dy2)
cairo_stroke (cr)
end
--indicator
cairo_set_source_rgba (cr,rgb_to_r_g_b_cal(day_indicator_color))
daynumsec=(tonumber(os.date('%d'))*24*60*60)+(tonumber(os.date('%H'))*60*60)+(tonumber(os.date('%M'))*60)+(tonumber(os.date('%S')))
monthnumsec=(monthdays[monthnum])*24*60*60
drad3=drad2+dtcw
arc=(2*math.pi/360)*((360/monthnumsec)*(daynumsec))
dx1=0+(drad2+linew)*(math.sin(arc))
dy1=0-(drad2+linew)*(math.cos(arc))
arc=(2*math.pi/360)*((360/monthnumsec)*((daynumsec))+4)
dx2=0+drad3*(math.sin(arc))
dy2=0-drad3*(math.cos(arc))
arc=(2*math.pi/360)*((360/monthnumsec)*((daynumsec))-4)
dx3=0+drad3*(math.sin(arc))
dy3=0-drad3*(math.cos(arc))
cairo_move_to (cr,hx0+dx1,hy0+dy1)
cairo_line_to (cr,hx0+dx2,hy0+dy2)
cairo_stroke (cr)
cairo_move_to (cr,hx0+dx1,hy0+dy1)
cairo_line_to (cr,hx0+dx3,hy0+dy3)
cairo_stroke (cr)
--circlewriting
local jour=conky_parse( '${exec date +%A}' )
text=((string.upper(jour)) .. " " .. string.upper(date_to_words()))
--text=((string.upper(os.date('%A'))) .. " LE " .. string.upper(date_to_words()))
start=((360/monthnumsec)*(daynumsec)+dtig)
slen1=string.len(text)
finish=start+(7.5*slen1)
circlewriting(text,dfont,dfsize,drad2+dtbg,hx0,hy0,day_text_color,start,finish)
--end of days around month-------------------------------------------------------------------------------------------------------
--##########################################################################################
--hours around day ---------------------------------------------------------------------------------------------------------------------
hrad1=drad3
hrad2=hrad1+hcw
cairo_set_source_rgba (cr,rgb_to_r_g_b_cal(hour_line_color))
--draw eings
cairo_arc (cr,hx0,hy0,hrad1,0,2*math.pi)
cairo_stroke (cr)
cairo_arc (cr,hx0,hy0,hrad2,0,2*math.pi)
cairo_stroke (cr)
--draw ring indicator lines
for i=1,24 do
arc=((2*math.pi/360)*((360/24)*i))
hx1=0+hrad1*(math.sin(arc))
hy1=0-hrad1*(math.cos(arc))
arc=((2*math.pi/360)*((360/24)*i))
hx2=0+hrad2*(math.sin(arc))
hy2=0-hrad2*(math.cos(arc))
cairo_move_to (cr,hx0+hx1,hy0+hy1)
cairo_line_to (cr,hx0+hx2,hy0+hy2)
cairo_stroke (cr)
end
--indicator
cairo_set_source_rgba (cr,rgb_to_r_g_b_cal(hour_indicator_color))
hrsec=(tonumber(os.date('%H'))*60*60)+(tonumber(os.date('%M'))*60)+(tonumber(os.date('%S')))
hrad3=hrad2+htcw
arc=((2*math.pi/360)*((360/(24*60*60)*hrsec)))
hx1=0+(hrad2+linew)*(math.sin(arc))
hy1=0-(hrad2+linew)*(math.cos(arc))
arc=(2*math.pi/360)*((360/(24*60*60))*(hrsec)-4)
hx2=0+hrad3*(math.sin(arc))
hy2=0-hrad3*(math.cos(arc))
arc=(2*math.pi/360)*((360/(24*60*60))*(hrsec)+4)
hx3=0+hrad3*(math.sin(arc))
hy3=0-hrad3*(math.cos(arc))
cairo_move_to (cr,hx0+hx1,hy0+hy1)
cairo_line_to (cr,hx0+hx2,hy0+hy2)
cairo_stroke (cr)
cairo_move_to (cr,hx0+hx1,hy0+hy1)
cairo_line_to (cr,hx0+hx3,hy0+hy3)
cairo_stroke (cr)
--circlewriting
hrnum=tonumber(os.date('%H'))
if hrnum==1 then hour="HEURE"
else hour="HEURES" end
text=((string.upper(number_to_words(hrnum))) .. " " .. hour)
start=((360/(24*60*60))*(hrsec)+htig)
slen4=string.len(text)
finish=start+(slen4*5)
circlewriting(text,hfont,hfsize,hrad2+htbg,hx0,hy0,hour_text_color,start,finish)
--end of hours around day----------------------------------------------------------------------------------------------------
--##########################################################################################
--minutes around hour--------------------------------------------------------------------------------------------------------------
minrad1=hrad3
minrad2=minrad1+mincw
cairo_set_source_rgba (cr,rgb_to_r_g_b_cal(min_line_color))
--draw circles
cairo_arc (cr,hx0,hy0,minrad1,0,2*math.pi)
cairo_stroke (cr)
cairo_arc (cr,hx0,hy0,minrad2,0,2*math.pi)
cairo_stroke (cr)
--draw circle indicator lines
for i=1,60 do
arc=((2*math.pi/360)*((360/60)*i))
mx1=0+minrad1*(math.sin(arc))
my1=0-minrad1*(math.cos(arc))
arc=((2*math.pi/360)*((360/60)*i))
mx2=0+minrad2*(math.sin(arc))
my2=0-minrad2*(math.cos(arc))
cairo_move_to (cr,hx0+mx1,hy0+my1)
cairo_line_to (cr,hx0+mx2,hy0+my2)
cairo_stroke (cr)
end
--indicator
cairo_set_source_rgba (cr,rgb_to_r_g_b_cal(min_indicator_color))
minsec=(tonumber(os.date('%M'))*60)+(tonumber(os.date('%S')))
minrad3=minrad2+mintcw
arc=((2*math.pi/360)*((360/(60*60)*minsec)))
mx1=0+(minrad2+linew)*(math.sin(arc))
my1=0-(minrad2+linew)*(math.cos(arc))
arc=(2*math.pi/360)*((360/(60*60))*(minsec)-4)
mx2=0+minrad3*(math.sin(arc))
my2=0-minrad3*(math.cos(arc))
arc=(2*math.pi/360)*((360/(60*60))*(minsec)+4)
mx3=0+minrad3*(math.sin(arc))
my3=0-minrad3*(math.cos(arc))
cairo_move_to (cr,hx0+mx1,hy0+my1)
cairo_line_to (cr,hx0+mx2,hy0+my2)
cairo_stroke (cr)
cairo_move_to (cr,hx0+mx1,hy0+my1)
cairo_line_to (cr,hx0+mx3,hy0+my3)
cairo_stroke (cr)
--circlewriting
min=tonumber(os.date('%M'))
if min==1 then minute="MINUTE"
else minute="MINUTES" end
text=((string.upper(number_to_words(min))) .. " " .. minute)
start=((360/(60*60))*(minsec)+mintig)
slen4=string.len(text)
finish=start+(slen4*5)
letterposition=0
circlewriting(text,minfont,minfsize,minrad2+mintbg,hx0,hy0,min_text_color,start,finish)
--end minutes around hour--------------------------------------------------------------------------------------
--##########################################################################################
--seconds of minute-------------------------------------------------------------------------------------------
srad1=minrad3
srad2=srad1+scw
cairo_set_source_rgba (cr,rgb_to_r_g_b_cal(sec_line_color))
--draw circles
cairo_arc (cr,hx0,hy0,srad1,0,2*math.pi)
cairo_stroke (cr)
cairo_arc (cr,hx0,hy0,srad2,0,2*math.pi)
cairo_stroke (cr)
--draw circle indicator lines
for i=1,60 do
arc=((2*math.pi/360)*((360/60)*i))
sx1=0+srad1*(math.sin(arc))
sy1=0-srad1*(math.cos(arc))
arc=((2*math.pi/360)*((360/60)*i))
sx2=0+srad2*(math.sin(arc))
sy2=0-srad2*(math.cos(arc))
cairo_move_to (cr,hx0+sx1,hy0+sy1)
cairo_line_to (cr,hx0+sx2,hy0+sy2)
cairo_stroke (cr)
end
--indicator
cairo_set_source_rgba (cr,rgb_to_r_g_b_cal(sec_indicator_color))
sec=(tonumber(os.date('%S')))
srad3=srad2+stcw
arc=((2*math.pi/360)*((360/(60)*sec)))
sx1=0+(srad2+linew)*(math.sin(arc))
sy1=0-(srad2+linew)*(math.cos(arc))
arc=(2*math.pi/360)*((360/60)*((sec))-4)
sx2=0+srad3*(math.sin(arc))
sy2=0-srad3*(math.cos(arc))
arc=(2*math.pi/360)*((360/60)*((sec))+4)
sx3=0+srad3*(math.sin(arc))
sy3=0-srad3*(math.cos(arc))
cairo_move_to (cr,hx0+sx1,hy0+sy1)
cairo_line_to (cr,hx0+sx2,hy0+sy2)
cairo_stroke (cr)
cairo_move_to (cr,hx0+sx1,hy0+sy1)
cairo_line_to (cr,hx0+sx3,hy0+sy3)
cairo_stroke (cr)
--outer circle
cairo_set_source_rgba (cr,rgb_to_r_g_b_cal(sec_line_color))
cairo_arc (cr,hx0,hy0,srad3,0,2*math.pi)
cairo_stroke (cr)
--circlewriting
sec=tonumber(os.date('%S'))
if sec==1 then second="SECONDE"
else second="SECONDES" end
text=(string.upper(number_to_words(sec)) .. " " .. second)
start=((360/60)*((sec))+stig)
slen3=string.len(text)
finish=start+(slen3*5)
circlewriting(text,sfont,sfsize,srad2+stbg,hx0,hy0,sec_text_color,start,finish)
--end seconds of minute-----------------------------------------------------------------------------------------------------------------------------
--END OF CALENDAR
--#########################################################################################################
--#########################################################################################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end main function
---------------------------------------------------------------------------
function circlewriting(text, font, fsize, radi, horiz, verti, text_color, start, finish)
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fsize)
cairo_set_source_rgba (cr,rgb_to_r_g_b_cal(text_color));
local inum=string.len(text)
deg=(finish-start)/(inum-1)
degrads=(math.pi/180)
local textcut=string.gsub(text, ".", "%1|")
texttable=string.split(textcut, "|")
for i=1,inum do
interval=(degrads*(start+(deg*(i-1))))
txs=0+radi*(math.sin(interval))
tys=0-radi*(math.cos(interval))
cairo_move_to (cr, txs+horiz, tys+verti);
cairo_rotate (cr, interval)
cairo_show_text (cr, (texttable[i]))
cairo_stroke (cr)
cairo_rotate (cr, -interval)
end
end--of function
---------------------------------------------------------------------------
Offline
thanks !
pleasure to re-share, I only borrow scripts and modify, and Sector11 you were in the story I think...
Yes I was in the story for a very minor part - the LUA code is 'pure' mrpeachy!
I probably have every mrpeachy LUA made public and tested them all to varying degrees of success buy bending folding and mutilating them until they broke.
What is mine here is the little centre image you have but there are 12 of them, one for each month. The original image has 15 Mayan Masks that I used to create 12 months for mrpeachy's Mayan calendar.
You are only using the dec.png image - maybe from a test conky I was working on?
The months as I uses them: jan, feb, mar, apr, may, jun, jul, aug, sep, oct nov, dec
Here's my conky as it is now with: "THE RING"
## pkill -xf "conky -c /media/5/Conky/Mayan3/mayan_conky" &
## Mayan_Ring.png provided by ragamatrix
## ---------- Begin Window Settings
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints skip_taskbar,skip_pager,undecorated,below #,sticky
own_window_colour 000000
own_window_class Conky
own_window_title Sector11's Mayan Conky
## ARGB can be used for real transparencyown_window_hints
# own_window_argb_visual no #yes ## Options: yes or no
## Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 150
minimum_size 400 400
#maximum_width 220
gap_x 100 ## l|r
gap_y 100 ## u|d
alignment tl
## ---------- End Window Settings
## ---------- Font Settings
## Force UTF8? requires XFT
override_utf8_locale yes
## Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Fira Mono:bold:size=10
## Alpha of Xft font. Must be a value at or between 1 and 0
xftalpha 1.0
## --------- End Font Settings
## --------- Color Settings
draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000
default_color DCDCDC #Gainsboro
color0 98FB98 #PaleGreen
color1 778899 #LightSlateGray
color2 FFD700 #Gold
color3 B0E0E6 #PowderBlue
color4 F4A460 #SandyBrown
color5 DEB887 #BurlyWood
color6 00BFFF #DeepSkyBlue
color7 5F9EA0 #CadetBlue
color8 FFA500 #Orange
color9 FF4500 #OrangeRed
## ---------- End Color Settings
## ---------- Begin Borders Section
draw_borders no
## Stippled borders?
stippled_borders 5
## border margins
border_inner_margin 0
border_outer_margin 0
## border width
border_width 2
## graph borders
draw_graph_borders yes ## no
## default_graph_size 15 40
## ---------- End Borders Secton
## ---------- Begin Miscellaneous Section
## Boolean value, if true, Conky will be forked to background when started.
background no ## yes
## Subtract (file slystem) buffers from used memory?
no_buffers yes
# Imlib2 image cache size, in bytes. Defaults to 4MiB. Increase this value if
# you use $image lots. Set to 0 to disable the image cache.
imlib_cache_size 0
## Use the Xdbe extension? (eliminates flicker)
## It is highly reco${color}mmended to use own window with this one
## so double buffer won't be so big.
double_buffer yes
## ---------- End Miscellaneous Section
## ---------- Lua Section
lua_load /media/5/Conky/Mayan3/mayan_3.lua ### change path as needed
lua_draw_hook_pre draw_fig
## ---------- End Lua Section
update_interval 1
TEXT
${image /media/5/Conky/Mayan3/images/Mayan_Ring.png}\
${if_match ${time %m} == 01}${image /media/5/Conky/Mayan3/images/jan.png -p 171,171 -s 56x56}${else}\
${if_match ${time %m} == 02}${image /media/5/Conky/Mayan3/images/feb.png -p 171,171 -s 56x56}${else}\
${if_match ${time %m} == 03}${image /media/5/Conky/Mayan3/images/mar.png -p 171,171 -s 56x56}${else}\
${if_match ${time %m} == 04}${image /media/5/Conky/Mayan3/images/apr.png -p 171,171 -s 56x56}${else}\
${if_match ${time %m} == 05}${image /media/5/Conky/Mayan3/images/may.png -p 171,171 -s 56x56}${else}\
${if_match ${time %m} == 06}${image /media/5/Conky/Mayan3/images/jun.png -p 171,171 -s 56x56}${else}\
${if_match ${time %m} == 07}${image /media/5/Conky/Mayan3/images/jul.png -p 171,171 -s 56x56}${else}\
${if_match ${time %m} == 08}${image /media/5/Conky/Mayan3/images/aug.png -p 171,171 -s 56x56}${else}\
${if_match ${time %m} == 09}${image /media/5/Conky/Mayan3/images/sep.png -p 171,171 -s 56x56}${else}\
${if_match ${time %m} == 10}${image /media/5/Conky/Mayan3/images/oct.png -p 171,171 -s 56x56}${else}\
${if_match ${time %m} == 11}${image /media/5/Conky/Mayan3/images/nov.png -p 171,171 -s 56x56}${else}\
${if_match ${time %m} == 12}${image /media/5/Conky/Mayan3/images/dec.png -p 171,171 -s 56x56}\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
Your outer ring, ragamatrix, adds a bit of Mayan Class!!! to that - Thank you
@loutch - AWESOME!!!!!! KUDOS!
===================
EDIT: I noticed that ragamatrix posted the mayan.lua script converted to read in the French language. Makes sense since he is French, so here is the English version:
I saved it as: mayan_3.lua since it was the third version mrpeachy put out.
--[[mayancalander by mrpeachy . version5.18.11
changes
improved and shortened number_to_words and date_to_words functions
increased number of settings (settings begin on line 65)
call in conkyrc like so
lua_load /path to file/filename.lua
lua_draw_hook_pre draw_fig
note about color and alpha
to set colors use the following format
color={0xFFFFFF,1}
^ ^
color alpha
]]
require 'cairo'
-------------------------------------------------------------------
function string:split(delimiter)
local result = { }
local from = 1
local delim_from, delim_to = string.find( self, delimiter, from )
while delim_from do
table.insert( result, string.sub( self, from , delim_from-1 ) )
from = delim_to + 1
delim_from, delim_to = string.find( self, delimiter, from )
end
table.insert( result, string.sub( self, from ) )
return result
end--of function
-------------------------------------------------------------------
function number_to_words(number)
n_sub=string.gsub(tostring(number), ".", "%1|")
n_split=string.split(n_sub, "|")
n_len=string.len(tostring(number))
if tonumber(number)>0 then n0="" else n0="zero" end
n1_tab={n0=n0,n1="one",n2="two",n3="three",n4="four",n5="five",n6="six",n7="seven",n8="eight",n9="nine",n10="ten",n11="eleven",n12="twelve",n13="thirteen",n14="fourteen",n15="fifteen",n16="sixteen",n17="seventeen",n18="eighteen",n19="nineteen",}
n2_tab={n0="",n1="ten",n2="twenty",n3="thirty",n4="fourty",n5="fifty",n6="sixty",n7="seventy",n8="eighty",n9="ninety",}
n3_tab={n0="",n1="one hundred",n2="two",n3="thirty",n4="fourty",n5="fifty",n6="sixty",n7="seventy",n8="eighty",n9="ninety",}
if tonumber(number)<20 then
return (n1_tab[tostring("n" .. number)])
elseif tonumber(number)>19 and tonumber(number)<100 then
if tonumber(n_split[2])>0 then joinu=" " else joinu="" end
return (n2_tab[tostring("n" .. n_split[1])] .. joinu .. n1_tab[tostring("n" .. n_split[2])])
elseif tonumber(number)>99 and tonumber(number)<1000 then
if tonumber(n_split[2])>0 or tonumber(n_split[3])>0 then join="and " else join="" end
if tonumber(n_split[2])>0 then joinu=" " else joinu="" end
return (n1_tab[tostring("n" .. n_split[1])] .. " hundred " .. join .. n2_tab[tostring("n" .. n_split[2])] .. joinu .. n1_tab[tostring("n" .. n_split[3])])
end
end--function
---------------------------------------------------------------------
function date_to_words()
date=os.date("%d")
datecut=string.gsub(date, ".", "%1|")
datetable=string.split(datecut, "|")
d1_tab={d1="first",d2="second",d3="third",d4="fourth",d5="fifth",d6="sixth",d7="seventh",d8="eigth",d9="nineth",d10="tenth",d11="eleventh",d12="twelfth",d13="thirteenth",d14="fourteenth",d15="fifteenth",d16="sixteenth",d17="seventeenth",d18="eighteenth",d19="nineteenth",d20="twentieth",d30="thirtieth"}
d2_tab={d2="twenty",d3="thirty",}
if tonumber(date)<21 or tonumber(date)==30 then
return (d1_tab[tostring("d" .. date)])
elseif tonumber(date)>20 and tonumber(date)~=30 then
return (d2_tab[tostring("d" .. datetable[1])] .. " " .. d1_tab[tostring("d" .. datetable[2])])
end
end--function
function rgb_to_r_g_b(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end
----------------------------------------------------------------------
function conky_draw_fig()
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--##############################################################################
--SETTINGS--SETTINGS--SETTINGS--SETTINGS--SETTINGS--SETTINGS--SETTINGS--SETTINGS
--##############################################################################
--center position
hx0,hy0=200,200
inner_radius=40
--line width
linew=1
--general settings to apply globally, can be altered/overriden for each section below
--line color and alpha
local global_line_color={0xFFFFFF,1}
--font
local font="mono"
--font size
local fsize=10
--text color and alpha
local global_text_color={0xFFFF00,1}
--gap under text
local tbg=3
--gap from indicator to text
local tig=6
--indicator circle width
local cw=10
--text circle width
local tcw=13
--indicator color and alpha
local global_indicator_color={0xFFFFFF,1}
--############################################
--settings for each section of calendar
--############################################
--MONTHS--------------------------------------
--line color and alpha
--eg month_line_color={0xFFFFFF,1}
local month_line_color=global_line_color
--text
local mfont=font
local mfsize=fsize
--text color and alpha
local month_text_color=global_text_color
--gap at bottom of text
local mtbg=tbg
--gap from indicator to text
local mtig=tig
--circle width
local mcw=cw
--text circle width
local mtcw=tcw
--indicator color and alpha
local month_indicator_color=global_indicator_color
--############################################
--DAYS----------------------------------------
--line color and alpha
--eg day_line_color={0xFFFFFF,1}
local day_line_color=global_line_color
--text
local dfont=font
local dfsize=fsize
--text color and alpha
local day_text_color=global_text_color
--gap at bottom of text
local dtbg=tbg
--gap from indicator to text
local dtig=tig
--circle width
local dcw=cw
--text circle width
local dtcw=tcw
--indicator color and alpha
local day_indicator_color=global_indicator_color
--############################################
--HOURS---------------------------------------
--line color and alpha
--eg hour_line_color={0xFFFFFF,1}
local hour_line_color=global_line_color
--text
local hfont=font
local hfsize=fsize
--text color
local hour_text_color=global_text_color
--gap at bottom of text
local htbg=tbg
--gap from indicator to text
local htig=tig
--indicator circle width
local hcw=cw
--text circle width
local htcw=tcw
--indicator color
local hour_indicator_color=global_indicator_color
--############################################
--MINUTES-------------------------------------
--line color and alpha
--eg min_line_color={0xFFFFFF,1}
local min_line_color=global_line_color
--text
local minfont=font
local minfsize=fsize
--text color and alpha
local min_text_color=global_text_color
--gap at bottom of text
local mintbg=tbg
--gap from indicator to text
local mintig=tig
--circle width
local mincw=cw
--text circle width
local mintcw=tcw
--indicator color and alpha
local min_indicator_color=global_indicator_color
--############################################
--SECONDS-------------------------------------
--line color and alpha
--eg sec_line_color={0xFFFFFF,1}
local sec_line_color=global_line_color
--text
local sfont=font
local sfsize=fsize
--text color and alpha
local sec_text_color=global_text_color
--gap at bottom of text
local stbg=tbg
--gap from indicator to text
local stig=tig
--circle width
local scw=cw
--text circle width
local stcw=tcw
--indicator color and alpha
local sec_indicator_color=global_indicator_color
--#################################################
--END OF SETTINGS--END OF SETTINGS--END OF SETTINGS
--#################################################
--months of the year---------------------------------------------------------------------------------------------------
mnrad1=inner_radius
mnrad2=mnrad1+mcw
cairo_set_source_rgba (cr,rgb_to_r_g_b(month_line_color))
--draw circles
cairo_set_line_width (cr,linew)
cairo_arc (cr,hx0,hy0,mnrad1,0,2*math.pi)
cairo_stroke (cr)
cairo_arc (cr,hx0,hy0,mnrad2,0,2*math.pi)
cairo_stroke (cr)
--calculations
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))
yeardays=31+febdaynum+31+30+31+30+31+31+30+31+30+31
yearsec=(yeardays*24*60*60)
jan=31*24*60*60
feb=jan+(febdaynum*24*60*60)
mar=feb+(31*24*60*60)
apr=mar+(30*24*60*60)
may=apr+(31*24*60*60)
jun=may+(30*24*60*60)
jul=jun+(31*24*60*60)
aug=jul+(31*24*60*60)
sep=aug+(30*24*60*60)
oct=sep+(31*24*60*60)
nov=oct+(30*24*60*60)
dec=nov+(31*24*60*60)
secdays = {jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec}
--circle indicator lines
for i=1,12 do
arc=((2*math.pi/360)*((360/yearsec)*(secdays[i])))
mnx1=0+mnrad1*(math.sin(arc))
mny1=0-mnrad1*(math.cos(arc))
arc=((2*math.pi/360)*((360/yearsec)*(secdays[i])))
mnx2=0+mnrad2*(math.sin(arc))
mny2=0-mnrad2*(math.cos(arc))
cairo_move_to (cr,hx0+mnx1,hy0+mny1)
cairo_line_to (cr,hx0+mnx2,hy0+mny2)
cairo_stroke (cr)
end
--indicator-----------------------------------------------------
cairo_set_source_rgba (cr,rgb_to_r_g_b(month_indicator_color))
doy=tonumber(os.date("%j"))
yrsecs=((doy-1)*24*60*60)+(tonumber(os.date('%H'))*60*60)+(tonumber(os.date('%M'))*60)+(tonumber(os.date('%S')))
mnrad3=mnrad2+mtcw
arc=(2*math.pi/360)*((360/yearsec)*(yrsecs))
mnx1=0+(mnrad2+linew)*(math.sin(arc))
mny1=0-(mnrad2+linew)*(math.cos(arc))
arc=(2*math.pi/360)*((360/yearsec)*((yrsecs))+4)
mnx2=0+mnrad3*(math.sin(arc))
mny2=0-mnrad3*(math.cos(arc))
arc=(2*math.pi/360)*((360/yearsec)*((yrsecs))-4)
mnx3=0+mnrad3*(math.sin(arc))
mny3=0-mnrad3*(math.cos(arc))
cairo_move_to (cr,hx0+mnx1,hy0+mny1)
cairo_line_to (cr,hx0+mnx2,hy0+mny2)
cairo_stroke (cr)
cairo_move_to (cr,hx0+mnx1,hy0+mny1)
cairo_line_to (cr,hx0+mnx3,hy0+mny3)
cairo_stroke (cr)
--circlewriting-------------------------------------------------
--text must be in quotes
text=((string.upper(os.date('%B'))) .. " TWO THOUSAND AND " .. string.upper(number_to_words(os.date('%y'))))
start=((360/yearsec)*((yrsecs))+mtig)
slen2=string.len(text)
finish=start+270
circlewriting(text,mfont,mfsize,mnrad2+mtbg,hx0,hy0,month_text_color,start,finish)
--end of months around year-------------------------------------------------------------------------------------------------------------------------------
--##########################################################################################
--days around month----------------------------------------------------------------------
drad1=mnrad3
drad2=drad1+dcw
cairo_set_source_rgba (cr,rgb_to_r_g_b(day_line_color))
--draw circles
cairo_arc (cr,hx0,hy0,drad1,0,2*math.pi)
cairo_stroke (cr)
cairo_arc (cr,hx0,hy0,drad2,0,2*math.pi)
cairo_stroke (cr)
--calculations
monthnum=(tonumber(os.date('%m')))
monthdays = { 31, febdaynum, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
--drawin circle indicator lines
for i=1,monthdays[monthnum] do
arc=((2*math.pi/360)*((360/monthdays[monthnum])*(i)))
dx1=0+drad1*(math.sin(arc))
dy1=0-drad1*(math.cos(arc))
arc=((2*math.pi/360)*((360/monthdays[monthnum])*(i)))
dx2=0+drad2*(math.sin(arc))
dy2=0-drad2*(math.cos(arc))
cairo_move_to (cr,hx0+dx1,hy0+dy1)
cairo_line_to (cr,hx0+dx2,hy0+dy2)
cairo_stroke (cr)
end
--indicator
cairo_set_source_rgba (cr,rgb_to_r_g_b(day_indicator_color))
daynumsec=(tonumber(os.date('%d'))*24*60*60)+(tonumber(os.date('%H'))*60*60)+(tonumber(os.date('%M'))*60)+(tonumber(os.date('%S')))
monthnumsec=(monthdays[monthnum])*24*60*60
drad3=drad2+dtcw
arc=(2*math.pi/360)*((360/monthnumsec)*(daynumsec))
dx1=0+(drad2+linew)*(math.sin(arc))
dy1=0-(drad2+linew)*(math.cos(arc))
arc=(2*math.pi/360)*((360/monthnumsec)*((daynumsec))+4)
dx2=0+drad3*(math.sin(arc))
dy2=0-drad3*(math.cos(arc))
arc=(2*math.pi/360)*((360/monthnumsec)*((daynumsec))-4)
dx3=0+drad3*(math.sin(arc))
dy3=0-drad3*(math.cos(arc))
cairo_move_to (cr,hx0+dx1,hy0+dy1)
cairo_line_to (cr,hx0+dx2,hy0+dy2)
cairo_stroke (cr)
cairo_move_to (cr,hx0+dx1,hy0+dy1)
cairo_line_to (cr,hx0+dx3,hy0+dy3)
cairo_stroke (cr)
--circlewriting
text=((string.upper(os.date('%A'))) .. " THE " .. string.upper(date_to_words()))
start=((360/monthnumsec)*(daynumsec)+dtig)
slen1=string.len(text)
finish=start+(7.5*slen1)
circlewriting(text,dfont,dfsize,drad2+dtbg,hx0,hy0,day_text_color,start,finish)
--end of days around month-------------------------------------------------------------------------------------------------------
--##########################################################################################
--hours around day ---------------------------------------------------------------------------------------------------------------------
hrad1=drad3
hrad2=hrad1+hcw
cairo_set_source_rgba (cr,rgb_to_r_g_b(hour_line_color))
--draw eings
cairo_arc (cr,hx0,hy0,hrad1,0,2*math.pi)
cairo_stroke (cr)
cairo_arc (cr,hx0,hy0,hrad2,0,2*math.pi)
cairo_stroke (cr)
--draw ring indicator lines
for i=1,24 do
arc=((2*math.pi/360)*((360/24)*i))
hx1=0+hrad1*(math.sin(arc))
hy1=0-hrad1*(math.cos(arc))
arc=((2*math.pi/360)*((360/24)*i))
hx2=0+hrad2*(math.sin(arc))
hy2=0-hrad2*(math.cos(arc))
cairo_move_to (cr,hx0+hx1,hy0+hy1)
cairo_line_to (cr,hx0+hx2,hy0+hy2)
cairo_stroke (cr)
end
--indicator
cairo_set_source_rgba (cr,rgb_to_r_g_b(hour_indicator_color))
hrsec=(tonumber(os.date('%H'))*60*60)+(tonumber(os.date('%M'))*60)+(tonumber(os.date('%S')))
hrad3=hrad2+htcw
arc=((2*math.pi/360)*((360/(24*60*60)*hrsec)))
hx1=0+(hrad2+linew)*(math.sin(arc))
hy1=0-(hrad2+linew)*(math.cos(arc))
arc=(2*math.pi/360)*((360/(24*60*60))*(hrsec)-4)
hx2=0+hrad3*(math.sin(arc))
hy2=0-hrad3*(math.cos(arc))
arc=(2*math.pi/360)*((360/(24*60*60))*(hrsec)+4)
hx3=0+hrad3*(math.sin(arc))
hy3=0-hrad3*(math.cos(arc))
cairo_move_to (cr,hx0+hx1,hy0+hy1)
cairo_line_to (cr,hx0+hx2,hy0+hy2)
cairo_stroke (cr)
cairo_move_to (cr,hx0+hx1,hy0+hy1)
cairo_line_to (cr,hx0+hx3,hy0+hy3)
cairo_stroke (cr)
--circlewriting
hrnum=tonumber(os.date('%H'))
if hrnum==1 then hour="HOUR"
else hour="HOURS" end
text=((string.upper(number_to_words(hrnum))) .. " " .. hour)
start=((360/(24*60*60))*(hrsec)+htig)
slen4=string.len(text)
finish=start+(slen4*5)
circlewriting(text,hfont,hfsize,hrad2+htbg,hx0,hy0,hour_text_color,start,finish)
--end of hours around day----------------------------------------------------------------------------------------------------
--##########################################################################################
--minutes around hour--------------------------------------------------------------------------------------------------------------
minrad1=hrad3
minrad2=minrad1+mincw
cairo_set_source_rgba (cr,rgb_to_r_g_b(min_line_color))
--draw circles
cairo_arc (cr,hx0,hy0,minrad1,0,2*math.pi)
cairo_stroke (cr)
cairo_arc (cr,hx0,hy0,minrad2,0,2*math.pi)
cairo_stroke (cr)
--draw circle indicator lines
for i=1,60 do
arc=((2*math.pi/360)*((360/60)*i))
mx1=0+minrad1*(math.sin(arc))
my1=0-minrad1*(math.cos(arc))
arc=((2*math.pi/360)*((360/60)*i))
mx2=0+minrad2*(math.sin(arc))
my2=0-minrad2*(math.cos(arc))
cairo_move_to (cr,hx0+mx1,hy0+my1)
cairo_line_to (cr,hx0+mx2,hy0+my2)
cairo_stroke (cr)
end
--indicator
cairo_set_source_rgba (cr,rgb_to_r_g_b(min_indicator_color))
minsec=(tonumber(os.date('%M'))*60)+(tonumber(os.date('%S')))
minrad3=minrad2+mintcw
arc=((2*math.pi/360)*((360/(60*60)*minsec)))
mx1=0+(minrad2+linew)*(math.sin(arc))
my1=0-(minrad2+linew)*(math.cos(arc))
arc=(2*math.pi/360)*((360/(60*60))*(minsec)-4)
mx2=0+minrad3*(math.sin(arc))
my2=0-minrad3*(math.cos(arc))
arc=(2*math.pi/360)*((360/(60*60))*(minsec)+4)
mx3=0+minrad3*(math.sin(arc))
my3=0-minrad3*(math.cos(arc))
cairo_move_to (cr,hx0+mx1,hy0+my1)
cairo_line_to (cr,hx0+mx2,hy0+my2)
cairo_stroke (cr)
cairo_move_to (cr,hx0+mx1,hy0+my1)
cairo_line_to (cr,hx0+mx3,hy0+my3)
cairo_stroke (cr)
--circlewriting
min=tonumber(os.date('%M'))
if min==1 then minute="MINUTE"
else minute="MINUTES" end
text=((string.upper(number_to_words(min))) .. " " .. minute)
start=((360/(60*60))*(minsec)+mintig)
slen4=string.len(text)
finish=start+(slen4*5)
letterposition=0
circlewriting(text,minfont,minfsize,minrad2+mintbg,hx0,hy0,min_text_color,start,finish)
--end minutes around hour--------------------------------------------------------------------------------------
--##########################################################################################
--seconds of minute-------------------------------------------------------------------------------------------
srad1=minrad3
srad2=srad1+scw
cairo_set_source_rgba (cr,rgb_to_r_g_b(sec_line_color))
--draw circles
cairo_arc (cr,hx0,hy0,srad1,0,2*math.pi)
cairo_stroke (cr)
cairo_arc (cr,hx0,hy0,srad2,0,2*math.pi)
cairo_stroke (cr)
--draw circle indicator lines
for i=1,60 do
arc=((2*math.pi/360)*((360/60)*i))
sx1=0+srad1*(math.sin(arc))
sy1=0-srad1*(math.cos(arc))
arc=((2*math.pi/360)*((360/60)*i))
sx2=0+srad2*(math.sin(arc))
sy2=0-srad2*(math.cos(arc))
cairo_move_to (cr,hx0+sx1,hy0+sy1)
cairo_line_to (cr,hx0+sx2,hy0+sy2)
cairo_stroke (cr)
end
--indicator
cairo_set_source_rgba (cr,rgb_to_r_g_b(sec_indicator_color))
sec=(tonumber(os.date('%S')))
srad3=srad2+stcw
arc=((2*math.pi/360)*((360/(60)*sec)))
sx1=0+(srad2+linew)*(math.sin(arc))
sy1=0-(srad2+linew)*(math.cos(arc))
arc=(2*math.pi/360)*((360/60)*((sec))-4)
sx2=0+srad3*(math.sin(arc))
sy2=0-srad3*(math.cos(arc))
arc=(2*math.pi/360)*((360/60)*((sec))+4)
sx3=0+srad3*(math.sin(arc))
sy3=0-srad3*(math.cos(arc))
cairo_move_to (cr,hx0+sx1,hy0+sy1)
cairo_line_to (cr,hx0+sx2,hy0+sy2)
cairo_stroke (cr)
cairo_move_to (cr,hx0+sx1,hy0+sy1)
cairo_line_to (cr,hx0+sx3,hy0+sy3)
cairo_stroke (cr)
--outer circle
cairo_set_source_rgba (cr,rgb_to_r_g_b(sec_line_color))
cairo_arc (cr,hx0,hy0,srad3,0,2*math.pi)
cairo_stroke (cr)
--circlewriting
sec=tonumber(os.date('%S'))
if sec==1 then second="SECOND"
else second="SECONDS" end
text=(string.upper(number_to_words(sec)) .. " " .. second)
start=((360/60)*((sec))+stig)
slen3=string.len(text)
finish=start+(slen3*5)
circlewriting(text,sfont,sfsize,srad2+stbg,hx0,hy0,sec_text_color,start,finish)
--end seconds of minute-----------------------------------------------------------------------------------------------------------------------------
--END OF CALENDAR
--#########################################################################################################
--#########################################################################################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end main function
---------------------------------------------------------------------------
function circlewriting(text, font, fsize, radi, horiz, verti, text_color, start, finish)
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fsize)
cairo_set_source_rgba (cr,rgb_to_r_g_b(text_color));
local inum=string.len(text)
deg=(finish-start)/(inum-1)
degrads=(math.pi/180)
local textcut=string.gsub(text, ".", "%1|")
texttable=string.split(textcut, "|")
for i=1,inum do
interval=(degrads*(start+(deg*(i-1))))
txs=0+radi*(math.sin(interval))
tys=0-radi*(math.cos(interval))
cairo_move_to (cr, txs+horiz, tys+verti);
cairo_rotate (cr, interval)
cairo_show_text (cr, (texttable[i]))
cairo_stroke (cr)
cairo_rotate (cr, -interval)
end
end--of function
---------------------------------------------------------------------------
Last edited by Sector11 (2016-11-17 19:44:49)
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
an old archive "peachy" conky and a maya theme:
http://pix.toile-libre.org/upload/thumb/1478968114.png ... but the clock gives me a stiff neck
I'm surprised that wallpaper doesn't give you vertigo as well.
I'll have to see if I can that conky working again, haven't used a blingy one in a while.
In the meantime, same old:
You must unlearn what you have learned.
-- yoda
Online
Hello
ragamatrix i permice me this
http://pix.tdct.org/upload/thumb/1479375167.png
Do I detect a touch of DieterT in your conkys? (spelling )
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
https://forums.bunsenlabs.org/viewtopic … 535#p40535
^ Sector11
thank you very much for sharing!
Now is with me a Maya clock out (mrpeachy slumbered on the HDD)
@ragamatrix
@loutch
Excellent, thank you very much!
Offline
... and a maya theme:
... but the clock gives me a stiff neck
Totally missed this ... stillf neck comment.
You need to learn how to read in circles.
But let's face it, this is just for looks - a little "clock" in the bottom corner of your desktop is still a good idea.
OR change the alpha setting for the lines to dim them, change the font to something a bit 'thicker' and an easier to read colour like "FFD700 = gold":
(with line numbers added for convenience)
80 --general settings to apply globally, can be altered/overriden for each section below
81 --line color and alpha
82 local global_line_color={0xFFFFFF,0.2} <----------------- dim alpha
83 --font
84 local font="fira mono"
85 --font size
86 local fsize=10
87 --text color and alpha
88 local global_text_color={0xFFD700,1} <----------------- text colour
The difference is visible:
Interesting, both done at 2 seconds past the minute mark without even trying!
EDIT: Is it just me or does the ring on the right look like it has more contrast?
Last edited by Sector11 (2016-11-17 21:30:04)
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
hello
loutch wrote:Hello
ragamatrix i permice me this
http://pix.tdct.org/upload/thumb/1479375167.pngDo I detect a touch of DieterT in your conkys? (spelling
)
yes
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
^ I'm glad that you enjoy it. These pics codes and conkyrc are not mine so ... That's cool if everybody "g33ks" or "tweak" all these stuffs for sharing again... Sorry for my English. See you guyZ
Offline
So this isn't a conky, but I'd like to see if it could become a conky theme.
Here is an old SuperKaramba theme that I used to use all the time. I played with it and modified it a little (how I learned Gimp even I think) a long time ago, and after I moved away from KDE, I sorta gave up on it. If I get some spare time I'd like to convert to a conky theme.
Here is a screenshot showing the concept of the theme.
http://rwyarbrough.homelinux.net/analogmachinefull.jpg
Here is the Perpetual Calendar from the AnalogMachine Collection Theme
Check out the Network Flow Meter Python script and images link.
http://rwyarbrough.homelinux.net/netflowfull.jpg
Here is one of the component's python scripts and images link
Here is the Disk VU script link from the collection
And finally the clock with seconds and RPM meter scripts link
Would it be possible to do something like this with conky? Superkaramba uses background images overlaid with dynamic line drawing and/or dynamic image overlays powered by Python for the dynamic data display.
Last edited by rwyarbrough (2016-12-07 00:38:51)
Offline
Would it be possible to do something like this with conky? Superkaramba uses background images overlaid with dynamic line drawing and/or dynamic image overlays powered by Python for the dynamic data display.
Yes, that can be done -put the conky information over an image, dynamic dials etc ..; takes a whole lot of patiance though. Maybe S11 has an image of it, but I'm pretty sure I've seen a Steam Punk style conky that is more along the lines of what you did with Superkaramba.
Last edited by PackRat (2016-12-04 23:13:38)
You must unlearn what you have learned.
-- yoda
Online
@ rwyarbrough
As PackRat said - this is doable and will require a lot of patience with spacing.
loutch uses LUA scripts to move the pointer for the wind, 12 points, this needs to flow more - somewhere I've seen something like that. Must go looking. Also the links you provided gave us/me some of the images needed ... like the glowing numbers and backgrounds to:
/media/5/Conky/SuperKaramba/DiscVU-0.3 «- will also give us what is needed for time.
/media/5/Conky/SuperKaramba/NetVU-0.2
/media/5/Conky/SuperKaramba/RPM
/media/5/Conky/SuperKaramba/TubeSWAP
So we are good to start something anyway. At least we can get the "lights" (numbers) working If we can't get more elements - CPU, M/B, PSU and a the Perpetual Calendar we'd have a more complete set.
Now with all that said, and done it's going to be a MESS of ${if_match} ... ${else} ... ${endif} statements.
If only I knew python or LUA!!!!
Time to get to work.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
GIMPED out the clock part, copied a dot to the top and hard coded this:
Nothing to get excited about ... YET!
TEXT
${image /media/5/Conky/SuperKaramba/Clock.png -p 0,0}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 80,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 155,20}\
Now comes the if_match magic!
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
@rwyarbrough
HUSTON - WE HAVE A SuperKaramba CLOCK! ....
... and it's the only thing running, burning up a whopping 1% of my CPU! NOT BAD!!!!
The images can be found in the links in this post. They are missing this Clock.png image though so grab it now.
I'm leaving the top line for time and CPU usage ... take it out after testing, and if you don't the timezone info that can be removed as well. I'm going to keep that line in my version.
SuperK.conky
## pkill -xf "conky -c /media/5/Conky/SuperKaramba/SuperK.conky" &
## ---------- Begin Window Settings
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints skip_taskbar,skip_pager,undecorated,below #,sticky
own_window_colour 000000
own_window_class Conky
own_window_title SuperKaramba conky
## Not a good idea with images.
## ARGB can be used for real transparencyown_window_hints
# own_window_argb_visual no #yes ## Options: yes or no
## Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 150
minimum_size 240 118
maximum_width 240
gap_x 10 ## l|r
gap_y 10 ## u|d
alignment tl
## ---------- End Window Settings
## ---------- Font Settings
## Force UTF8? requires XFT
override_utf8_locale yes
## Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont Liberation Mono:bold:size=11
#xftfont Fantasque Sans Mono:bold:size=12
#xftfont Monofur:bold:size=10
#xftfont DejaVu Sans Mono:bold:size=10
xftfont Fira Mono:size=9
## Alpha of Xft font. Must be a value at or between 1 and 0
xftalpha 1.0
## --------- End Font Settings
## --------- Color Settings
draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000
default_color DCDCDC #Gainsboro
color0 98FB98 #PaleGreen
color1 778899 #LightSlateGray
color2 FFD700 #Gold
color3 B0E0E6 #PowderBlue
color4 F4A460 #SandyBrown
color5 DEB887 #BurlyWood
color6 00BFFF #DeepSkyBlue
color7 5F9EA0 #CadetBlue
color8 FFA500 #Orange
color9 FF4500 #OrangeRed
## ---------- End Color Settings
## ---------- Begin Borders Section
draw_borders no
## Stippled borders?
stippled_borders 5
## border margins
border_inner_margin 0
border_outer_margin 0
## border width
border_width 2
## ---------- End Borders Secton
## ---------- Begin Miscellaneous Section
## Boolean value, if true, Conky will be forked to background when started.
background yes
## Adds spaces around certain objects to stop them from moving other things
## around, this only helps if you are using a mono font
## Options: right, left or none
use_spacer none
## Subtract (file slystem) buffers from used memory?
no_buffers yes
# Imlib2 image cache size, in bytes. Defaults to 4MiB. Increase this value if
# you use $image lots. Set to 0 to disable the image cache.
imlib_cache_size 0
# Interval (in seconds) to flush Imlib2 cache.
#imlib_cache_flush_interval 900
## Use the Xdbe extension? (eliminates flicker)
## It is highly recommended to use own window with this one
## so double buffer won't be so big.
double_buffer yes
## ---------- End Miscellaneous Section
update_interval 1
TEXT
${image /media/5/Conky/SuperKaramba/images/Clock.png -p 0,0}\
${alignc 4}${time %T} CPU = ${cpu}
${alignc 4}${color2}${time %z %Z}${color}\
${if_match ${time %H}==00}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 80,20}\
${else}${if_match ${time %H}==01}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 80,20}\
${else}${if_match ${time %H}==02}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 80,20}\
${else}${if_match ${time %H}==03}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 80,20}\
${else}${if_match ${time %H}==04}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 80,20}\
${else}${if_match ${time %H}==05}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 80,20}\
${else}${if_match ${time %H}==06}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-6.png -p 80,20}\
${else}${if_match ${time %H}==07}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-7.png -p 80,20}\
${else}${if_match ${time %H}==08}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-9.png -p 80,20}\
${else}${if_match ${time %H}==09}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-9.png -p 80,20}\
${else}${if_match ${time %H}==10}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 80,20}\
${else}${if_match ${time %H}==11}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 80,20}\
${else}${if_match ${time %H}==12}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 80,20}\
${else}${if_match ${time %H}==13}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 80,20}\
${else}${if_match ${time %H}==14}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 80,20}\
${else}${if_match ${time %H}==15}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 80,20}\
${else}${if_match ${time %H}==16}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-6.png -p 80,20}\
${else}${if_match ${time %H}==17}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-7.png -p 80,20}\
${else}${if_match ${time %H}==18}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-8.png -p 80,20}\
${else}${if_match ${time %H}==19}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-9.png -p 80,20}\
${else}${if_match ${time %H}==20}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 80,20}\
${else}${if_match ${time %H}==21}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 80,20}\
${else}${if_match ${time %H}==22}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 80,20}\
${else}${if_match ${time %H}==23}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 50,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 80,20}\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}\
${endif}${endif}${endif}${endif}\
${if_match ${time %M}==00}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 155,20}\
${else}${if_match ${time %M}==01}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 155,20}\
${else}${if_match ${time %M}==02}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 155,20}\
${else}${if_match ${time %M}==03}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 155,20}\
${else}${if_match ${time %M}==04}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 155,20}\
${else}${if_match ${time %M}==05}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 155,20}\
${else}${if_match ${time %M}==06}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-6.png -p 155,20}\
${else}${if_match ${time %M}==07}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-7.png -p 155,20}\
${else}${if_match ${time %M}==08}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-8.png -p 155,20}\
${else}${if_match ${time %M}==09}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-9.png -p 155,20}\
${else}${if_match ${time %M}==10}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 155,20}\
${else}${if_match ${time %M}==11}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 155,20}\
${else}${if_match ${time %M}==12}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 155,20}\
${else}${if_match ${time %M}==13}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 155,20}\
${else}${if_match ${time %M}==14}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 155,20}\
${else}${if_match ${time %M}==15}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 155,20}\
${else}${if_match ${time %M}==16}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-6.png -p 155,20}\
${else}${if_match ${time %M}==17}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-7.png -p 155,20}\
${else}${if_match ${time %M}==18}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-8.png -p 155,20}\
${else}${if_match ${time %M}==19}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-9.png -p 155,20}\
${else}${if_match ${time %M}==20}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 155,20}\
${else}${if_match ${time %M}==21}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 155,20}\
${else}${if_match ${time %M}==22}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 155,20}\
${else}${if_match ${time %M}==23}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 155,20}\
${else}${if_match ${time %M}==24}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 155,20}\
${else}${if_match ${time %M}==25}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 155,20}\
${else}${if_match ${time %M}==26}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-6.png -p 155,20}\
${else}${if_match ${time %M}==27}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-7.png -p 155,20}\
${else}${if_match ${time %M}==28}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-8.png -p 155,20}\
${else}${if_match ${time %M}==29}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-9.png -p 155,20}\
${else}${if_match ${time %M}==30}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 155,20}\
${else}${if_match ${time %M}==31}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 155,20}\
${else}${if_match ${time %M}==32}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 155,20}\
${else}${if_match ${time %M}==33}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 155,20}\
${else}${if_match ${time %M}==34}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 155,20}\
${else}${if_match ${time %M}==35}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 155,20}\
${else}${if_match ${time %M}==36}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-6.png -p 155,20}\
${else}${if_match ${time %M}==37}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-7.png -p 155,20}\
${else}${if_match ${time %M}==38}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-8.png -p 155,20}\
${else}${if_match ${time %M}==39}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-9.png -p 155,20}\
${else}${if_match ${time %M}==40}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 155,20}\
${else}${if_match ${time %M}==41}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 155,20}\
${else}${if_match ${time %M}==42}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 155,20}\
${else}${if_match ${time %M}==43}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 155,20}\
${else}${if_match ${time %M}==44}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 155,20}\
${else}${if_match ${time %M}==45}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 155,20}\
${else}${if_match ${time %M}==46}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-6.png -p 155,20}\
${else}${if_match ${time %M}==47}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-7.png -p 155,20}\
${else}${if_match ${time %M}==48}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-8.png -p 155,20}\
${else}${if_match ${time %M}==49}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-9.png -p 155,20}\
${else}${if_match ${time %M}==50}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-0.png -p 155,20}\
${else}${if_match ${time %M}==51}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-1.png -p 155,20}\
${else}${if_match ${time %M}==52}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-2.png -p 155,20}\
${else}${if_match ${time %M}==53}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-3.png -p 155,20}\
${else}${if_match ${time %M}==54}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-4.png -p 155,20}\
${else}${if_match ${time %M}==55}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 155,20}\
${else}${if_match ${time %M}==56}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-6.png -p 155,20}\
${else}${if_match ${time %M}==57}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-7.png -p 155,20}\
${else}${if_match ${time %M}==58}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-8.png -p 155,20}\
${else}${if_match ${time %M}==59}\
${image /media/5/Conky/SuperKaramba/numbers/1-5.png -p 125,20}\
${image /media/5/Conky/SuperKaramba/numbers/1-9.png -p 155,20}\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
i like the block of endif's there at the end.
8o
i think this would be much easier, better, lighter achieved with shell scripting, then calling some ${execp ...}...
gimme a minute, that's just the sort of timekiller i need right now...
Offline
here you go:
sp-clock.sh
#!/bin/bash
gap="$1" #the gap between hours and minutes
time="$(date +%H%M)"
echo "\${image ./1-${time:0:1}.png -p 0,0}\
\${image ./1-${time:1:1}.png -p 32,0}\
\${image ./1-${time:2:1}.png -p $((64 + gap)),0}\
\${image ./1-${time:3:1}.png -p $((96 + gap)),0}"
conkyrc
#<conkyrc>
own_window yes
own_window_transparent yes
own_window_argb_visual no
own_window_type override
background yes
update_interval 1
double_buffer yes
alignment bl
gap_x 10
gap_y 30
minimum_size 128 70
TEXT
${execpi 10 ./sp-clock.sh 10}
images, script and conkyrc are in the same directory.
you also have to start the conky from that same directory.
Last edited by Head_on_a_Stick (2016-12-05 21:44:44)
Offline
Need to test a bit more but I think I have that working like any other conky, no need to be all in the same directory.
back soon.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
here you go:
images, script and conkyrc are in the same directory.
you also have to start the conky from that same directory.
AWESOME and still at 1%. and so few ${endif}'s
I have it working in different directories with a "user" variable input in the script:
numpath="/media/5/Conky/SuperKaramba/numbers"
I have:
The conky: /media/5/Conky/SuperKaramba/ohnonot.conky
Your script: /media/5/Conky/SuperKaramba/scripts/sp-clock_2.sh
The numbers: /media/5/Conky/SuperKaramba/numbers
The background: /media/5/Conky/SuperKaramba/images/Clock.png
Your conky tweaked:
### pkill -xf "conky -c /media/5/Conky/SuperKaramba/ohnonot.conky" &
#
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints skip_taskbar,skip_pager,undecorated,below #,sticky
#own_window_hints skip_taskbar,skip_pager,below #,sticky
own_window_colour 000000
own_window_class Conky
own_window_title ohnonots's Test Conky
background yes
update_interval 1
double_buffer yes
#alignment bl
alignment tl
gap_x 10
gap_y 30
#minimum_size 128 70
minimum_size 240 118
TEXT
${image /media/5/Conky/SuperKaramba/images/Clock.png -p 0,0}\
${execpi 10 /media/5/Conky/SuperKaramba/scripts/sp-clock_2.sh 10}
${alignc 10}${color FFD700}${time %z %Z} ${cpu}${color}
The tweaked script:
#!/bin/bash
## ohnonot - Mon 05 Dec 2016
gap="$1" #the gap between hours and minutes
time="$(date +%H%M)"
numpath="/media/5/Conky/SuperKaramba/numbers"
echo "\${image ${numpath}/1-${time:0:1}.png -p 50,20}\
\${image ${numpath}/1-${time:1:1}.png -p 80,20}\
\${image ${numpath}/1-${time:2:1}.png -p 125,20}\
\${image ${numpath}/1-${time:3:1}.png -p 155,20}"
Changed to "minimum_size 240 118" to allow for the background.
This is only one of half-a-dozen or so conkys to come so best to keep them running from one directory.
That's my train of though - end users may differ.
---
My weakness: I can't write scripts, bash, LUA, pythion etc, but I can tweak them (sometimes).
THANK YOU!
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline