You are not logged in.
@mrpeachy
if you would like to use more features (format text etc) then you could use my tool 'bazinga.lua':
lua_load ~/yourpathtoyour/weatherscript.lua
lua_draw_hook_pre weather
lua_load ~/yourpathtoyour/template.lua
lua_load ~/pathto/bazinga.lua
this are the features that you could use: http://postimg.org/image/lof0c2oe9/
my tool 'overwrites' your functions (if you use it). but if you do not use it then you can use the built-in functions.
btw: where can i find this template: http://postimg.org/image/yp0g7dgmd/
Offline
Sector11 wrote:Any idea why?
thats because i changed weather to conditions
i told you to read the fine print ]:Dit was bugging me so i changed it, makes more sense this way i think.
It looks like things are indeed running smoothly
no new bugs reported for a while, we shall see but im optimistic that wun has reached its first fully stable stage!
Now.weather does make sense... back to the fine print. {my oops!}
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
it was just that to get conditions before it was
hour[1].conditions
day[1].conditions
now.weather
main archive in first post is now the latest archive
it appears to be problem free and includes some new features
Offline
it was just that to get conditions before it was
hour[1].conditions
day[1].conditions
now.weather
main archive in first post is now the latest archive
it appears to be problem free and includes some new features
I couldn't understand why it wasn't working here ... the readme & wun.lua both had now.weather, but in my template it choked on it but accepted now.conditions.
Anyway it's working now ... I'll grab the new one too.
Here's a free sample - a vertical template under construction (370 wide):
I'm having some setbacks with "repeats" ... and I'd like to have Day: Fri 17 Jan (text) start equal with the Fri 17 Jan forecast section ... I'll get it.
The "Developer Mode" is saving my bacon here!!!!
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
mrpeachy wrote:it was just that to get conditions before it was
hour[1].conditions
day[1].conditions
now.weather
main archive in first post is now the latest archive
it appears to be problem free and includes some new featuresI couldn't understand why it wasn't working here ... the readme & wun.lua both had now.weather, but in my template it choked on it but accepted now.conditions.
Anyway it's working now ... I'll grab the new one too.
Here's a free sample - a vertical template under construction (370 wide):
http://s20.postimg.org/tqc4cv2bt/2014_01_16_16_19_34_912x912_Sector11.jpgI'm having some setbacks with "repeats" ... and I'd like to have Day: Fri 17 Jan (text) start equal with the Fri 17 Jan forecast section ... I'll get it.
The "Developer Mode" is saving my bacon here!!!!
That is looking really good
for the repeats are you trying 2 different repeat loops?
one for the forecast numbers and one for the forecast text?
if so it might be easier to make it with everything in one loop
is there anything in particular that needs to be better explained about loops, or anything that could make it easier?
it is undoubtedly the most difficult part of setting up a template
but once you get it set up, it can seriously reduce the amount of text in a template, and make editing and positioning easier
Offline
That is looking really good
for the repeats are you trying 2 different repeat loops?
one for the forecast numbers and one for the forecast text?
EDIT: Currently using two loops ... sorry ... but they are "butchered" from the originals.
I even have one that uses:
gap=15
typos=15
-- today -- day 1 = [1]
out({x=190,c=0xFFD700,y=typos,txt="Day:"})
-- out({x=125,c=0x87CEFA,fs=16,y=typos,txt=text_forecast[1].title})
out({x=230,c=0x87CEFA,y=typos,txt=day[1].weekday_short.." "..day[1].day_pad.." "..day[1].monthname_short})
typos=typos+gap
wrapy=out({wrap_len=20,wrap_gap=15,x=190,y=typos,txt=text_forecast[1].fctext_metric})
I created that for the "t"ext section ... then I realized: typos.
YUP, that's me!
Thank you ... I've stopped all trying to play with "repeats/loops" in favour of getting an "edited repeat" and "hard code" template together to have an idea of exactly what I want it to look like when done.
The problem is while the "forecast" section is "fixed" in height, the "text" section is a "variable height" depending on text output.
I'm thinking the same way the "days", not the text section, of the moon info is done. Or like the forecast section, each "day text, night text" with have a "local row_height" to work in that will match the "forecast section".
Finish this then I'll do that. Maybe it backwards but I started this way I may as well finish it.
Then I'll make a copy of the template to "play" with loops/repeats ... HowTo on the left - template on the right.
Last edited by Sector11 (2014-01-16 20:46:04)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
ive just re-written the repeats how to for WUN
Offline
Finally satisfied with the bg and buttons..
red or blue. I will make it so that switching between the two will be a one liner.
Now to sort (clean up) out the script and finish the icons.
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
@falldown ... *waiting patiently for the finished result*
Offline
ive just re-written the repeats how to for WUN
![]()
I am definitely going to benefit from that.
--- Just gave it a look see ... OH YEA! I want to 'digest' that!!!
I must be the only one having problems with the 'static' script
Finally satisfied with the bg and buttons..
SEXY! ... well maybe not 'sexy' but you know what I mean.
---------------------------
And here I though I was finished ... all day in Developer Mode to create a static vertical edge conky:
Kill the conky, change developer_mode=1, to developer_mode=0, and restart the conky...
So when the sound waves get there and you think: Someone is cussin' a blue streak! You'll know!
Back to the drawing board!
Last edited by Sector11 (2014-01-17 00:04:59)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Kill the conky, change developer_mode=1, to developer_mode=0, and restart the conky...
http://s20.postimg.org/ohlosq9ah/2014_01_16_20_42_00_362x932_Sector11.jpgBack to the drawing board!
can you post the code you had developed?
i would like to run it and see what happened
that happens to me all the time!
because while you are running the script the variables are "circulating"
so a variable can still be present even if you have deleted it from the template
so if somewhere further down from the deletion still needs that variable the script still works
so you think everything is fine
but when you kill and restart that variable is not generated and the part that needs it breaks with errors!
Last edited by mrpeachy (2014-01-17 00:23:37)
Offline
but when you kill and restart that variable is not generated and the part that needs it breaks with errors!
Which is exactly what I did - all day long - it's one of the reasons why it took so long to do:
conky -c /media/5/Conky/wun-v1/wunrc &
to start it ... edited something (or two) and retracted it if I got an "0ops!"
- even if it worked I did:
pkill -xf "conky -c /media/5/Conky/wun-v1/wunrc" &
{pause 2 - 3}
conky -c /media/5/Conky/wun-v1/wunrc &
to make sure!
I had 7 or 8 'Untitled' files open in medit when I finished - different snippets that seemed to/should work but caused oops!.
ran
pkill -xf "conky -c /media/5/Conky/wun-v1/wunrc" &
{pause 2 - 3}
conky -c /media/5/Conky/wun-v1/wunrc &
a few times when complete to make sure ...
OK everything worked ... changed from developer to live mode: OOPS!
My template:
--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION-
_G.weather_script = function(update,time,now,text_forecast,day,hour)--#### DO NOT EDIT THIS LINE ##############
--#######################################################################
--these tables hold the coordinates for each repeat do not edit #########
top_left_xcoordinate={}--################################################
top_left_ycoordinate={}--################################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="Monofur" -- font must be in quotes
default_font_size=14 -- NO QUOTES
default_face="normal" -- in quotes
default_color=0xffffff -- white
default_alpha=1 -- fully opaque
default_image_width=50
default_image_height=50
--END OF DEFAULTS #######################################################
--#########################################################################
--Top line gives info on last update time and weather station location
--out({a=1,c=0x00BFFF,fs=14,x=15,y=15,txt="dots here"})
-- CURRENT IMAGES
-- WEATHER
image({x=130,y=00,h=50,w=50,file=now.weather_icon})
-- image({x=130,y=00,h=50,w=50,file="/media/5/Conky/wun-v1/additional_files/red+x.png"})
-- WIND
image({x=90,y=10,h=30,w=30,file=now.wind_icon})
-- image({x=140,y=60,h=30,w=30,file="/media/5/Conky/wun-v1/additional_files/red+x.png"})
-- MOON ICON
draw_moon({day=1,size=25,x=105,y=25,moon_icon=1,a=0.9})
-- CURRENT DATA SECTION
gap=16
ypos=15+gap -- x = l|r y = u|d
out({a=1,x=15,fs=16,y=ypos,txt=" "..now.temp_metric..now.temp_metric_unit})
ypos=ypos+gap
out({a=1,c=0xFFD700,fs=16,x=15,y=ypos,txt="± "..now.feelslike_metric..now.feelslike_metric_unit})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="BP: "..now.pressure_metric..now.pressure_metric_unit.." T: "..now.pressure_trend})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="Gusts "..now.wind_gust_metric..now.wind_gust_metric_unit})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="UVI: "..now.uvi.." "..now.uvi_text})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="Wind "..now.wind_metric..now.wind_metric_unit})
out({a=1,x=125,y=ypos,txt=now.wind_degrees.."°"})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="Rain ± Hour "..now.precip_1hr_imperial..now.precip_1hr_metric_unit})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="Sun R|S"})
out({a=1,c=0xFFEF9B,x=80,y=ypos,txt=day[1].sunrise})
out({a=1,c=0x778899,x=130,y=ypos,txt=day[1].sunset})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="Transit "..day[1].sun_transit})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="Moon R"})
out({a=1,c=0xFFEF9B,x=80,y=ypos,txt=day[1].moonrise[1].." "..day[1].moonrise[2]})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="Moon S"})
out({a=1,c=0x778899,x=80,y=ypos,txt=day[1].moonset[1].." "..day[1].moonset[2]})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="Transit "..day[1].moon_transit[1]})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="Visible "..day[1].moon_visible.." %"})
--TEXT FORECAST SECTION
gap=15
typos=15
-- today -- day 1 = [1]
out({x=190,c=0xFFD700,y=typos,txt="Day:"})
out({x=230,c=0x87CEFA,y=typos,txt=day[1].weekday_short.." "..day[1].day_pad.." "..day[1].monthname_short})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[1].fctext_metric})
-- tonight -- day 1 = [2]
typos=typos+gap+wrapy
out({x=190,c=0x87CEFA,y=typos,txt=text_forecast[2].title})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[2].fctext_metric})
-- tomorrow -- day 2 = [3]
typos=typos+gap+wrapy
out({x=190,c=0xFFD700,y=typos,txt="Day:"})
out({x=230,c=0x87CEFA,y=typos,txt=day[2].weekday_short.." "..day[2].day_pad.." "..day[2].monthname_short})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[3].fctext_metric})
-- tomorrow night - day 2 = [4]
typos=typos+gap+wrapy
out({x=190,c=0x87CEFA,y=typos,txt=text_forecast[4].title})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[4].fctext_metric})
-- day 3 = [5]
typos=typos+gap+wrapy
out({x=190,c=0xFFD700,y=typos,txt="Day:"})
out({x=230,c=0x87CEFA,y=typos,txt=day[3].weekday_short.." "..day[3].day_pad.." "..day[3].monthname_short})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[5].fctext_metric})
-- day 3 = [6]
typos=typos+gap+wrapy
out({x=190,c=0x87CEFA,y=typos,txt=text_forecast[6].title})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[6].fctext_metric})
-- day 4 = [7]
typos=typos+gap+wrapy
out({x=190,c=0xFFD700,y=typos,txt="Day:"})
out({x=230,c=0x87CEFA,y=typos,txt=day[4].weekday_short.." "..day[4].day_pad.." "..day[4].monthname_short})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[7].fctext_metric})
-- day 4 = [8]
typos=typos+gap+wrapy
out({x=190,c=0x87CEFA,y=typos,txt=text_forecast[8].title})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[8].fctext_metric})
--FORECAST REPEAT SECTION
ypos=ypos+gap*2
--set colum width
local column_width=340
--set row height
local row_height=210
--set coordinates first row at y=370
--row 1, column 1
top_left_xcoordinate[1]=(0*column_width)
top_left_ycoordinate[1]=ypos
--row 2, column 1
top_left_xcoordinate[2]=(0*column_width)
top_left_ycoordinate[2]=ypos+(row_height*1)
--row 3, column 1
top_left_xcoordinate[3]=(0*column_width)
top_left_ycoordinate[3]=ypos+(row_height*2)
--row 4, column 1
top_left_xcoordinate[4]=(0*column_width)
top_left_ycoordinate[4]=ypos+(row_height*3)
--start_number, when used to show days, hours or day, this is the first instance that you want shown
--for example start_number=3 would show day 3 or hour 3
local start_number=2
--set total forecast days you want to display
--end number is the last instance you want to see
--eg with end_number=6 day 6 or hour 6 would be the last seen
local end_number=4
--########################################################################################
for i=start_number,end_number do --start of day repeat, do not edit ######################
tlx=top_left_xcoordinate[i-(start_number-1)] --sets top left x position for each repeat ##
tly=top_left_ycoordinate[i-(start_number-1)] --sets top left y position for each repeat ##
--########################################################################################
--WRITE REPEAT CODE HERE ### use i in the square brackets within the loop [i] ############
out({a=1,c=0xFFD700,fs=14,x=tlx+15,y=tly,txt=day[i].weekday_short.." "..day[i].day_pad.." "..day[i].monthname_short})
out({a=1,c=0xFFA07A,x=tlx+15,y=tly+gap,txt="H "..day[i].high_metric..day[i].high_metric_unit})
out({a=1,c=0x00BFFF,x=tlx+15,y=tly+gap*2,txt="L "..day[i].low_metric..day[i].low_metric_unit})
ypos=43
gap=14
out({a=1,x=tlx+15,y=tly+ypos,txt="Rain "..day[i].precipitation.."%"})
ypos=ypos+gap
out({a=1,x=tlx+15,y=tly+ypos,txt="Hum "..day[i].avehumidity.."%"})
ypos=ypos+gap
out({a=1,x=tlx+15,y=tly+ypos,txt="Wnd Avg "..day[i].avewind_metric..day[i].avewind_metric_unit})
ypos=ypos+gap
out({a=1,x=tlx+15,y=tly+ypos,txt="Wnd Max "..day[i].maxwind_metric..day[i].maxwind_metric_unit})
ypos=ypos+gap
out({a=1,x=tlx+15,y=tly+ypos,txt="Sun R|S"})
out({a=1,c=0xFFEF9B,x=71,y=tly+ypos,txt=day[i].sunrise})
out({a=1,c=0x778899,x=115,y=tly+ypos,txt=day[i].sunset})
ypos=ypos+gap
out({a=1,x=tlx+15,y=tly+ypos,txt="Transit "..day[i].sun_transit})
ypos=ypos+gap
out({a=1,x=tlx+15,y=tly+ypos,txt="Moon R"})
out({a=1,c=0xFFEF9B,x=71,y=tly+ypos,txt=day[i].moonrise[1].." "..day[i].moonrise[2]})
ypos=ypos+gap
out({a=1,x=tlx+15,y=tly+ypos,txt="Transit "..day[i].moon_transit[1]})
ypos=ypos+gap
out({a=1,x=tlx+15,y=tly+ypos,txt="Moon S"})
out({a=1,c=0x778899,x=71,y=tly+ypos,txt=day[i].moonset[1].." "..day[i].moonset[2]})
ypos=ypos+gap
out({a=1,x=tlx+15,y=tly+ypos,txt="Visible "..day[i].moon_visible.." %"})
-- IMAGES FOR FORECAST REPEAT SECTION
-- WEATHER IMAGE
image({x=tlx+130,y=tly-10,h=50,w=50,file=day[i].weather_icon})
-- image({x=tlx+130,y=tly-10,h=50,w=50,file="/media/5/Conky/wun-v1/additional_files/red+x.png"})
-- WIND IMAGE
image({x=tlx+140,y=tly+50,h=30,w=30,file=day[i].maxwind_icon})
-- image({x=tlx+140,y=tly+50,h=30,w=30,file="/media/5/Conky/wun-v1/additional_files/red+x.png"})
-- MOON IMAGE
draw_moon({day=i,size=25,x=tlx+105,y=tly+15,moon_icon=1,a=0.9})
--END OF REPEAT CODE######################################################################
end--of loop##############################################################################
--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--########################################################################################
end--of weather_display function do not edit this line ##################
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Offline
@Sector11 - it worked for me, no issues, no need to change anything
![]()
http://s18.postimg.org/jwssrdpf9/Screenshot_from_2014_01_16_19_19_25.jpg
???????? and still not working here.
Your screenshot is missing a wind direction icon at the top.
I see a failed in there as well.
Last edited by Sector11 (2014-01-17 01:41:03)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
im not sure where the wind icon went in that screenshot, but it is showing up
i re-tweaked a little
--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION-
_G.weather_script = function(update,time,now,text_forecast,day,hour)--#### DO NOT EDIT THIS LINE ##############
--#######################################################################
--these tables hold the coordinates for each repeat do not edit #########
top_left_xcoordinate={}--################################################
top_left_ycoordinate={}--################################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="Monofur" -- font must be in quotes
default_font_size=12 -- NO QUOTES
default_face="normal" -- in quotes
default_color=0xffffff -- white
default_alpha=1 -- fully opaque
default_image_width=50
default_image_height=50
--END OF DEFAULTS #######################################################
--#########################################################################
-- CURRENT IMAGES
-- WEATHER
image({x=130,y=00,h=50,w=50,file=now.weather_icon})
-- WIND
image({x=120,y=55,h=40,w=40,file=now.wind_icon})
-- MOON ICON
draw_moon({day=1,size=40,x=95,y=25,moon_icon=1,a=0.9})
-- CURRENT DATA SECTION
gap=16
ypos=30+gap -- x = l|r y = u|d
out({a=1,x=60,hj="r",fs=16,y=ypos,txt=now.temp_metric..now.temp_metric_unit})
ypos=ypos+gap
out({a=1,c=0xFFD700,fs=16,x=60,hj="r",y=ypos,txt="± "..now.feelslike_metric..now.feelslike_metric_unit})
ypos=ypos+gap
out({a=1,x=50,hj="r",y=ypos,txt="UVI:"})
out({a=1,x=60,y=ypos,txt=now.uvi.." "..now.uvi_text})
ypos=ypos+gap
out({a=1,x=50,hj="r",y=ypos,txt="Gusts"})
out({a=1,x=60,y=ypos,txt=now.wind_gust_metric..now.wind_gust_metric_unit})
ypos=ypos+gap
out({a=1,x=50,hj="r",y=ypos,txt="Wind"})
out({a=1,x=60,y=ypos,txt=now.wind_metric..now.wind_metric_unit})
out({a=1,x=120,y=ypos,txt=now.wind_degrees.."°"})
ypos=ypos+gap
out({a=1,x=30,hj="r",y=ypos,txt="BP:"})
out({a=1,x=40,y=ypos,txt=now.pressure_metric..now.pressure_metric_unit})
out({a=1,x=120,hj="r",y=ypos,txt="T:"})
out({a=1,x=130,y=ypos,txt=now.pressure_trend})
ypos=ypos+gap
out({a=1,x=15,y=ypos,txt="Rain ± Hour "..now.precip_1hr_imperial..now.precip_1hr_metric_unit})
ypos=ypos+gap
out({a=1,x=50,hj="r",y=ypos,txt="Sun R|S"})
out({a=1,c=0xFFEF9B,x=60,y=ypos,txt=day[1].sunrise})
out({a=1,c=0x778899,x=110,y=ypos,txt=day[1].sunset})
ypos=ypos+gap
out({a=1,x=50,hj="r",y=ypos,txt="Transit"})
out({a=1,x=60,y=ypos,txt=day[1].sun_transit})
ypos=ypos+gap
out({a=1,x=50,hj="r",y=ypos,txt="Moon R"})
out({a=1,c=0xFFEF9B,x=60,y=ypos,txt=day[1].moonrise[1]})
out({a=1,c=0xFFEF9B,x=110,y=ypos,txt=day[1].moonrise[2]})
ypos=ypos+gap
out({a=1,x=50,hj="r",y=ypos,txt="Moon S"})
out({a=1,c=0x778899,x=60,y=ypos,txt=day[1].moonset[1]})
out({a=1,c=0x778899,x=110,y=ypos,txt=day[1].moonset[2]})
ypos=ypos+gap
out({a=1,x=50,hj="r",y=ypos,txt="Transit"})
out({a=1,x=60,y=ypos,txt=day[1].moon_transit[1]})
ypos=ypos+gap
out({a=1,x=50,hj="r",y=ypos,txt="Visible"})
out({a=1,x=60,y=ypos,txt=day[1].moon_visible.." %"})
--TEXT FORECAST SECTION
gap=15
typos=15
-- today -- day 1 = [1]
out({x=190,c=0xFFD700,y=typos,txt="Day:"})
out({x=230,c=0x87CEFA,y=typos,txt=day[1].weekday_short.." "..day[1].day_pad.." "..day[1].monthname_short})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[1].fctext_metric})
-- tonight -- day 1 = [2]
typos=typos+gap+wrapy
out({x=190,c=0x87CEFA,y=typos,txt=text_forecast[2].title})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[2].fctext_metric})
-- tomorrow -- day 2 = [3]
typos=typos+gap+wrapy
out({x=190,c=0xFFD700,y=typos,txt="Day:"})
out({x=230,c=0x87CEFA,y=typos,txt=day[2].weekday_short.." "..day[2].day_pad.." "..day[2].monthname_short})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[3].fctext_metric})
-- tomorrow night - day 2 = [4]
typos=typos+gap+wrapy
out({x=190,c=0x87CEFA,y=typos,txt=text_forecast[4].title})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[4].fctext_metric})
-- day 3 = [5]
typos=typos+gap+wrapy
out({x=190,c=0xFFD700,y=typos,txt="Day:"})
out({x=230,c=0x87CEFA,y=typos,txt=day[3].weekday_short.." "..day[3].day_pad.." "..day[3].monthname_short})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[5].fctext_metric})
-- day 3 = [6]
typos=typos+gap+wrapy
out({x=190,c=0x87CEFA,y=typos,txt=text_forecast[6].title})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[6].fctext_metric})
-- day 4 = [7]
typos=typos+gap+wrapy
out({x=190,c=0xFFD700,y=typos,txt="Day:"})
out({x=230,c=0x87CEFA,y=typos,txt=day[4].weekday_short.." "..day[4].day_pad.." "..day[4].monthname_short})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[7].fctext_metric})
-- day 4 = [8]
typos=typos+gap+wrapy
out({x=190,c=0x87CEFA,y=typos,txt=text_forecast[8].title})
typos=typos+gap
wrapy=out({wrap_len=22,wrap_gap=15,x=190,y=typos,txt=text_forecast[8].fctext_metric})
--FORECAST REPEAT SECTION
ypos=ypos+gap*2
--set colum width
local column_width=340
--set row height
local row_height=210
--set coordinates first row at y=370
--row 1, column 1
top_left_xcoordinate[1]=(0*column_width)
top_left_ycoordinate[1]=ypos
--row 2, column 1
top_left_xcoordinate[2]=(0*column_width)
top_left_ycoordinate[2]=ypos+(row_height*1)
--row 3, column 1
top_left_xcoordinate[3]=(0*column_width)
top_left_ycoordinate[3]=ypos+(row_height*2)
--row 4, column 1
top_left_xcoordinate[4]=(0*column_width)
top_left_ycoordinate[4]=ypos+(row_height*3)
--start_number, when used to show days, hours or day, this is the first instance that you want shown
--for example start_number=3 would show day 3 or hour 3
local start_number=2
--set total forecast days you want to display
--end number is the last instance you want to see
--eg with end_number=6 day 6 or hour 6 would be the last seen
local end_number=4
--########################################################################################
for i=start_number,end_number do --start of day repeat, do not edit ######################
tlx=top_left_xcoordinate[i-(start_number-1)] --sets top left x position for each repeat ##
tly=top_left_ycoordinate[i-(start_number-1)] --sets top left y position for each repeat ##
--########################################################################################
--WRITE REPEAT CODE HERE ### use i in the square brackets within the loop [i] ############
out({a=1,c=0xFFD700,fs=14,x=tlx+15,y=tly,txt=day[i].weekday_short.." "..day[i].day_pad.." "..day[i].monthname_short})
out({a=1,c=0xFFA07A,x=tlx+15,y=tly+gap,txt="H "..day[i].high_metric..day[i].high_metric_unit})
out({a=1,c=0x00BFFF,x=tlx+15,y=tly+gap*2,txt="L "..day[i].low_metric..day[i].low_metric_unit})
ypos=43
gap=14
out({a=1,x=tlx+45,hj="r",y=tly+ypos,txt="Rain"})
out({a=1,x=tlx+55,hj="l",y=tly+ypos,txt=day[i].precipitation.."%"})
ypos=ypos+gap
out({a=1,x=tlx+45,hj="r",y=tly+ypos,txt="Hum"})
out({a=1,x=tlx+55,hj="l",y=tly+ypos,txt=day[i].avehumidity.."%"})
ypos=ypos+gap
out({a=1,x=tlx+65,hj="r",y=tly+ypos,txt="Wnd Avg"})
out({a=1,x=tlx+75,y=tly+ypos,txt=day[i].avewind_metric..day[i].avewind_metric_unit})
ypos=ypos+gap
out({a=1,x=tlx+65,hj="r",y=tly+ypos,txt="Wnd Max"})
out({a=1,x=tlx+75,y=tly+ypos,txt=day[i].maxwind_metric..day[i].maxwind_metric_unit})
ypos=ypos+gap
out({a=1,x=tlx+65,hj="r",y=tly+ypos,txt="Sun R|S"})
out({a=1,c=0xFFEF9B,x=75,y=tly+ypos,txt=day[i].sunrise})
out({a=1,c=0x778899,x=125,y=tly+ypos,txt=day[i].sunset})
ypos=ypos+gap
out({a=1,x=tlx+65,hj="r",y=tly+ypos,txt="Transit"})
out({a=1,x=tlx+75,y=tly+ypos,txt=day[i].sun_transit})
ypos=ypos+gap
out({a=1,x=tlx+65,hj="r",y=tly+ypos,txt="Moon R"})
out({a=1,c=0xFFEF9B,x=75,y=tly+ypos,txt=day[i].moonrise[1]})
out({a=1,c=0xFFEF9B,x=125,y=tly+ypos,txt=day[i].moonrise[2]})
ypos=ypos+gap
out({a=1,x=tlx+65,hj="r",y=tly+ypos,txt="Transit"})
out({a=1,x=tlx+75,y=tly+ypos,txt=day[i].moon_transit[1]})
ypos=ypos+gap
out({a=1,x=tlx+65,hj="r",y=tly+ypos,txt="Moon S"})
out({a=1,c=0x778899,x=75,y=tly+ypos,txt=day[i].moonset[1]})
out({a=1,c=0x778899,x=125,y=tly+ypos,txt=day[i].moonset[2]})
ypos=ypos+gap
out({a=1,x=tlx+65,hj="r",y=tly+ypos,txt="Visible"})
out({a=1,x=tlx+75,y=tly+ypos,txt=day[i].moon_visible.." %"})
-- IMAGES FOR FORECAST REPEAT SECTION
-- WEATHER IMAGE
image({x=tlx+130,y=tly-10,h=50,w=50,file=day[i].weather_icon})
-- image({x=tlx+130,y=tly-10,h=50,w=50,file="/media/5/Conky/wun-v1/additional_files/red+x.png"})
-- WIND IMAGE
image({x=tlx+130,y=tly+45,h=40,w=40,file=day[i].maxwind_icon})
-- image({x=tlx+140,y=tly+50,h=30,w=30,file="/media/5/Conky/wun-v1/additional_files/red+x.png"})
-- MOON IMAGE
draw_moon({day=i,size=40,x=tlx+105,y=tly+18,moon_icon=1,a=0.9})
--END OF REPEAT CODE######################################################################
end--of loop##############################################################################
--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--########################################################################################
end--of weather_display function do not edit this line ##################
I really appreciate all your time and effort Sector11!
This one is going in the archive on the next update
Last edited by mrpeachy (2014-01-17 02:23:53)
Offline
Offline
From the 01/16/2014 @11:19 am archive.
http://ccs-wtn.com/webimg/iweather_new_tmb.jpg
All configured in iweather.lua thanks to mrpeachy's excellent how to's, documentation and work.
Great!
Would you be willing to share your code and images?
Offline
Absolutely.
The image size I have set in the code is for a 24" monitor at 1920x1080 (your milage may vary).
--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION-
_G.weather_script = function(update,time,now,text_forecast,day,hour)--#### DO NOT EDIT THIS LINE ##############
--[#######################################################################
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="Liberation Sans"--font must be in quotes
default_font_size=11
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
--END OF DEFAULTS #######################################################
--#######################################################################
--START OF BUTTON CODE -- START OF BUTTON CODE -- START OF BUTTON CODE
--########################################################################################
function button_settings()
dh=do_button({blx_on=9,blx_off=9,bly_off=166+240,fs_off={"14"},fs_on={"14"},fxadj_off={10},fxadj_on={15},fyadj_off={-6},fyadj_on={-6},text=1,font_off={"Liberation Sans"},font_on={"Liberation Sans"},txt_on={"DAYS"},txt_off={"HOURS"},fcol_off={0xffffff},fcol_on={0xffffff},dolw_on=2,dolw_off=2,docol_off=0x000000,doal_off=0.50,docol_on=0x000000,doal_on=0.50,dtype_off=3,dfal_on=1.0,dfcol_on=0x0000ff,dfcol_off=0x000000,dfal_off=1.0,btype=1,bname="dayhour",bw_off=70,bh_off=23,draw=1,on_on_on={"current"},on_on_off={"mlh","current"},off_on_off={"mlh","day1","day2","day3","day4","day5","day6","day7","day8","day9","day10"},off_on_on={"day1","day2","day3","day4","day5","day6","day7","day8","day9","day10","mlh"}})
if dh==1 then
hm=do_button({blx_on=296.5,fs_off={"14"},fs_on={"14"},fxadj_off={15},fxadj_on={17},fyadj_off={-6},fyadj_on={-6},text=1,font_off={"Liberation Sans"},font_on={"Liberation Sans"},txt_on={"LESS"},txt_off={"MORE"},fcol_off={0xffffff},fcol_on={0xffffff},dolw_on=2,dolw_off=2,docol_off=0x000000,doal_off=0.50,docol_on=0x000000,doal_on=0.50,dtype_off=3,dfal_on=1.0,dfcol_on=0x0000ff,dfcol_off=0x000000,dfal_off=1.0,btype=1,bname="mlh",blx_off=296.5,bly_off=166+240,bw_off=70,bh_off=23,draw=1})
else
hm=0
end
local b1=do_button({dfcol_on=0x0000ff,dfcol_off=0x000000,btype=1,bname="day1",blx_off=9.5,bly_off=166,bw_off=70,bh_off=23,draw=1, off_on_on={"day2","day3","day4","day5","day6","day7","day8","day9","day10","current"}})
local b2=do_button({dfcol_on=0x0000ff,dfcol_off=0x000000,btype=1,bname="day2",blx_off=81.5,bly_off=166,bw_off=69.5,bh_off=23,draw=1, off_on_on={"day1","day3","day4","day5","day6","day7","day8","day9","day10","current"}})
local b3=do_button({dfcol_on=0x0000ff,dfcol_off=0x000000,btype=1,bname="day3",blx_off=153,bly_off=166,bw_off=70,bh_off=23,draw=1, off_on_on={"day1","day2","day4","day5","day6","day7","day8","day9","day10","current"}})
local b4=do_button({dfcol_on=0x0000ff,dfcol_off=0x000000,btype=1,bname="day4",blx_off=225,bly_off=166,bw_off=69.5,bh_off=23,draw=1, off_on_on={"day1","day2","day3","day5","day6","day7","day8","day9","day10","current"}})
local b5=do_button({dfcol_on=0x0000ff,dfcol_off=0x000000,btype=1,bname="day5",blx_off=296.5,bly_off=166,bw_off=70,bh_off=23,draw=1, off_on_on={"day1","day2","day3","day4","day6","day7","day8","day9","day10","current"}})
local b6=do_button({dfcol_on=0x0000ff,dfcol_off=0x000000,btype=1,bname="day6",blx_off=9.5,bly_off=166+120,bw_off=70,bh_off=23,draw=1, off_on_on={"day1","day2","day3","day4","day5","day7","day8","day9","day10","current"}})
local b7=do_button({dfcol_on=0x0000ff,dfcol_off=0x000000,btype=1,bname="day7",blx_off=81.5,bly_off=166+120,bw_off=69.5,bh_off=23,draw=1, off_on_on={"day1","day2","day3","day4","day5","day6","day8","day9","day10","current"}})
local b8=do_button({dfcol_on=0x0000ff,dfcol_off=0x000000,btype=1,bname="day8",blx_off=153,bly_off=166+120,bw_off=70,bh_off=23,draw=1, off_on_on={"day1","day2","day3","day4","day5","day6","day7","day9","day10","current"}})
local b9=do_button({dfcol_on=0x0000ff,dfcol_off=0x000000,btype=1,bname="day9",blx_off=225,bly_off=166+120,bw_off=69.5,bh_off=23,draw=1, off_on_on={"day1","day2","day3","day4","day5","day6","day7","day8","day10","current"}})
local b10=do_button({dfcol_on=0x0000ff,dfcol_off=0x000000,btype=1,bname="day10",blx_off=296.5,bly_off=166+120,bw_off=70,bh_off=23,draw=1, off_on_on={"day1","day2","day3","day4","day5","day6","day7","day8","day9","current"}})
local bc=do_button({dfcol_on=0x0000ff,dfcol_off=0x000000,st_type=1,btype=1,bname="current",blx_off=264,bly_off=134.5,bw_off=23,bh_off=98,draw=1, off_on_on={"day1","day2","day3","day4","day5","day6","day7","day8","day9","day10"}})
if hm==1 then add=10 elseif hm==0 then add=0 end
if b1==1 and b2==0 and b3==0 and b4==0 and b5==0 and b6==0 and b7==0 and b8==0 and b9==0 and b10==0 and bc==0 then
showday=1+add
elseif b1==0 and b2==1 and b3==0 and b4==0 and b5==0 and b6==0 and b7==0 and b8==0 and b9==0 and b10==0 and bc==0 then
showday=2+add
elseif b1==0 and b2==0 and b3==1 and b4==0 and b5==0 and b6==0 and b7==0 and b8==0 and b9==0 and b10==0 and bc==0 then
showday=3+add
elseif b1==0 and b2==0 and b3==0 and b4==1 and b5==0 and b6==0 and b7==0 and b8==0 and b9==0 and b10==0 and bc==0 then
showday=4+add
elseif b1==0 and b2==0 and b3==0 and b4==0 and b5==1 and b6==0 and b7==0 and b8==0 and b9==0 and b10==0 and bc==0 then
showday=5+add
elseif b1==0 and b2==0 and b3==0 and b4==0 and b5==0 and b6==1 and b7==0 and b8==0 and b9==0 and b10==0 and bc==0 then
showday=6+add
elseif b1==0 and b2==0 and b3==0 and b4==0 and b5==0 and b6==0 and b7==1 and b8==0 and b9==0 and b10==0 and bc==0 then
showday=7+add
elseif b1==0 and b2==0 and b3==0 and b4==0 and b5==0 and b6==0 and b7==0 and b8==1 and b9==0 and b10==0 and bc==0 then
showday=8+add
elseif b1==0 and b2==0 and b3==0 and b4==0 and b5==0 and b6==0 and b7==0 and b8==0 and b9==1 and b10==0 and bc==0 then
showday=9+add
elseif b1==0 and b2==0 and b3==0 and b4==0 and b5==0 and b6==0 and b7==0 and b8==0 and b9==0 and b10==1 and bc==0 then
showday=10+add
elseif b1==0 and b2==0 and b3==0 and b4==0 and b5==0 and b6==0 and b7==0 and b8==0 and b9==0 and b10==0 and bc==1 then
showday=0
elseif b1==0 and b2==0 and b3==0 and b4==0 and b5==0 and b6==0 and b7==0 and b8==0 and b9==0 and b10==0 and bc==0 then
showday=0
end
end--function button_settings
--########################################################################################
--END OF BUTTON CODE ----END OF BUTTON CODE ----END OF BUTTON CODE ---
--#######################################################################
image({x=-7,y=-5,w=390,h=293*(620/421),file="/home/joe/wun/additional_files/iweather_bg.png"})
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
out({a=1,fs=15,x=15,y=25,txt="Conditions For "..now.location_full.." "..now.location_zip})
out({a=1,fs=15,x=295,y=25,txt=os.date("%I:%M %p")})
ct={"C","U","R","R","E","N","T"}
for i=1,7 do
out({hj="c",a=1,fs=14,x=275,y=51+(13*(i-1)),txt=ct[i]})
end
--current window
image({x=300,y=35,h=65,w=65,file=now.weather_icon})
out({a=1,fs=20,x=300,y=125,txt=now.temp_imperial..now.temp_imperial_unit})
--DATA WINDOW
if showday==nil then showday=0 end
if dh==0 and showday>0 then
local sd=tonumber(showday)
out({a=1,fs=14,x=15,y=43,txt=day[sd].weekday.." "..day[sd].monthname.." "..day[sd].day_pad})
out({a=1,fs=18,x=15,y=65,txt=day[sd].conditions})
gap=13
ypos=67+gap
out({a=1,fs=14,x=15,y=ypos,txt="High: "..day[sd].high_imperial..day[sd].high_imperial_unit})
out({a=1,fs=14,x=90,y=ypos,txt="Low: "..day[sd].low_imperial..day[sd].low_imperial_unit})
out({a=1,fs=14,x=165,y=ypos,txt="Hum: "..day[sd].avehumidity.."%"})
ypos=ypos+gap
out({a=1,fs=14,x=15,y=ypos,txt="Rain: "..day[sd].precipitation.."%"})
--out({a=1,fs=12,x=80,y=ypos,txt="QPF: "..day[sd].rain_allday_imperial..day[sd].rain_allday_imperial_unit})
--out({a=1,fs=12,x=150,y=ypos,txt="D/N: "..day[sd].rain_day_imperial..day[sd].rain_day_imperial_unit.." / "..day[sd].rain_night_imperial..day[sd].rain_night_imperial_unit})
--ypos=ypos+gap
--out({a=1,fs=12,x=15,y=ypos,txt="Snow All Day: "..day[sd].snow_allday_imperial..day[sd].snow_allday_imperial_unit})
--out({a=1,fs=12,x=140,y=ypos,txt="D/N: "..day[sd].snow_day_imperial..day[sd].snow_day_imperial_unit.." / "..day[sd].snow_night_imperial..day[sd].snow_night_imperial_unit})
ypos=ypos+gap
out({a=1,fs=14,x=15,y=ypos,txt="Ave Wind: "..day[sd].avewind_imperial..day[sd].avewind_imperial_unit})
--out({a=1,fs=12,x=130,y=ypos,txt=day[sd].avewind_degrees.."°"})
out({a=1,fs=14,x=165,y=ypos,txt=day[sd].avewind_dir})
ypos=ypos+gap
out({a=1,fs=12,x=15,y=ypos,txt="Max Wind: "..day[sd].maxwind_imperial..day[sd].maxwind_imperial_unit})
--out({a=1,fs=12,x=130,y=ypos,txt=day[sd].maxwind_degrees.."°"})
out({a=1,fs=14,x=165,y=ypos,txt=day[sd].maxwind_dir})
--image({x=220,y=ypos-94,h=40,w=40,file=day[sd].avewind_icon})
elseif dh==1 and showday>0 then
local sd=tonumber(showday)
out({a=1,fs=14,x=15,y=43,txt=hour[sd].hour_12..hour[sd].ampm.." "..hour[sd].weekday.." "..hour[sd].monthname.." "..hour[sd].day})
out({a=1,fs=18,x=15,y=65,txt=hour[sd].conditions})
gap=13
ypos=67+gap
out({a=1,fs=12,x=15,y=ypos,txt="Temp: "..hour[sd].temp_imperial..hour[sd].temp_imperial_unit})
out({a=1,fs=12,x=90,y=ypos,txt="Feels Like: "..hour[sd].feelslike_imperial..hour[sd].feelslike_imperial_unit})
ypos=ypos+gap
out({a=1,fs=12,x=15,y=ypos,txt="Dew: "..hour[sd].dewpoint_imperial..hour[sd].dewpoint_imperial_unit})
out({a=1,fs=12,x=90,y=ypos,txt="Chill: "..hour[sd].windchill_imperial..hour[sd].windchill_imperial_unit})
out({a=1,fs=12,x=165,y=ypos,txt="Heat: "..hour[sd].heatindex_imperial..hour[sd].heatindex_imperial_unit})
ypos=ypos+gap
out({a=1,fs=12,x=15,y=ypos,txt="Rain: "..hour[sd].precipitation.."%"})
out({a=1,fs=12,x=90,y=ypos,txt="QPF: "..hour[sd].rain_imperial..hour[sd].rain_imperial_unit})
out({a=1,fs=12,x=165,y=ypos,txt="Snow: "..hour[sd].snow_imperial..hour[sd].snow_imperial_unit})
ypos=ypos+gap
out({a=1,fs=12,x=15,y=ypos,txt="UV: "..hour[sd].uvi.."/"..hour[sd].uvi_text})
out({a=1,fs=12,x=115,y=ypos,txt="Pressure: "..hour[sd].pressure_imperial..hour[sd].pressure_imperial_unit})
ypos=ypos+gap
out({a=1,fs=12,x=15,y=ypos,txt="Wind: "..hour[sd].wind_imperial..hour[sd].wind_imperial_unit})
out({a=1,fs=12,x=115,y=ypos,txt=hour[sd].wind_degrees.."°"})
out({a=1,fs=12,x=165,y=ypos,txt=hour[sd].wind_dir})
--image({x=220,y=ypos-94,h=40,w=40,file=hour[sd].wind_icon})
elseif showday==0 then
out({a=1,fs=12,x=15,y=43,txt=now.observation_time})
out({a=1,fs=18,x=15,y=65,txt=now.conditions})
gap=13
ypos=67+gap
out({a=1,fs=12,x=15,y=ypos,txt="Temp: "..now.temp_imperial..now.temp_imperial_unit})
out({a=1,fs=12,x=165,y=ypos,txt="Feels: "..now.feelslike_imperial..now.feelslike_imperial_unit})
--out({a=1,fs=12,x=165,y=ypos,txt="Hum: "..now.humidity.."%"})
ypos=ypos+gap
--out({a=1,fs=12,x=15,y=ypos,txt="Chill: "..now.windchill_imperial..now.windchill_imperial_unit})
--out({a=1,fs=12,x=100,y=ypos,txt="Heat: "..now.heatindex_imperial..now.heatindex_imperial_unit})
out({a=1,fs=12,x=15,y=ypos,txt="Hum: "..now.humidity.."%"})
out({a=1,fs=12,x=165,y=ypos,txt="Dew: "..now.dewpoint_imperial..now.dewpoint_imperial_unit})
ypos=ypos+gap
out({a=1,fs=12,x=165,y=ypos,txt="Vis: "..now.visibility_imperial..now.visibility_imperial_unit})
out({a=1,fs=12,x=15,y=ypos,txt="Pressure: "..now.pressure_imperial..now.pressure_imperial_unit})
--out({a=1,fs=12,x=210,y=ypos,txt="Trend: "..now.pressure_trend})
ypos=ypos+gap
out({a=1,fs=12,x=15,y=ypos,txt="Wind: "..now.wind_imperial..now.wind_imperial_unit})
--out({a=1,fs=12,x=115,y=ypos,txt=now.wind_degrees.."°"})
out({a=1,fs=12,x=165,y=ypos,txt=now.wind_dir})
ypos=ypos+gap
out({a=1,fs=12,x=15,y=ypos,txt="Gusts: "..now.wind_gust_imperial..now.wind_gust_imperial_unit})
--image({x=220,y=ypos-94,h=40,w=40,file=now.wind_icon})
else
out({a=1,fs=18,x=15,y=50,txt="oops!"})
end
--FORECAST DAY BOXES
--set start forecast day
start_day=1
--set total forecast days you want to display
number_of_days=5
topx=20
py=160
--set coordinates for top lef corners for each repeat
top_left_x_coordinate[1],top_left_y_coordinate[1] =topx ,py
top_left_x_coordinate[2],top_left_y_coordinate[2] =topx+70 ,py
top_left_x_coordinate[3],top_left_y_coordinate[3] =topx+70+71.5 ,py
top_left_x_coordinate[4],top_left_y_coordinate[4] =topx+70+72+71.5 ,py
top_left_x_coordinate[5],top_left_y_coordinate[5] =topx+70+72+71.5+71.5 ,py
top_left_x_coordinate[6],top_left_y_coordinate[6] =topx+70+72+71.5+71.5+71.5 ,py
if dh==0 then
--########################################################################################
for i=start_day,number_of_days do --start of day repeat, do not edit #######
tlx=top_left_x_coordinate[i] --sets top left x position for each repeat ##################
tly=top_left_y_coordinate[i] --sets top left y position for each repeat ##################
--########################################################################################
--top row
out({a=1,fs=12,x=tlx-1,y=tly-1,txt=day[i].weekday_short.." "..day[i].month_pad.."/"..day[i].day_pad})
image({x=tlx,y=tly+10,h=50,w=50,file=day[i].weather_icon})
out({a=1,fs=12,x=tlx-5,y=tly+91,txt=day[i].high_imperial..day[i].high_imperial_unit})
out({a=1,fs=12,x=tlx+30,y=tly+91,txt=day[i].low_imperial..day[i].low_imperial_unit})
out({a=1,fs=14,x=tlx+15,y=tly+73,txt=day[i].precipitation.."%"})
--out({a=1,fs=8,x=tlx+30,y=tly+64,txt=day[i].rain_day_imperial..day[i].rain_day_imperial_unit})
--out({a=1,fs=8,x=tlx+30,y=tly+73,txt=day[i].rain_night_imperial..day[i].rain_night_imperial_unit})
tly=tly+120
--bottom row
out({a=1,fs=12,x=tlx-1,y=tly-1,txt=day[i+5].weekday_short.." "..day[i+5].month_pad.."/"..day[i+5].day_pad})
image({x=tlx,y=tly+10,h=50,w=50,file=day[i+5].weather_icon})
out({a=1,fs=12,x=tlx-5,y=tly+91,txt=day[i+5].high_imperial..day[i+5].high_imperial_unit})
out({a=1,fs=12,x=tlx+30,y=tly+91,txt=day[i+5].low_imperial..day[i+5].low_imperial_unit})
out({a=1,fs=14,x=tlx+15,y=tly+73,txt=day[i+5].precipitation.."%"})
--out({a=1,fs=8,x=tlx+30,y=tly+64,txt=day[i+5].rain_day_imperial..day[i].rain_day_imperial_unit})
--out({a=1,fs=8,x=tlx+30,y=tly+73,txt=day[i+5].rain_night_imperial..day[i].rain_night_imperial_unit})
--########################################################################################
end--of forecast repeat section ##########################################################
elseif dh==1 then
--########################################################################################
for i=start_day,number_of_days do --start of day repeat, do not edit #######
tlx=top_left_x_coordinate[i] --sets top left x position for each repeat ##################
tly=top_left_y_coordinate[i] --sets top left y position for each repeat ##################
--########################################################################################
i=i+add
--top row
out({a=1,fs=11,x=tlx-1,y=tly,txt=hour[i].hour_12..hour[i].ampm.." "..hour[i].month_pad.."/"..hour[i].day_pad})
image({x=tlx,y=tly+10,h=45,w=45,file=hour[i].weather_icon})
--out({a=1,fs=8,x=tlx+30,y=tly+70,txt=hour[i].rain_imperial..hour[i].rain_imperial_unit})
out({a=1,fs=12,x=tlx-5,y=tly+91,txt=hour[i].temp_imperial..hour[i].temp_imperial_unit})
out({a=1,fs=12,x=tlx+30,y=tly+91,txt=hour[i].windchill_imperial..hour[i].windchill_imperial_unit})
out({a=1,fs=14,x=tlx+15,y=tly+73,txt=hour[i].precipitation.."%"})
tly=tly+120
--bottom rowhour[1].rain_imperial
out({a=1,fs=11,x=tlx-1,y=tly,txt=hour[i+5].hour_12..hour[i+5].ampm.." "..hour[i+5].month_pad.."/"..hour[i+5].day_pad})
image({x=tlx,y=tly+10,h=45,w=45,file=hour[i+5].weather_icon})
--out({a=1,fs=8,x=tlx+30,y=tly+70,txt=hour[i+5].rain_imperial..hour[i].rain_imperial_unit})
out({a=1,fs=12,x=tlx-5,y=tly+91,txt=hour[i+5].temp_imperial..hour[i+5].temp_imperial_unit})
out({a=1,fs=12,x=tlx+30,y=tly+91,txt=hour[i+5].windchill_imperial..hour[i+5].windchill_imperial_unit})
out({a=1,fs=14,x=tlx+15,y=tly+73,txt=hour[i+5].precipitation.."%"})
--########################################################################################
end--of forecast repeat section ##########################################################
end--if dh
--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--########################################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################
Last edited by jst_joe (2014-01-17 03:40:57)
A person who has a cat by the tail knows a whole lot more about cats than someone who has just read about them.
Mark Twain
Offline
Looks good Joe!
S11 that template is chalked full of everything.. kinda like a wun smorgasbord!
Peachy and All sorry that this template is taking so long. I will have it ready for y’all soon, but please by no means hold me to that statement.
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
Thanks falldown. :8
I'm nowhere near your level so coming from you that means a lot.
A person who has a cat by the tail knows a whole lot more about cats than someone who has just read about them.
Mark Twain
Offline
i wanted to get in on the glassy look
this is all done in lua using the old gradrec.lua script
it may be the start of something, it may not LOL
Offline
i wanted to get in on the glassy look
![]()
this is all done in lua using the old gradrec.lua scripthttp://s10.postimg.org/62kghmw79/Screenshot_from_2014_01_16_22_24_46.jpg
it may be the start of something, it may not LOL
the old gradrec.lua script?
rut, row!
share please
and all this time with gimp for nothing
A person who has a cat by the tail knows a whole lot more about cats than someone who has just read about them.
Mark Twain
Offline
mrpeachy wrote:i wanted to get in on the glassy look
![]()
this is all done in lua using the old gradrec.lua scripthttp://s10.postimg.org/62kghmw79/Screenshot_from_2014_01_16_22_24_46.jpg
it may be the start of something, it may not LOL
the old gradrec.lua script?
rut, row!
share please![]()
and all this time with gimp for nothing
certainly
here is the script, it has the instructions at the top
https://dl.dropboxusercontent.com/u/190 … lua.tar.gz
this is how i loaded it alongside wun
#######################################################################
# Lua Settings
# Load and run wun weather script -- hook_post
#######################################################################
lua_load ~/wun/wun.lua
lua_draw_hook_post weather
#######################################################################
# Load and second lua -- hook_pre
#######################################################################
lua_load ~/wun/gradrec.lua
lua_draw_hook_pre main
#######################################################################
# Load template
#######################################################################
#lua_load ~/wun/wun_template.lua #600 900
lua_load ~/wun/wun_circle.lua##unfinished
#lua_load ~/wun/s11test.lua #350 900
and this is the code in the weather template that gave me the display
--WEATHER DATA
out({a=1,fs=14,x=30,y=40,txt=os.date("%A").." "..os.date("%B").." "..os.date("%d").." "..os.date("%G")})
out({a=1,fs=18,x=15,y=65,txt=now.conditions})
image({x=200,y=50,h=60,w=60,file=now.weather_icon})
gap=16
ypos=67+gap
out({a=1,fs=12,x=15,y=ypos,txt="Temp: "..now.temp_imperial..now.temp_imperial_unit})
out({a=1,fs=12,x=120,y=ypos,txt="Feels: "..now.feelslike_imperial..now.feelslike_imperial_unit})
ypos=ypos+gap
out({a=1,fs=12,x=15,y=ypos,txt="Hum: "..now.humidity.."%"})
out({a=1,fs=12,x=120,y=ypos,txt="Chill: "..now.windchill_imperial..now.windchill_imperial_unit})
ypos=ypos+gap
out({a=1,fs=12,x=15,y=ypos,txt="Heat: "..now.heatindex_imperial..now.heatindex_imperial_unit})
out({a=1,fs=12,x=120,y=ypos,txt="Dew: "..now.dewpoint_imperial..now.dewpoint_imperial_unit})
ypos=ypos+gap
out({a=1,fs=12,x=15,y=ypos,txt="Vis: "..now.visibility_imperial..now.visibility_imperial_unit})
out({a=1,fs=12,x=120,y=ypos,txt="Pressure: "..now.pressure_imperial..now.pressure_imperial_unit})
ypos=ypos+gap
out({a=1,fs=12,x=120,y=ypos,txt="Trend: "..now.pressure_trend})
ypos=ypos+gap+gap
out({a=1,fs=12,x=15,y=ypos,txt="Wind: "..now.wind_imperial..now.wind_imperial_unit})
out({a=1,fs=12,x=115,y=ypos,txt=now.wind_degrees.."°"})
out({a=1,fs=12,x=165,y=ypos,txt=now.wind_dir})
ypos=ypos+gap
out({a=1,fs=12,x=15,y=ypos,txt="Gusts: "..now.wind_gust_imperial..now.wind_gust_imperial_unit})
image({x=220,y=ypos-40,h=40,w=40,file=now.wind_icon})
--BIG FILLED IN RECTANGLE
tlx,tly=10,20
cra=30
sw=200
sh=150
subtab={
{d="start",x=tlx+cra,y=tly},
{d="rline",x=sw,y=0},
{d="arc_c",q=1,r=cra,degs=90},
{d="rline",x=0,y=sh},
{d="arc_c",q=2,r=cra,degs=90},
{d="rline",x=-sw,y=0},
{d="arc_c",q=3,r=cra,degs=90},
{d="rline",x=0,y=-sh},
{d="arc_c",q=4,r=cra,degs=90},
}
grec({
g=1,
x=tlx,
y=tly,
w=sw+cra+cra,
h=sh+cra+cra,
grad={{c=0xffffff,a=0.1,p=0},{c=0xffffff,a=0.0,p=1}},
lw=1,
sub=1,
db=0,
subtab=subtab})
--HIGHLIGHT TOP RECTANGLE
cra=cra
sw=200
sh=40
subtab={
{d="start",x=tlx+cra,y=tly},
{d="rline",x=sw,y=0},
{d="arc_c",q=1,r=cra,degs=90},
{d="rline",x=0,y=sh},
{d="arc_c",q=2,r=cra,degs=90},
{d="rline",x=-sw,y=0},
{d="arc_c",q=3,r=cra,degs=90},
{d="rline",x=0,y=-sh},
{d="arc_c",q=4,r=cra,degs=90},
}
grec({
g=1,
x=tlx,
y=tly,
w=sw+cra+cra,
h=sh+cra+cra,
grad={{c=0xffffff,a=0.6,p=0},{c=0xffffff,a=0.1,p=1}},
lw=1,
sub=1,
db=0,
subtab=subtab})
--OUTLINE
lt=2--line thickness
tlx,tly=tlx-lt,tly-lt
cra=cra
cra1=cra+lt
sw=200
sh=150
subtab={
{d="start",x=tlx+cra1+50,y=tly},
{d="rline",x=sw-50,y=0},
{d="arc_c",q=1,r=cra1,degs=90},
{d="rline",x=0,y=sh},
{d="arc_c",q=2,r=cra1,degs=90},
{d="rline",x=-sw,y=0},
{d="arc_c",q=3,r=cra1,degs=90},
{d="rline",x=0,y=-sh},
{d="arc_c",q=4,r=cra1,degs=90},
{d="rline",x=50,y=0},
{d="rline",x=0,y=lt},
{d="rline",x=-50,y=0},
{d="arc_a",q=4,r=cra,degs=90},
{d="rline",x=0,y=sh},
{d="arc_a",q=3,r=cra,degs=90},
{d="rline",x=sw,y=0},
{d="arc_a",q=2,r=cra,degs=90},
{d="rline",x=0,y=-sh},
{d="arc_a",q=1,r=cra,degs=90},
{d="rline",x=-150,y=0},
}
grec({
g=1,
x=tlx,
y=tly,
w=sw+cra+cra,
h=sh+cra+cra,
grad={{c=0xffffff,a=1,p=0},{c=0x505050,a=1,p=1}},
lw=1,
sub=1,
db=0,
subtab=subtab})
setting it up this way, if you do it right, means that i can alter the size of the object quite easily by adjusting a couple of variables here and there
Last edited by mrpeachy (2014-01-17 05:03:00)
Offline
^ Thank You Sir
sleep...
um, uh, well...
it's really overrated anyway
A person who has a cat by the tail knows a whole lot more about cats than someone who has just read about them.
Mark Twain
Offline
im not sure where the wind icon went in that screenshot, but it is showing up
i re-tweaked a littleI really appreciate all your time and effort Sector11!
This one is going in the archive on the next update
I see that - looks good -- like a smorgasbord
archive -
Well, I couldn't do what I do if you didn't do what you do ... you build the field, I just mow the grass and mark the lines.
BTW, I missed changing a couple of: /home/'..username..'/wun/ to /media/5/Conky/wun-v1/ that's why it didn't work ... running smooth now.
Opinion: that complete thing would be nice as a variable, not just 'username'. So when it's changed, it's changed everywhere in the script.
@ falldown - interesting description, but it's still got no more and a lot less info than the default static and iweather scripts. It just looks busier because it's all NOW!
There is some heavy duty trimming in the making to make it look similar to my vertical v9000 script - only 5 lines of info for each 'forecast' day.
@ jst_joe - very nice! Must snag that. Thanks
Last edited by Sector11 (2014-01-17 12:15:55)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat