SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1801 2011-02-08 13:41:09

donoterase
#! Member
From: 32° 20' N, 64° 45' W
Registered: 2011-02-07
Posts: 51

Re: My Conky Config

mrpeachy wrote:

i really should revisit that script, I had calculations to plot the moon position, but gave up because i couldnt get the line to plot correctly...
im sure i could get it up and running with another look big_smile

Don't give up on it! You've done so much on it already. smile My sundata script works fine, except the N and S text do not appear. Very strange....

Side question, how much memory does the mayan calendar normally take up at max usage? My mayan calendar script goes up as high as 50mb sometimes, just wondering if this is normal, and whether changing the buffer size value in the conkyrc has any affect on this. Thanks again.

Oh!! I changed the sun position to orange, and it looks great. smile Is it possible to replace it with an image? Sorry for the 21 questions!

Last edited by donoterase (2011-02-08 13:41:37)


All that there is, is not all that exists

Offline

Be excellent to each other!

#1802 2011-02-08 14:15:03

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: My Conky Config

donoterase wrote:

I feel so silly, I don't know how I missed the "enter negative" part in the instructions.

I am using the mayan calendar with the mask. Exactly like in your screenshot. I would like to get the circles and text to also be rendered in black also. Thanks for the help so far, so many silly little errors on my behalf.

Not silly errors.  We all learn. well as I said the image can be negative and I see mrpeachy showed you how to change the colours.  Good luck!

Offline

#1803 2011-02-08 15:13:05

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: My Conky Config

donoterase wrote:

Thanks again for the help MrPeachy and Sector11.

Is everybody's sundata conky working?

Mine works and doesn't - stay with me here, if I set:

update_interval 1

the blinking every second drives me crazy ... so I set it to:

update_interval 10

It takes about a minute and a half to appear (Earth is there, I'm waving!) and the blinking is reduced to once every 10 seconds.

thmb_sun.png

The script is calculating the sun angle in live mode causing the "blinking".

AAAAAAAAAAAAAAAAA!!!!!  Strobe lights in an 80's disco!

Offline

#1804 2011-02-09 03:25:11

donoterase
#! Member
From: 32° 20' N, 64° 45' W
Registered: 2011-02-07
Posts: 51

Re: My Conky Config

Sector11 wrote:

Mine works and doesn't

I can also see from your screenshot that you no long have the N and S text on the Y axis.

I have the same script setup on two separate machines. Script is functioning on my debian machine, but not mandriva (It stopped working as of this morning).

As for the update interval Sector, I have my update interval at 1 sec (I've posted my .conkyrc) and i'm not having any issues with 80's strobe effects big_smile. In saying that, I've changed my update interval to 60 seconds. Is it necessary to have it update every second? The only reason why I ask, is that I don't see the script updating that often...other than the time.

background no
own_window yes
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_type normal

override_utf8_locale yes
use_xft yes
update_interval 1
uppercase no  # set to yes if you want all text to be in uppercase
stippled_borders 0
border_inner_margin 0
border_width 0
default_outline_color black
default_shade_color black
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no

# Colours
default_color 000000
color0 000000
color1 000000
color2 000000
color3 000000
color4 000000
color5 000000
color6 000000
color7 000000
color8 000000
color9 000000

text_buffer_size 1028
double_buffer yes
no_buffers yes
short_units yes
pad_percents 2
imlib_cache_size 0

minimum_size 210 320

alignment tr
xftfont snap:bold:size=8
xftalpha 1.0

lua_load /home/donoterase/Conky/sundata/sun.lua
lua_draw_hook_pre draw_newconky
TEXT

${image ~/Conky/sundata/SunEarth_SH.png -p 73,105 -s 50x50}

I'm not sure whether that would help, but I find that sometimes copying an dumping other's conkyrc files into mine usually helps me identify problems with my own. Anyway, keep us updated. smile

Oh wow, I just saw the sun change position!


All that there is, is not all that exists

Offline

#1805 2011-02-09 16:54:53

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: My Conky Config

donoterase wrote:

I'm not sure whether that would help, but I find that sometimes copying an dumping other's conkyrc files into mine usually helps me identify problems with my own. Anyway, keep us updated. smile

Oh wow, I just saw the sun change position!

Interesting yours is test #12: ~/conky/sun12 - and while there is no N/S indicators I know what is what.

Your setup also does NOT blink and has the added info with the length of the day tomorrow being shorter.

So obviously it is something above TEXT that is causing my problem.  I will research it.

Also I made this change after TEXT as you need =either= a blank line =OR= some command for LUA to work.  The image command is enough.  Also note the "-p" setting - it will put the third rock from the sun more or less in the centre of the horizontal and vertical co-ordinates.

TEXT
${image ~/Conky/images/SunEarth_SH.png -p 73,140 -s 50x50}

This is your conky running here with that fix (plus colour and file location changes)

thmb_sun-12.png

Now to explore the differences above TEXT.  Thank you!

Offline

#1806 2011-02-10 01:42:24

donoterase
#! Member
From: 32° 20' N, 64° 45' W
Registered: 2011-02-07
Posts: 51

Re: My Conky Config

Now to explore the differences above TEXT.  Thank you!

I'm glad it helped you with your strobing effects. I'm sure if it had continued any longer, it would've started giving your seizures. Thanks for the position fix also.

I like your screenshot too by the way! I've also tried to attach a screenshot of my desktop with sundata, and maya calendar running. I've tried to change the time display of the mayan calendar to number display only. Still have a few kinks that needs ironing out.

m138461-1.png

I've got to go through my astronomy wallpaper folder and find a suitable one to go with the conky's smile.


All that there is, is not all that exists

Offline

#1807 2011-02-10 17:55:37

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: My Conky Config

donoterase wrote:

Now to explore the differences above TEXT.  Thank you!

I'm glad it helped you with your strobing effects. I'm sure if it had continued any longer, it would've started giving your seizures. Thanks for the position fix also.

Probably would have too!  But haven't had time to look, I've been busy with emails and other conky stuff.

donoterase wrote:

I like your screenshot too by the way! I've also tried to attach a screenshot of my desktop with sundata, and maya calendar running. I've tried to change the time display of the mayan calendar to number display only. Still have a few kinks that needs ironing out.

m138461-1.png

I've got to go through my astronomy wallpaper folder and find a suitable one to go with the conky's smile.

Looks good however I have to say, that despite the heavenly body that is NOT an astronomy wallpaper!
(obviously my wife is in the kitchen) lol

astronomy huh - try this:
http://crunchbanglinux.org/forums/post/105134/#p105134 <<--- click on the top image!
http://dl.dropbox.com/u/16070765/Other_ … tro.tar.gz
WARNING: heavy on resources when it runs, BUT it only runs once every 24 hours so after that it just sits there.

Offline

#1808 2011-02-10 23:08:56

djyoung4
Member
Registered: 2010-10-14
Posts: 30

Re: My Conky Config

donoterase wrote:

Now to explore the differences above TEXT.  Thank you!

I'm glad it helped you with your strobing effects. I'm sure if it had continued any longer, it would've started giving your seizures. Thanks for the position fix also.

I like your screenshot too by the way! I've also tried to attach a screenshot of my desktop with sundata, and maya calendar running. I've tried to change the time display of the mayan calendar to number display only. Still have a few kinks that needs ironing out.

m138461-1.png

I've got to go through my astronomy wallpaper folder and find a suitable one to go with the conky's smile.

Is that another bug with the Mayan calendar with it saying 2 hours at the 20 hour mark or did you change that


You can't handle the truth...or conky

Offline

#1809 2011-02-11 00:39:25

donoterase
#! Member
From: 32° 20' N, 64° 45' W
Registered: 2011-02-07
Posts: 51

Re: My Conky Config

Is that another bug with the Mayan calendar with it saying 2 hours at the 20 hour mark or did you change that

Yes. One that I created. It's not a bug by MrPeachy's script.I've just gone through and tried to change all the text display over to numbers, but haven't quite figured out how to do it properly yet. the "2" is meant to represent a "20", and i haven't taken the time to sit down and figure out how MrPeachy did the conversion 2text, and then try to do it for numbers. I'll post it up once I have an attempt at it. smile

And Sector11, yes that wallpaper is indeed a "heavenly" body...you give me a good laugh to start off my day....I saw your astrology conky, very nice!

Last edited by donoterase (2011-02-11 00:42:41)


All that there is, is not all that exists

Offline

#1810 2011-02-11 00:54:57

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: My Conky Config

donoterase wrote:

Is that another bug with the Mayan calendar with it saying 2 hours at the 20 hour mark or did you change that

Yes. One that I created. It's not a bug by MrPeachy's script.I've just gone through and tried to change all the text display over to numbers, but haven't quite figured out how to do it properly yet. the "2" is meant to represent a "20", and i haven't taken the time to sit down and figure out how MrPeachy did the conversion 2text, and then try to do it for numbers. I'll post it up once I have an attempt at it. smile

And Sector11, yes that wallpaper is indeed a "heavenly" body...you give me a good laugh to start off my day....I saw your astrology conky, very nice!

the number to text converter takes the numbers and turns them into text... to just use the numbers you dont need to convert anything
the command os.date("%I") for example outputs the hours (12 hour format) as numbers...

so for example there are these lines

sec=tonumber(os.date('%S'))
if sec==1 then second="SECOND"
else second="SECONDS" end
text=number_to_words(sec)
text3=(string.upper(text) .. " " .. second)

the tonumber(os.date('%S')) outputs seconds as a number
so do this instead (take out the function call to change the number to seconds and delete the "second" string

sec=tonumber(os.date('%S'))
if sec==1 then second="SECOND"
else second="SECONDS" end
text=sec)
text3=text

and the display for seconds should be numbers

and if you want to neaten things up...

sec=tonumber(os.date('%S'))
text3=sec

Last edited by mrpeachy (2011-02-11 00:59:12)

Offline

#1811 2011-02-11 01:36:30

donoterase
#! Member
From: 32° 20' N, 64° 45' W
Registered: 2011-02-07
Posts: 51

Re: My Conky Config

Thanks Mr. Peachy for that little fix. I managed to work around the problem going about it my way. The issue I was having was that once it ticked over past 19:00 hours, instead of displaying "20 Hours", it was not displaying the zero.

        elseif texttable[2]=="8" then
        firstdigit="eight"
        elseif texttable[2]=="9" then
        firstdigit="nine"
        elseif texttable[2]=="0" then
        firstdigit=""  <------- line 214
        spacer=""
        end
     end
return ((seconddigit) .. (spacer) .. (firstdigit))
end
--for 3 digit numbers-----------------------------

Where the arrow is, I inserted a 0, which seems to be working fine now.

I just tried using your little fix, and the seconds display as numbers. smile

Last edited by donoterase (2011-02-11 01:49:35)


All that there is, is not all that exists

Offline

#1812 2011-02-11 02:54:56

donoterase
#! Member
From: 32° 20' N, 64° 45' W
Registered: 2011-02-07
Posts: 51

Re: My Conky Config

Every time I clicked on the hide/show desktop button, my sundata conky would also disappear along with all the other windows. I managed to sort out the problem, so if anyone is interested in always keeping conkies on the desktop, this is what I have at the beginning of my script

own_window yes
own_window_type override
own_window_transparent yes
own_window_hints below,skip_taskbar,skip_pager
own_window_title sun-position
own_window_class sun-position

Last edited by donoterase (2011-02-11 06:53:00)


All that there is, is not all that exists

Offline

#1813 2011-02-11 17:49:18

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: My Conky Config

anyone intyerested in my "mayan" calender display here is an updated version that should take care of the mysterious "17" bug...
tN2R3dQ

--yearclock by mrpeachy 2010 version3, fixed 17 bug
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

function circlewriting(cr, text, font, fsize, radi, horiz, verti, tred, tgreen, tblue, talpha, start, finish, var1)
local inum=string.len(text)
range=finish
deg=(finish-start)/(inum-1)
degrads=1*(math.pi/180)
local textcut=string.gsub(text, ".", "%1@@@")
texttable=string.split(textcut, "@@@")
for i = 1,inum do
ival=i
interval=(degrads*(start+(deg*(i-1))))+var1
interval2=degrads*(start+(deg*(i-1)))
txs=0+radi*(math.sin(interval))
tys=0-radi*(math.cos(interval))
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, tred, tgreen, tblue, talpha);
cairo_move_to (cr, txs+horiz, tys+verti);
cairo_rotate (cr, interval2)
cairo_show_text (cr, (texttable[i]))
cairo_rotate (cr, -interval2)
cairo_move_to (cr,0,0)
cairo_set_source_rgba (cr, 0, 0, 0, 0)
cairo_line_to (cr,hx0,hy0)
cairo_stroke (cr)
end
end

function date_to_words()------------------------------------------------------------------------------------------
date=os.date("%d")
datecut=string.gsub(date, ".", "%1|")
datetable=string.split(datecut, "|")
        
        if datetable[1]=="1" then
            datetens=""
            datespacer=""
            if datetable[2]=="0" then
            dateunit="tenth"
            elseif datetable[2]=="1" then
            dateunit="eleventh"
            elseif datetable[2]=="2" then
            dateunit="twelfth"
            elseif datetable[2]=="3" then
            dateunit="thirteenth"
            elseif datetable[2]=="4" then
            dateunit="fourteenth"
            elseif datetable[2]=="5" then
            dateunit="fifteenth"
            elseif datetable[2]=="6" then
            dateunit="sixteenth"
            elseif datetable[2]=="7" then
            fisrtdigit="seventeenth"
            elseif datetable[2]=="8" then
            dateunit="eighteenth"
            elseif datetable[2]=="9" then
            dateunit="nineteenth"
            end
        end 
          
        if datetable[1]=="0" or datetable[1]>"1" then
            datespacer=" "
            if datetable[1]=="2" then
            datetens="twenty"
            elseif datetable[1]=="3" then
            datetens="thirty"
            elseif datetable[1]=="0" then
            datetens=""
            end 
            if datetable[2]=="1" then
            dateunit="first"
            elseif datetable[2]=="2" then
            dateunit="second"
            elseif datetable[2]=="3" then
            dateunit="third"
            elseif datetable[2]=="4" then
            dateunit="fourth"
            elseif datetable[2]=="5" then
            dateunit="fifth"
            elseif datetable[2]=="6" then
            dateunit="sixth"
            elseif datetable[2]=="7" then
            dateunit="seventh"
            elseif datetable[2]=="8" then
            dateunit="eighth"
            elseif datetable[2]=="9" then
            dateunit="nineth"
            elseif datetable[2]=="0" then
            dateunit=""
            datespacer=""
            end
        end
        if datetable[2]=="0" then
            datetens=""
            datespacer=""
            if datetable[1]=="2" then
            dateunit="twentieth"
            elseif datetable[1]=="3" then
            dateunit="thirtieth"
            end
        end    
    return ((datetens) .. (datespacer) .. (dateunit))
end--end of function--------------------------------------------------------------------------------------

function number_to_words(text)
text=tonumber(text)
textlength=tonumber(string.len(text))
textcut=string.gsub(text, ".", "%1|")
texttable=string.split(textcut, "|")
--for NUMBERS from 1 to 999
--for 1 digit number----------
if textlength==1 then
    if tonumber(texttable[1])==1 then
    firstdigit="one"
    elseif tonumber(texttable[1])==2 then
    firstdigit="two"
    elseif tonumber(texttable[1])==3 then
    firstdigit="three"
    elseif tonumber(texttable[1])==4 then
    firstdigit="four"
    elseif tonumber(texttable[1])==5 then
    firstdigit="five"
    elseif tonumber(texttable[1])==6 then
    firstdigit="six"
    elseif tonumber(texttable[1])==7 then
    firstdigit="seven"
    elseif tonumber(texttable[1])==8 then
    firstdigit="eight"
    elseif tonumber(texttable[1])==9 then
    firstdigit="nine"
    elseif tonumber(texttable[1])==0 then
    firstdigit="zero"
    end
return (firstdigit)
end
--for 2 digit number------------------
if textlength==2 then
    if tonumber(texttable[1])==1 then
        seconddigit=""
        spacer=""
        if tonumber(texttable[2])==0 then
        firstdigit="ten"
        elseif tonumber(texttable[2])==1 then
        firstdigit="eleven"
        elseif tonumber(texttable[2])==2 then
        firstdigit="twelve"
        elseif tonumber(texttable[2])==3 then
        firstdigit="thirteen"
        elseif tonumber(texttable[2])==4 then
        firstdigit="fourteen"
        elseif tonumber(texttable[2])==5 then
        firstdigit="fifteen"
        elseif tonumber(texttable[2])==6 then
        firstdigit="sixteen"
        elseif tonumber(texttable[2])==7 then
        fisrtdigit="seventeen"
        elseif tonumber(texttable[2])==8 then
        firstdigit="eighteen"
        elseif tonumber(texttable[2])==9 then
        firstdigit="nineteen"
        end
    end   
    if tonumber(texttable[1])>1 then
        spacer=" "
        if tonumber(texttable[1])==2 then
        seconddigit="twenty"
        elseif tonumber(texttable[1])==3 then
        seconddigit="thirty"
        elseif tonumber(texttable[1])==4 then
        seconddigit="fourty"
        elseif tonumber(texttable[1])==5 then
        seconddigit="fifty"
        elseif tonumber(texttable[1])==6 then
        seconddigit="sixty"
        elseif tonumber(texttable[1])==7 then
        seconddigit="seventy"
        elseif tonumber(texttable[1])==8 then
        seconddigit="eighty"
        elseif tonumber(texttable[1])==9 then
        seconddigit="ninety"
        end
    
        if tonumber(texttable[2])==1 then
        firstdigit="one"
        elseif tonumber(texttable[2])==2 then
        firstdigit="two"
        elseif tonumber(texttable[2])==3 then
        firstdigit="three"
        elseif tonumber(texttable[2])==4 then
        firstdigit="four"
        elseif tonumber(texttable[2])==5 then
        firstdigit="five"
        elseif tonumber(texttable[2])==6 then
        firstdigit="six"
        elseif tonumber(texttable[2])==7 then
        firstdigit="seven"
        elseif tonumber(texttable[2])==8 then
        firstdigit="eight"
        elseif tonumber(texttable[2])==9 then
        firstdigit="nine"
        elseif tonumber(texttable[2])==0 then
        firstdigit=""
        spacer=""
        end
     end
return ((seconddigit) .. (spacer) .. (firstdigit))
end

--for 3 digit numbers-----------------------------
if textlength==3 then
    if tonumber(texttable[2])==0 and tonumber(texttable[3])==0 then space="" end
    if tonumber(texttable[2])>0 or tonumber(texttable[3])>0 then space=" and " end
    if tonumber(texttable[2])==0 and tonumber(texttable[3])>0 then spacer="" end
    
    if tonumber(texttable[1])==1 then
    thirddigit="one hundred"
    elseif tonumber(texttable[1])==2 then
    thirddigit="two hundred"
    elseif tonumber(texttable[1])==3 then
    thirddigit="three hundred"
    elseif tonumber(texttable[1])==4 then
    thirddigit="four hundred"
    elseif tonumber(texttable[1])==5 then
    thirddigit="five hundred"
    elseif tonumber(texttable[1])==6 then
    thirddigit="six hundred"
    elseif tonumber(texttable[1])==7 then
    thirddigit="seven hundred"
    elseif tonumber(texttable[1])==8 then
    thirddigit="eight hundred"
    elseif tonumber(texttable[1])==9 then
    thirddigit="nine hundred"
    end
    if tonumber(texttable[2])==0 or tonumber(texttable[2])>1 then
        if tonumber(texttable[3])==1 then
        firstdigit="one"
        elseif tonumber(texttable[3])==2 then
        firstdigit="two"
        elseif tonumber(texttable[3])==3 then
        firstdigit="three"
        elseif tonumber(texttable[3])==4 then
        firstdigit="four"
        elseif tonumber(texttable[3])==5 then
        firstdigit="five"
        elseif tonumber(texttable[3])==6 then
        firstdigit="six"
        elseif tonumber(texttable[3])==7 then
        firstdigit="seven"
        elseif tonumber(texttable[3])==8 then
        firstdigit="eight"
        elseif tonumber(texttable[3])==9 then
        firstdigit="nine"
        elseif tonumber(texttable[3])==0 then
        firstdigit=""
        spacer=""
        end 
    end
    if tonumber(texttable[2])==1 then
        seconddigit=""
        spacer=""  
        if tonumber(texttable[3])==0 then
        firstdigit="ten"
        elseif tonumber(texttable[3])==1 then
        firstdigit="eleven"
        elseif tonumber(texttable[3])==2 then
        firstdigit="twelve"
        elseif tonumber(texttable[3])==3 then
        firstdigit="thirteen"
        elseif tonumber(texttable[3])==4 then
        firstdigit="fourteen"
        elseif tonumber(texttable[3])==5 then
        firstdigit="fifteen"
        elseif tonumber(texttable[3])==6 then
        firstdigit="sixteen"
        elseif tonumber(texttable[3])==7 then
        firstdigit="seventeen"
        elseif tonumber(texttable[3])==8 then
        firstdigit="eighteen"
        elseif tonumber(texttable[3])==9 then
        firstdigit="nineteen"
        end
    end
    if tonumber(texttable[2])>1 then
        spacer=" "    
        if tonumber(texttable[2])==2 then
        seconddigit="twenty"
        elseif tonumber(texttable[2])==3 then
        seconddigit="thirty"
        elseif tonumber(texttable[2])==4 then
        seconddigit="fourty"
        elseif tonumber(texttable[2])==5 then
        seconddigit="fifty"
        elseif tonumber(texttable[2])==6 then
        seconddigit="sixty"
        elseif tonumber(texttable[2])==7 then
        seconddigit="seventy"
        elseif tonumber(texttable[2])==8 then
        seconddigit="eighty"
        elseif tonumber(texttable[2])==9 then
        seconddigit="ninety"
        elseif tonumber(texttable[2])==0 then
        seconddigit=""
        end
    end
return ((thirddigit) .. (space) .. (seconddigit) .. (spacer) .. (firstdigit))
end
end--of function

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
--##########################################
cairo_set_line_width (cr,1)
hx0=200
hy0=200
radius=40
--############################################
--months of the year---------------------------------------------------------------------------------------------------
mnrad1=radius
mnrad2=mnrad1+10
br1,bg1,bb1,ba1=1,1,1,1
cairo_set_source_rgba (cr,br1,bg1,bb1,ba1)
--draw circles
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
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+10
arc=(2*math.pi/360)*((360/yearsec)*(yrsecs))
mnx1=0+mnrad2*(math.sin(arc))
mny1=0-mnrad2*(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
--######################################################################--
--------------------patch for 17 bug--------------------------------------
year2d=os.date('%y')
if year2d==17 then
text1=((string.upper(os.date('%B'))) .. " TWO THOUSAND AND SEVENTEEN")
else
text1=((string.upper(os.date('%B'))) .. " TWO THOUSAND AND " .. string.upper(number_to_words(year2d)))
end
--######################################################################
--text must be in quotes
text=text1
--font name must be in quotes
font="mono"
fontsize=10
radius=mnrad2+1
positionx=hx0
positiony=hy0
colorred=1
colorgreen=1
colorblue=1
coloralpha=1
--to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees
--eg if you want to go from 270 to 90, then you will input 270 to 450.  Finish has to be greater than start.
start=((360/yearsec)*((yrsecs))+4)
slen2=string.len(text)
finish=start+270
letterposition=0
circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)
--end of months around year-------------------------------------------------------------------------------------------------------------------------------
--##########################################################################################
--days around month----------------------------------------------------------------------
drad1=mnrad3
drad2=drad1+10
br1,bg1,bb1,ba1=1,1,1,1
cairo_set_source_rgba (cr,br1,bg1,bb1,ba1)
--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
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+10
arc=(2*math.pi/360)*((360/monthnumsec)*(daynumsec))
dx1=0+drad2*(math.sin(arc))
dy1=0-drad2*(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
--########################################--
-------------patch for 17 bug---------------
days=os.date("%d")
if days==17 then text1=((string.upper(os.date('%A'))) .. " THE SEVENTEENTH")
else
text1=((string.upper(os.date('%A'))) .. " THE " .. string.upper(date_to_words()))
end
--########################################--
--text must be in quotes
text=text1
--font name must be in quotes
font="mono"
fontsize=10
radius=drad2+1
positionx=hx0
positiony=hy0
colorred=1
colorgreen=1
colorblue=1
coloralpha=1
--to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees
--eg if you want to go from 270 to 90, then you will input 270 to 450.  Finish has to be greater than start.
start=((360/monthnumsec)*(daynumsec)+4)
slen1=string.len(text)
finish=start+(7.5*slen1)
letterposition=0
circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)
--end of days around month-------------------------------------------------------------------------------------------------------
--####################################################################################################################################
--hours around day ---------------------------------------------------------------------------------------------------------------------
hrad1=drad3
hrad2=hrad1+10
br1,bg1,bb1,ba1=1,1,1,1
cairo_set_source_rgba (cr,br1,bg1,bb1,ba1)
--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
hrsec=(tonumber(os.date('%H'))*60*60)+(tonumber(os.date('%M'))*60)+(tonumber(os.date('%S')))
--mns=mn+sc
hrad3=hrad2+10
arc=((2*math.pi/360)*((360/(24*60*60)*hrsec)))
hx1=0+hrad2*(math.sin(arc))
hy1=0-hrad2*(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
--########################################--
-------------patch for 17 bug---------------
if hrnum==17 then text4="SEVENTEEN HOURS"
else
text4=((string.upper(number_to_words(hrnum))) .. " " .. hour)
end
--########################################--
--text must be in quotes
text=text4
--font name must be in quotes
font="mono"
fontsize=10
radius=hrad2+1
positionx=hx0
positiony=hy0
colorred=1
colorgreen=1
colorblue=1
coloralpha=1
--to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees
--eg if you want to go from 270 to 90, then you will input 270 to 450.  Finish has to be greater than start.
start=((360/(24*60*60))*(hrsec)+4)
slen4=string.len(text)
finish=start+(slen4*5)
letterposition=0
circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)
--end of hours around day----------------------------------------------------------------------------------------------------
--##############################################################################################################################
--minutes around hour--------------------------------------------------------------------------------------------------------------
mrad1=hrad3
mrad2=mrad1+10
br1,bg1,bb1,ba1=1,1,1,1
cairo_set_source_rgba (cr,br1,bg1,bb1,ba1)
--draw circles
cairo_arc (cr,hx0,hy0,mrad1,0,2*math.pi)
cairo_stroke (cr)
cairo_arc (cr,hx0,hy0,mrad2,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+mrad1*(math.sin(arc))
my1=0-mrad1*(math.cos(arc))
arc=((2*math.pi/360)*((360/60)*i))
mx2=0+mrad2*(math.sin(arc))
my2=0-mrad2*(math.cos(arc))
cairo_move_to (cr,hx0+mx1,hy0+my1)
cairo_line_to (cr,hx0+mx2,hy0+my2)
cairo_stroke (cr)
end
--indicator
minsec=(tonumber(os.date('%M'))*60)+(tonumber(os.date('%S')))
mrad3=mrad2+10
arc=((2*math.pi/360)*((360/(60*60)*minsec)))
mx1=0+mrad2*(math.sin(arc))
my1=0-mrad2*(math.cos(arc))
arc=(2*math.pi/360)*((360/(60*60))*(minsec)-4)
mx2=0+mrad3*(math.sin(arc))
my2=0-mrad3*(math.cos(arc))
arc=(2*math.pi/360)*((360/(60*60))*(minsec)+4)
mx3=0+mrad3*(math.sin(arc))
my3=0-mrad3*(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
--########################################--
-------------patch for 17 bug---------------
if min==17 then text4="SEVENTEEN MINUTES"
else
text4=((string.upper(number_to_words(min))) .. " " .. minute)
end
--########################################--
text=text4
--font name must be in quotes
font="mono"
fontsize=10
radius=mrad2+1
positionx=hx0
positiony=hy0
colorred=1
colorgreen=1
colorblue=1
coloralpha=1
--to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees
--eg if you want to go from 270 to 90, then you will input 270 to 450.  Finish has to be greater than start.
start=((360/(60*60))*(minsec)+4)
slen4=string.len(text)
finish=start+(slen4*5)
letterposition=0
circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)
--end minutes around hour--------------------------------------------------------------------------------------
--seconds of minute-------------------------------------------------------------------------------------------
srad1=mrad3
srad2=srad1+10
br1,bg1,bb1,ba1=1,1,1,1
cairo_set_source_rgba (cr,br1,bg1,bb1,ba1)
--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
sec=(tonumber(os.date('%S')))
srad3=srad2+10
arc=((2*math.pi/360)*((360/(60)*sec)))
sx1=0+srad2*(math.sin(arc))
sy1=0-srad2*(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)
cairo_arc (cr,hx0,hy0,srad3,0,2*math.pi)
cairo_stroke (cr)
--circlewriting
--circlewriting variable
sec=tonumber(os.date('%S'))
if sec==1 then second="SECOND"
else second="SECONDS" end
--########################################--
-------------patch for 17 bug---------------
if sec==17 then text3="SEVENTEEN SECONDS"
else
text3=(string.upper(number_to_words(sec)) .. " " .. second)
end
--########################################--
--text must be in quotes
text=text3
--font name must be in quotes
font="mono"
fontsize=10
radius=srad2+1
positionx=hx0
positiony=hy0
colorred=1
colorgreen=1
colorblue=1
coloralpha=1
--to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees
--eg if you want to go from 270 to 90, then you will input 270 to 450.  Finish has to be greater than start.
start=((360/60)*((sec))+4)
slen3=string.len(text)
finish=start+(slen3*5)
letterposition=0
circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)
--end seconds of minute-----------------------------------------------------------------------------------------------------------------------------
--end of calendar---------------------------------------------------------------------------------------------------
end--of if updates>5
end--of main function

Last edited by mrpeachy (2011-02-11 18:00:01)

Offline

#1814 2011-02-12 06:21:51

donoterase
#! Member
From: 32° 20' N, 64° 45' W
Registered: 2011-02-07
Posts: 51

Re: My Conky Config

mrpeachy wrote:

anyone intyerested in my "mayan" calender display here is an updated version that should take care of the mysterious "17" bug...

Thanks man. Muchly appreciated...I tried to suss out what was going on in your coding, but I gave up big_smile. Glad you provided fix. Much love.

For anyone who is interested in a slightly modified version of the mayan calendar, where it displays numbers rather than words. E.g. FEBRUARY TWO THOUSAND AND ELEVEN is displayed as FEBRUARY 2011. The same applies for time and date.

I think it can be seen in my screenshot. I've been keeping an eye on it over the past 2 days, and it is displaying everything correctly...unlike the one in my screenshot, which has a little bug.

Mayan Calendar modified

--yearclock by mrpeachy 2010 version3, fixed 17 bug
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

function circlewriting(cr, text, font, fsize, radi, horiz, verti, tred, tgreen, tblue, talpha, start, finish, var1)
local inum=string.len(text)
range=finish
deg=(finish-start)/(inum-1)
degrads=1*(math.pi/180)
local textcut=string.gsub(text, ".", "%1@@@")
texttable=string.split(textcut, "@@@")
for i = 1,inum do
ival=i
interval=(degrads*(start+(deg*(i-1))))+var1
interval2=degrads*(start+(deg*(i-1)))
txs=0+radi*(math.sin(interval))
tys=0-radi*(math.cos(interval))
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, tred, tgreen, tblue, talpha);
cairo_move_to (cr, txs+horiz, tys+verti);
cairo_rotate (cr, interval2)
cairo_show_text (cr, (texttable[i]))
cairo_rotate (cr, -interval2)
cairo_move_to (cr,0,0)
cairo_set_source_rgba (cr, 0, 0, 0, 0)
cairo_line_to (cr,hx0,hy0)
cairo_stroke (cr)
end
end

function date_to_words()------------------------------------------------------------------------------------------
date=os.date("%d")
datecut=string.gsub(date, ".", "%1|")
datetable=string.split(datecut, "|")
        
        if datetable[1]=="1" then
            datetens=""
            datespacer=""
            if datetable[2]=="0" then
            dateunit="10th"
            elseif datetable[2]=="1" then
            dateunit="11th"
            elseif datetable[2]=="2" then
            dateunit="12th"
            elseif datetable[2]=="3" then
            dateunit="13th"
            elseif datetable[2]=="4" then
            dateunit="14th"
            elseif datetable[2]=="5" then
            dateunit="15th"
            elseif datetable[2]=="6" then
            dateunit="16th"
            elseif datetable[2]=="7" then
            fisrtdigit="17th"
            elseif datetable[2]=="8" then
            dateunit="18th"
            elseif datetable[2]=="9" then
            dateunit="19th"
            end
        end 
          
        if datetable[1]=="0" or datetable[1]>"1" then
            datespacer=" "
            if datetable[1]=="2" then
            datetens="20"
            elseif datetable[1]=="3" then
            datetens="30"
            elseif datetable[1]=="0" then
            datetens=""
            end 
            if datetable[2]=="1" then
            dateunit="1st"
            elseif datetable[2]=="2" then
            dateunit="2nd"
            elseif datetable[2]=="3" then
            dateunit="3rd"
            elseif datetable[2]=="4" then
            dateunit="4th"
            elseif datetable[2]=="5" then
            dateunit="5th"
            elseif datetable[2]=="6" then
            dateunit="6th"
            elseif datetable[2]=="7" then
            dateunit="7th"
            elseif datetable[2]=="8" then
            dateunit="8th"
            elseif datetable[2]=="9" then
            dateunit="9th"
            elseif datetable[2]=="0" then
            dateunit=""
            datespacer=""
            end
        end
        if datetable[2]=="0" then
            datetens=""
            datespacer=""
            if datetable[1]=="2" then
            dateunit="twentieth"
            elseif datetable[1]=="3" then
            dateunit="thirtieth"
            end
        end    
    return ((datetens) .. (datespacer) .. (dateunit))
end--end of function--------------------------------------------------------------------------------------

function number_to_words(text)
textlength=string.len(text)
textcut=string.gsub(text, ".", "%1|")
texttable=string.split(textcut, "|")
--for NUMBERS from 1 to 999
--for numbers 1 digit number----------
if textlength==1 then
    if texttable[1]=="1" then
    firstdigit="1"
    elseif texttable[1]=="2" then
    firstdigit="2"
    elseif texttable[1]=="3" then
    firstdigit="3"
    elseif texttable[1]=="4" then
    firstdigit="4"
    elseif texttable[1]=="5" then
    firstdigit="5"
    elseif texttable[1]=="6" then
    firstdigit="6"
    elseif texttable[1]=="7" then
    firstdigit="7"
    elseif texttable[1]=="8" then
    firstdigit="8"
    elseif texttable[1]=="9" then
    firstdigit="9"
    elseif texttable[1]=="0" then
    firstdigit="0"
    end
return firstdigit
end
--for 2 digit number------------------
if textlength==2 then
    if texttable[1]=="1" then
        seconddigit=""
        spacer=""
        if texttable[2]=="0" then
        firstdigit="10"
        elseif texttable[2]=="1" then
        firstdigit="11"
        elseif texttable[2]=="2" then
        firstdigit="12"
        elseif texttable[2]=="3" then
        firstdigit="13"
        elseif texttable[2]=="4" then
        firstdigit="14"
        elseif texttable[2]=="5" then
        firstdigit="15"
        elseif texttable[2]=="6" then
        firstdigit="16"
        elseif texttable[2]=="7" then
        fisrtdigit="17"
        elseif texttable[2]=="8" then
        firstdigit="18"
        elseif texttable[2]=="9" then
        firstdigit="19"
        end
    end   
    if texttable[1]>"1" then
        spacer=" "
        if texttable[1]=="2" then
        seconddigit="2"
        elseif texttable[1]=="3" then
        seconddigit="3"
        elseif texttable[1]=="4" then
        seconddigit="4"
        elseif texttable[1]=="5" then
        seconddigit="5"
        elseif texttable[1]=="6" then
        seconddigit="6"
        elseif texttable[1]=="7" then
        seconddigit="7"
        elseif texttable[1]=="8" then
        seconddigit="8"
        elseif texttable[1]=="9" then
        seconddigit="9"
        end    
        if texttable[2]=="1" then
        firstdigit="1"
        elseif texttable[2]=="2" then
        firstdigit="2"
        elseif texttable[2]=="3" then
        firstdigit="3"
        elseif texttable[2]=="4" then
        firstdigit="4"
        elseif texttable[2]=="5" then
        firstdigit="5"
        elseif texttable[2]=="6" then
        firstdigit="6"
        elseif texttable[2]=="7" then
        firstdigit="7"
        elseif texttable[2]=="8" then
        firstdigit="8"
        elseif texttable[2]=="9" then
        firstdigit="9"
        elseif texttable[2]=="0" then
        firstdigit="0"
        spacer=""
        end
     end
return ((seconddigit) .. (spacer) .. (firstdigit))
end
--for 3 digit numbers-----------------------------
if textlength==3 then
    if texttable[2]=="0" and texttable[3]=="0" then space="" end
    if texttable[2]>"0" or texttable[3]>"0" then space=" and " end
    if texttable[2]=="0" and texttable[3]>"0" then spacer="" end
    
    if texttable[1]=="1" then
    thirddigit="one hundred"
    elseif texttable[1]=="2" then
    thirddigit="two hundred"
    elseif texttable[1]=="3" then
    thirddigit="three hundred"
    elseif texttable[1]=="4" then
    thirddigit="four hundred"
    elseif texttable[1]=="5" then
    thirddigit="five hundred"
    elseif texttable[1]=="6" then
    thirddigit="six hundred"
    elseif texttable[1]=="7" then
    thirddigit="seven hundred"
    elseif texttable[1]=="8" then
    thirddigit="eight hundred"
    elseif texttable[1]=="9" then
    thirddigit="nine hundred"
    end
    if texttable[2]=="0" or texttable[2]>"1" then
        if texttable[3]=="1" then
        firstdigit="1"
        elseif texttable[3]=="2" then
        firstdigit="2"
        elseif texttable[3]=="3" then
        firstdigit="3"
        elseif texttable[3]=="4" then
        firstdigit="4"
        elseif texttable[3]=="5" then
        firstdigit="5"
        elseif texttable[3]=="6" then
        firstdigit="6"
        elseif texttable[3]=="7" then
        firstdigit="7"
        elseif texttable[3]=="8" then
        firstdigit="8"
        elseif texttable[3]=="9" then
        firstdigit="9"
        elseif texttable[3]=="0" then
        firstdigit="" --#
        spacer=""
        end 
    end
    if texttable[2]=="1" then
        seconddigit=""
        spacer=""  
        if texttable[3]=="0" then
        firstdigit="10"
        elseif texttable[3]=="1" then
        firstdigit="11"
        elseif texttable[3]=="2" then
        firstdigit="12"
        elseif texttable[3]=="3" then
        firstdigit="13"
        elseif texttable[3]=="4" then
        firstdigit="14"
        elseif texttable[3]=="5" then
        firstdigit="15"
        elseif texttable[3]=="6" then
        firstdigit="16"
        elseif texttable[3]=="7" then
        firstdigit="17"
        elseif texttable[3]=="8" then
        firstdigit="18"
        elseif texttable[3]=="9" then
        firstdigit="19"
        end
    end
    if texttable[2] >"1" then
        spacer=" "    
        if texttable[2]=="2" then
        seconddigit="20"
        elseif texttable[2]=="3" then
        seconddigit="30"
        elseif texttable[2]=="4" then
        seconddigit="40"
        elseif texttable[2]=="5" then
        seconddigit="50"
        elseif texttable[2]=="6" then
        seconddigit="60"
        elseif texttable[2]=="7" then
        seconddigit="70"
        elseif texttable[2]=="8" then
        seconddigit="80"
        elseif texttable[2]=="9" then
        seconddigit="90"
        elseif texttable[2]=="0" then
        seconddigit=""
        end
    end
return ((thirddigit) .. (space) .. (seconddigit) .. (spacer) .. (firstdigit))
end
end--of function

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

cairo_set_line_width (cr,1)
hx0=200
hy0=200
radius=40

--months of the year---------------------------------------------------------------------------------------------------
mnrad1=radius
mnrad2=mnrad1+10
br1,bg1,bb1,ba1=1,1,1,1
cairo_set_source_rgba (cr,0,0,0,1)
--draw circles
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
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+10
arc=(2*math.pi/360)*((360/yearsec)*(yrsecs))
mnx1=0+mnrad2*(math.sin(arc))
mny1=0-mnrad2*(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
--circlewriting variable
text1=((string.upper(os.date('%B'))) .. " 20" .. string.upper(number_to_words(os.date('%y'))))
--circlewriting

--######################################################################--
--------------------patch for 17 bug--------------------------------------
year2d=os.date('%y')
if year2d==17 then
text1=((string.upper(os.date('%B'))) .. " 2017")
else
text1=((string.upper(os.date('%B'))) .. " 20" .. string.upper(number_to_words(year2d)))
end
--######################################################################

text=text1
--font name must be in quotes
font="mono"
fontsize=10
radius=mnrad2+1
positionx=hx0
positiony=hy0
colorred=147
colorgreen=24
colorblue=24
coloralpha=1
--to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees
--eg if you want to go from 270 to 90, then you will input 270 to 450.  Finish has to be greater than start.
start=((360/yearsec)*((yrsecs))+4)
slen2=string.len(text)
finish=start+270
letterposition=0
circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)
--end of months around year-------------------------------------------------------------------------------------------------------------------------------

--days around month----------------------------------------------------------------------
drad1=mnrad3
drad2=drad1+10
br1,bg1,bb1,ba1=1,1,1,1
cairo_set_source_rgba (cr,0,0,0,1)
--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
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+10
arc=(2*math.pi/360)*((360/monthnumsec)*(daynumsec))
dx1=0+drad2*(math.sin(arc))
dy1=0-drad2*(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
--circlewriting variable
text1=((string.upper(os.date('%A'))) .. " THE " .. string.upper(date_to_words()))
--text must be in quotes
text=text1
--font name must be in quotes
font="mono"
fontsize=10
radius=drad2+1
positionx=hx0
positiony=hy0
colorred=124
colorgreen=24
colorblue=24
coloralpha=1
--to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees
--eg if you want to go from 270 to 90, then you will input 270 to 450.  Finish has to be greater than start.
start=((360/monthnumsec)*(daynumsec)+4)
slen1=string.len(text)
finish=start+(7.5*slen1)
letterposition=0
circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)
--end of days around month-------------------------------------------------------------------------------------------------------

--hours around day ---------------------------------------------------------------------------------------------------------------------
hrad1=drad3
hrad2=hrad1+10
br1,bg1,bb1,ba1=1,1,1,1
cairo_set_source_rgba (cr,0,0,0,1)
--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
hrsec=(tonumber(os.date('%H'))*60*60)+(tonumber(os.date('%M'))*60)+(tonumber(os.date('%S')))
--mns=mn+sc
hrad3=hrad2+10
arc=((2*math.pi/360)*((360/(24*60*60)*hrsec)))
hx1=0+hrad2*(math.sin(arc))
hy1=0-hrad2*(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

--########################################--
-------------patch for 17 bug---------------
if hrnum==17 then text4="17 HOURS"
else
text4=((string.upper(number_to_words(hrnum))) .. " " .. hour)
end
--########################################--

--text must be in quotes
text=text4
--font name must be in quotes
font="mono"
fontsize=10
radius=hrad2+1
positionx=hx0
positiony=hy0
colorred=157
colorgreen=24
colorblue=24
coloralpha=1
--to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees
--eg if you want to go from 270 to 90, then you will input 270 to 450.  Finish has to be greater than start.
start=((360/(24*60*60))*(hrsec)+4)
slen4=string.len(text)
finish=start+(slen4*5)
letterposition=0
circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)
--end of hours around day----------------------------------------------------------------------------------------------------

--minutes around hour--------------------------------------------------------------------------------------------------------------
mrad1=hrad3
mrad2=mrad1+10
br1,bg1,bb1,ba1=1,1,1,1
cairo_set_source_rgba (cr,0,0,0,1)
--draw circles
cairo_arc (cr,hx0,hy0,mrad1,0,2*math.pi)
cairo_stroke (cr)
cairo_arc (cr,hx0,hy0,mrad2,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+mrad1*(math.sin(arc))
my1=0-mrad1*(math.cos(arc))
arc=((2*math.pi/360)*((360/60)*i))
mx2=0+mrad2*(math.sin(arc))
my2=0-mrad2*(math.cos(arc))
cairo_move_to (cr,hx0+mx1,hy0+my1)
cairo_line_to (cr,hx0+mx2,hy0+my2)
cairo_stroke (cr)
end
--indicator
minsec=(tonumber(os.date('%M'))*60)+(tonumber(os.date('%S')))
mrad3=mrad2+10
arc=((2*math.pi/360)*((360/(60*60)*minsec)))
mx1=0+mrad2*(math.sin(arc))
my1=0-mrad2*(math.cos(arc))
arc=(2*math.pi/360)*((360/(60*60))*(minsec)-4)
mx2=0+mrad3*(math.sin(arc))
my2=0-mrad3*(math.cos(arc))
arc=(2*math.pi/360)*((360/(60*60))*(minsec)+4)
mx3=0+mrad3*(math.sin(arc))
my3=0-mrad3*(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

--########################################--
-------------patch for 17 bug---------------
if min==17 then text4="17 MINUTES"
else
text4=((string.upper(number_to_words(min))) .. " " .. minute)
end
--########################################--

text4=((string.upper(number_to_words(min))) .. " " .. minute)
--text must be in quotes
text=text4
--font name must be in quotes
font="mono"
fontsize=10
radius=mrad2+1
positionx=hx0
positiony=hy0
colorred=1
colorgreen=1
colorblue=1
coloralpha=1
--to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees
--eg if you want to go from 270 to 90, then you will input 270 to 450.  Finish has to be greater than start.
start=((360/(60*60))*(minsec)+4)
slen4=string.len(text)
finish=start+(slen4*5)
letterposition=0
circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)
--end minutes around hour--------------------------------------------------------------------------------------

--seconds of minute-------------------------------------------------------------------------------------------
srad1=mrad3
srad2=srad1+10
br1,bg1,bb1,ba1=1,1,1,1
cairo_set_source_rgba (cr,0,0,0,1)
--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
sec=(tonumber(os.date('%S')))
srad3=srad2+10
arc=((2*math.pi/360)*((360/(60)*sec)))
sx1=0+srad2*(math.sin(arc))
sy1=0-srad2*(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)
cairo_arc (cr,hx0,hy0,srad3,0,2*math.pi)
cairo_stroke (cr)
--circlewriting
--circlewriting variable
sec=tonumber(os.date('%S'))
if sec==1 then second="SECOND"
else second="SECONDS" end

--########################################--
-------------patch for 17 bug---------------
if sec==17 then text3="17 SECONDS"
else
text3=(string.upper(number_to_words(sec)) .. " " .. second)
end
--########################################--

--text must be in quotes
text=text3
--font name must be in quotes
font="mono"
fontsize=10
radius=srad2+1
positionx=hx0
positiony=hy0
colorred=1
colorgreen=1
colorblue=1
coloralpha=1
--to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees
--eg if you want to go from 270 to 90, then you will input 270 to 450.  Finish has to be greater than start.
start=((360/60)*((sec))+4)
slen3=string.len(text)
finish=start+(slen3*5)
letterposition=0
circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)
--end seconds of minute-----------------------------------------------------------------------------------------------------------------------------
--end of calendar---------------------------------------------------------------------------------------------------
end--of if updates>5
end--of main function

Thanks again MrPeachy!

My sundata script just loaded up, and now it's displaying the N and S. STRANGE! Does anyone else concur?

Last edited by donoterase (2011-02-12 07:21:49)


All that there is, is not all that exists

Offline

#1815 2011-02-12 08:15:50

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: My Conky Config

@ donoterase
you are more than welcome.  I'm glad your enjoying those scripts smile

here is a sneak peek at the sun and moon display
i'm aiming to eliminate the need for the download script and calculate and display the moon position
you can see the moon is the line in purple... its a work in progress but ive made some significant improvements to the mathematics big_smile

tN2U4OQ

Offline

#1816 2011-02-12 09:07:23

donoterase
#! Member
From: 32° 20' N, 64° 45' W
Registered: 2011-02-07
Posts: 51

Re: My Conky Config

mrpeachy wrote:

@ donoterase
you are more than welcome.  I'm glad your enjoying those scripts smile

I love astronomy so they fit perfectly on my desktop. I'm drooling over your work in progress....looks great!

A snapshot of my current desktop.

ss_mayan_calendar_thumb.png

I also found some very nice mayan symbols in png format (Just untar and look for the mayan_symbols folder).
mayan_symbols_ss.png

Download link

Last edited by donoterase (2011-02-12 12:06:22)


All that there is, is not all that exists

Offline

#1817 2011-02-12 19:32:40

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: My Conky Config

mrpeachy wrote:

@ donoterase
you are more than welcome.  I'm glad your enjoying those scripts smile

here is a sneak peek at the sun and moon display
i'm aiming to eliminate the need for the download script and calculate and display the moon position
you can see the moon is the line in purple... its a work in progress but ive made some significant improvements to the mathematics big_smile

tN2U4OQ

W  O  W !!!!!

That's sun and moon isn't it?
One request to add to that. or document on how to remove from that:  The time!
Running the mayan script and or other conkys with time, the time should be an option. (humble opinion)

Need, want a beta tester, one that destroys LUA without even touching the LUA script - pick me.  big_smile

Offline

#1818 2011-02-12 19:35:19

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: My Conky Config

donoterase wrote:
mrpeachy wrote:

@ donoterase
you are more than welcome.  I'm glad your enjoying those scripts smile

I love astronomy so they fit perfectly on my desktop. I'm drooling over your work in progress....looks great!

A snapshot of my current desktop.

NICE! thanks for the .pngs' What do those 19 symbols around the "moon"? represent?

Offline

#1819 2011-02-12 20:38:32

rstrcogburn
CrunchRanger
From: NM - The Land of Enchantment
Registered: 2010-06-12
Posts: 1,947
Website

Re: My Conky Config

Sector11 wrote:
donoterase wrote:
mrpeachy wrote:

@ donoterase
you are more than welcome.  I'm glad your enjoying those scripts smile

I love astronomy so they fit perfectly on my desktop. I'm drooling over your work in progress....looks great!

A snapshot of my current desktop.

NICE! thanks for the .pngs' What do those 19 symbols around the "moon"? represent?

+1 thx


Pack em in snow!

Offline

#1820 2011-02-12 21:33:38

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: My Conky Config

Sector11 wrote:
mrpeachy wrote:

@ donoterase
you are more than welcome.  I'm glad your enjoying those scripts smile

here is a sneak peek at the sun and moon display
i'm aiming to eliminate the need for the download script and calculate and display the moon position
you can see the moon is the line in purple... its a work in progress but ive made some significant improvements to the mathematics big_smile

tN2U4OQ

W  O  W !!!!!

That's sun and moon isn't it?
One request to add to that. or document on how to remove from that:  The time!
Running the mayan script and or other conkys with time, the time should be an option. (humble opinion)

Need, want a beta tester, one that destroys LUA without even touching the LUA script - pick me.  big_smile

The moon is still acting up a little smile ... but i think i can successfully plot it (it's considerably harder to calculate the moon accurately, so my numbers will be a little less accurate for the moon.  Sun numbers are behaving themselves however)

I don't see  why I couldn't make the various displays optional smile
It took a little while to get back into understanding what was what in the script, but when I did I identified some problems and fixed them, and redid some of my equations

if anyone is interested in the numbers here are some of the sites I found most useful
this is how i am checking my numbers...
http://www.jgiesen.de/SME/

this, on the same site has some calculations
http://www.jgiesen.de/elevazmoon/basics/index.htm

and this from that site too
http://www.jgiesen.de/SiderealTimeClock/index.html

this was helpful with some equations
http://pvcdrom.pveducation.org/SUNLIGHT/SUNPOS.HTM

and i can forget to mention the navy big_smile
http://www.usno.navy.mil/USNO/astronomi … ion-center

Last edited by mrpeachy (2011-02-12 21:43:31)

Offline

#1821 2011-02-12 22:18:33

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: My Conky Config

mrpeachy wrote:

The moon is still acting up a little smile ... but i think i can successfully plot it (it's considerably harder to calculate the moon accurately, so my numbers will be a little less accurate for the moon.  Sun numbers are behaving themselves however)

I don't see  why I couldn't make the various displays optional smile
It took a little while to get back into understanding what was what in the script, but when I did I identified some problems and fixed them, and redid some of my equations

Ho ho!  Thanks for the links - bookmarked and waiting with bated breath for the new one  smile

Offline

#1822 2011-02-13 02:08:13

donoterase
#! Member
From: 32° 20' N, 64° 45' W
Registered: 2011-02-07
Posts: 51

Re: My Conky Config

I've no idea what the symbols around mayan calendar mean...I'm no longer using it...didn't find it to appealing. Looking forward to your new script MrPeachy!

@ Sector11, if you want to remove the time, just comment out or delete the relevant code in the lua script. Roughly around line 306 of script.

cairo_move_to (cr, across-100, down-radius-40)
cairo_show_text (cr, "Time " .. addzero10(hrs) .. ":" .. min)

All that there is, is not all that exists

Offline

#1823 2011-02-13 19:18:11

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: My Conky Config

getting closer
VHUqWl.jpg

i have work out how to calculate sun rise and set and moonrise and set

Last edited by mrpeachy (2011-02-13 19:18:40)

Offline

#1824 2011-02-13 23:26:20

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 13,408
Website

Re: My Conky Config

mrpeachy wrote:

getting closer

AWESOME - STUNNING - WONDERFUL!!!

Well that nice wallpaper come with it?

Offline

Be excellent to each other!

#1825 2011-02-14 02:37:11

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: My Conky Config

Sector11 wrote:
mrpeachy wrote:

getting closer

AWESOME - STUNNING - WONDERFUL!!!

Well that nice wallpaper come with it?

why thank you very much big_smile
it looks like my math is holding up quite nicely
69ftNl.jpg

now i have the task of extricating the downloaded info from wunderground from the script... although as i mentioned, i believe i now have to convert back from sidereal time to regular time to find my rise and set times ... a task im not looking forward too that much smile

im glad i re-visited the script!  thanks to you and donoterase for the motivation

oh and the wallpaper is of my own creation also smile

Last edited by mrpeachy (2011-02-14 02:38:35)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo