You are not logged in.
Yep
The code I posted is all you need...
I've got the gradrec code at the top of iweather.lua.
Well, having the wun archive kina helps
Last edited by jst_joe (2014-01-18 08:31:05)
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
weather.lua &/or iweather.lua
you can do something like this..--PATH TO FILE ############################################# ptf="/home/username/path/to/file --#########################################################
and use it like so
image({x=10,y=10,w=10,h=10,file=ptf})
This is very useful if you use this location several times.
YES! AWESOME I LOVE IT!!!
working code:
--current window
image({x=295,y=50,h=65,w=65,file=now.weather_icon})
image({x=295,y=50,h=65,w=65,file=ptred})
out({a=1,fs=14,x=290,y=50,txt=now.temp_metric..now.temp_metric_unit})
out({a=1,c=0xFFD700,fs=20,x=305,y=130,txt=now.feelslike_metric..now.feelslike_metric_unit})
--DATA WINDOW
Tweaking in progress ---
so much easier copy/paste, highlight unwanted and type: ptred
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
a classic Sector11 V9000 template adapted to wun
also metric/imperial switchable via find replace
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
-- default_font="CorporateMonoExtraBold"--font must be in quotes
default_font="Monofur"--font must be in quotes
default_font_size=12
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
-- ## New Options ###
default_face="bold"
-- "normal" for normal/normal
-- "bold" for normal/bold
-- "italic" for italic/normal
-- "bolditalic" for italic/bold
-- END OF DEFAULTS ######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
ystart=30
out({c=0x778899,a=1,x=10,y=ystart,txt=update.day_pad.." "..update.monthname_short.." "..update.year.." | @ "..update.hour_12_pad..":"..update.min.." "..update.ampm})
image({x=20,y=ystart+5,h=50,w=50,file=now.weather_icon})
-- Temp / FeelsLike & CONDITIONS TEXT
out({c=0x00BFFF,a=1,f="Zekton",fs=25,face="normal",x=80,y=ystart+40,txt=now.temp_imperial..now.temp_imperial_unit})
out({c=0x00FFFF,a=1,f="Zekton",fs=25,face="normal",x=145,y=ystart+40,txt=now.feelslike_imperial..now.feelslike_imperial_unit})
--out({c=0x00FFFF,a=1,f="WW Digital",fs=25,face="normal",x=140,y=60,txt="-22".."°"})
out({c=0x778899,a=1,x=81,y=ystart+52,txt="Temp WC·HI"})
out({c=0x00BFFF,a=1,f="Zekton",fs=18,x=10,y=ystart+74,txt=now.conditions})
-- data titles
-- data output
datay=110 -- y=datay or
datayy=15 -- y=ystart+(datayy*1) use 1 or more
ystart=ystart+90
out({c=0xDCDCDC,a=1,x=100, y=ystart, txt="Today's High:",hj="r"})
out({c=0xFF8C00,a=1,x=105, y=ystart, txt=day[1].high_imperial..day[1].high_imperial_unit})
out({c=0xDCDCDC,a=1,x=170, y=ystart, txt="Low:",hj="r"})
out({c=0x00BFFF,a=1,x=175, y=ystart, txt=day[1].low_imperial..day[1].low_imperial_unit})
out({c=0xDCDCDC,a=1,x=100, y=ystart+(datayy*1), txt="Wind Chill:",hj="r"})
out({c=0x00BFFF,a=1,x=105, y=ystart+(datayy*1), txt=now.windchill_imperial..now.windchill_imperial_unit})
out({c=0xDCDCDC,a=1,x=100, y=ystart+(datayy*2), txt="Heat Index:",hj="r"})
out({c=0xFF8C00,a=1,x=105, y=ystart+(datayy*2), txt=now.heatindex_imperial..now.heatindex_imperial_unit})
out({c=0xDCDCDC,a=1,x=50, y=ystart+(datayy*3), txt="Wind:",hj="r"})
out({c=0x00BFFF,a=1,x=55, y=ystart+(datayy*3), txt=now.wind_imperial..now.wind_imperial_unit})
out({c=0x00BFFF,a=1,x=110, y=ystart+(datayy*3), txt=now.wind_dir})
out({c=0xDCDCDC,a=1,x=170, y=ystart+(datayy*3), txt="@",hj="r"})
out({c=0x00BFFF,a=1,x=175, y=ystart+(datayy*3), txt=now.wind_degrees})
out({c=0xDCDCDC,a=1,x=50, y=ystart+(datayy*4), txt="Hum:",hj="r"})
out({c=0x00BFFF,a=1,x=55, y=ystart+(datayy*4), txt=now.humidity.."%"})
out({c=0xDCDCDC,a=1,x=150, y=ystart+(datayy*4), txt="DP:",hj="r"})
out({c=0x00BFFF,a=1,x=155, y=ystart+(datayy*4), txt=now.dewpoint_imperial..now.dewpoint_imperial_unit})
out({c=0xDCDCDC,a=1,x=50, y=ystart+(datayy*5), txt="Prs:",hj="r"})
out({c=0x00BFFF,a=1,x=55, y=ystart+(datayy*5), txt=now.pressure_imperial..now.pressure_imperial_unit})
out({c=0xDCDCDC,a=1,x=150, y=ystart+(datayy*5), txt="Vis:",hj="r"})
out({c=0x00BFFF,a=1,x=155, y=ystart+(datayy*5), txt=now.visibility_imperial..now.visibility_imperial_unit})
out({c=0xDCDCDC,a=1,x=50, y=ystart+(datayy*6), txt="Precip:",hj="r"})
out({c=0x00BFFF,a=1,x=55, y=ystart+(datayy*6), txt=hour[1].precipitation.."%"})
out({c=0xDCDCDC,a=1,x=150, y=ystart+(datayy*6), txt="Today:",hj="r"})
out({c=0x00BFFF,a=1,x=155, y=ystart+(datayy*6), txt=day[1].rain_allday_imperial..day[1].rain_allday_imperial_unit})
out({c=0xDCDCDC,a=1,x=100, y=ystart+(datayy*7), txt="Snow Today:",hj="r"})
out({c=0x00BFFF,a=1,x=105, y=ystart+(datayy*7), txt=day[1].snow_day_imperial..day[1].snow_day_imperial_unit})
out({c=0xDCDCDC,a=1,x=50, y=ystart+(datayy*8), txt="UV:",hj="r"})
out({c=0x00BFFF,a=1,x=55, y=ystart+(datayy*8), txt=now.uvi})
out({c=0x00BFFF,a=1,x=100, y=ystart+(datayy*8), txt=now.uvi_text})
out({c=0xDCDCDC,a=1,x=50, y=ystart+(datayy*9), txt="Sun:",hj="r"})
out({c=0xffff00,a=1,x=55, y=ystart+(datayy*9), txt=day[1].sunrise})
out({c=0x00BFFF,a=1,x=120, y=ystart+(datayy*9), txt=day[1].sunset})
out({c=0xDCDCDC,a=1,x=50, y=ystart+(datayy*11), txt="Moon:",hj="r"})
out({c=0xDCDCDC,a=1,x=50, y=ystart+(datayy*12), txt=day[1].moonrise_24_pad,hj="r"})
out({c=0x00BFFF,a=1,x=70, y=ystart+(datayy*12), txt=day[1].moonset_24_pad})
out({c=0xDCDCDC,a=1,x=50, y=ystart+(datayy*13), txt="Visible:",hj="r"})
out({c=0x00BFFF,a=1,x=55, y=ystart+(datayy*13), txt=day[1].moon_visible.."%"})
out({c=0xDCDCDC,a=1,x=50, y=ystart+(datayy*14), txt="Phase:",hj="r"})
out({c=0x00BFFF,a=1,x=55, y=ystart+(datayy*14), txt=day[1].moon_phase})
draw_moon({day=1,size=40,x=150,y=290,moon_icon=1,a=0.9})
-- line
--[image({x=205,y=5,w=1,h=260,file="/media/5/Conky/images/LightSlateGrey_1.png"})
ystart=30
ygap=80
-- 3 hour output
out({c=0x00BFFF,a=1,x=220, y=ystart, txt="Next 3"})
out({c=0x00BFFF,a=1,x=220, y=ystart+15, txt="Hours"})
-- 1st hour
y1=35
out({c=0x778899,x=220, y=ystart+y1, txt=hour[1].hour_12_pad.." "..hour[1].ampm})
image({w=30,h=30,x=223, y=ystart+y1+5, file=hour[1].weather_icon}) -- image({w=30,h=30,x=223,y=55,file="/media/5/Conky/images/red+x.png"})
out({x=228, y=ystart+y1+45, txt=hour[1].temp_imperial ..hour[1].temp_imperial_unit})
-- 2nd hour
y2=y1+ygap
out({c=0x778899,x=220, y=ystart+y2, txt=hour[2].hour_12_pad.." "..hour[2].ampm})
image({w=30,h=30,x=223, y=ystart+y2+5, file=hour[2].weather_icon}) --image({w=30,h=30,x=223,y=130,file="/media/5/Conky/images/red+x.png"})
out({x=228, y=ystart+y2+45, txt=hour[2].temp_imperial ..hour[2].temp_imperial_unit})
-- 3rd hour
y3=y2+ygap
out({c=0x778899,x=220, y=ystart+y3, txt=hour[3].hour_12_pad.." "..hour[3].ampm})
image({w=30,h=30,x=223, y=ystart+y3+5, file=hour[3].weather_icon}) -- image({w=30,h=30,x=223,y=215,file="/media/5/Conky/images/red+x.png"})
out({x=228, y=ystart+y3+45, txt=hour[3].temp_imperial ..hour[3].temp_imperial_unit})
-- line
--image({x=275,y=5,w=1,h=300,file="/media/5/Conky/images/deep_skyblue_1.png"})
--start or weather forecast table section
--set start forecast day
start_day=1
--set total forecast days you want to display
number_of_days=10
topy=30
topyy=135 -- topy+(topyy*1)
topx=285
topxx=430
-- set coordinates for top lef corners for each repeat
-- x = l|r y = u|d
top_left_x_coordinate[1],top_left_y_coordinate[1] =topx,topy
top_left_x_coordinate[2],top_left_y_coordinate[2] =topx,topy+65
top_left_x_coordinate[3],top_left_y_coordinate[3] =topx,topy+(65*2)
top_left_x_coordinate[4],top_left_y_coordinate[4] =topx,topy+(65*3)
top_left_x_coordinate[5],top_left_y_coordinate[5] =topx,topy+(65*4)
-- line
--image({x=420,y=5,w=1,h=300,file="/media/5/Conky/images/deep_skyblue_1.png"})
top_left_x_coordinate[6],top_left_y_coordinate[6] =topxx,topy
top_left_x_coordinate[7],top_left_y_coordinate[7] =topxx,topy+65
top_left_x_coordinate[8],top_left_y_coordinate[8] =topxx,topy+(65*2)
top_left_x_coordinate[9],top_left_y_coordinate[9] =topxx,topy+(65*3)
top_left_x_coordinate[10],top_left_y_coordinate[10] =topxx,topy+(65*4)
--########################################################################################
for i=start_day,number_of_days-(start_day-1) 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 ##################
--########################################################################################
out({c=0x778899,a=1, x=tlx, y=tly, txt=day[i].weekday_short.." "..day[i].day_pad.." "..day[i].monthname_short})
image({ x=tlx, y=tly+5, h=30,w=30,file=day[i].weather_icon})
draw_moon({day=i,size=20, x=tlx+120, y=tly, moon_icon=1,a=0.9})
out({c=0xFF8C00,a=1, x=tlx+35, y=tly+15, txt=day[i].high_imperial..day[i].high_imperial_unit})
out({c=0xDCDCDC,a=1, x=tlx+65, y=tly+15, txt="P "..day[i].precipitation.."%"})
out({c=0x00BFFF,a=1, x=tlx+35, y=tly+30, txt=day[i].low_imperial..day[i].low_imperial_unit})
out({c=0xDCDCDC,a=1, x=tlx+65, y=tly+30, txt="H "..day[i].minhumidity.."%"})
out({c=0x00BFFF,a=1, x=tlx, y=tly+45, txt=day[i].conditions_user})
-- out({c=0xDCDCDC,a=1,x=tlx+50,y=tly+52,txt="UV "..uv_index_num[i]})
--out({c=0xDCDCDC,a=1,x=tlx,y=tly+95,txt="S "..sun_rise_lc[i]})
-- out({c=0x00BFFF,a=1,x=tlx+73,y=tly+95,txt=sun_set_lc[i]})
--out({c=0xDCDCDC,a=1,x=tlx,y=tly+110,txt="M "..moon_rise_lc[i]})
-- out({c=0x00BFFF,a=1,x=tlx+73,y=tly+110,txt=moon_set_lc[i]})
--########################################################################################
end--of forecast repeat section ##########################################################
--########################################################################################
--]]
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################
Offline
a classic Sector11 V9000 template adapted to wun
also metric/imperial switchable via find replace
Eeeeeeeeeeek! Twins - not identical twins ... but twins none the less!
But then they have the same parents: mrpeachy and LUA
I like it ... but then I would ... colour that one "Grabbed"!
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
A little progress today..
current button on..
outlook button on..
I am about 50% done with the weathericons.
Beautiful work S11!!
Last edited by falldown (2014-01-18 22:55:19)
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
^
DROOL. DROOL
Very, Very Nice!
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
A little progress today..
current button on..
http://s15.postimg.org/bfmrm1fp3/Screenshot_from_2014_01_18_14_35_50.jpg
outlook button on..
http://s29.postimg.org/diq749l2b/Screenshot_from_2014_01_18_14_36_17.jpgI am about 50% done with the weathericons.
Beautiful work S11!!
still waiting very ...err... "patiently" ]:D
Offline
A little progress today..
current button on..
http://s15.postimg.org/bfmrm1fp3/Screenshot_from_2014_01_18_14_35_50.jpg
outlook button on..
http://s29.postimg.org/diq749l2b/Screenshot_from_2014_01_18_14_36_17.jpgI am about 50% done with the weathericons.
Beautiful work S11!!
muffunbledt foddffetthhh {click,snap,adjust} Sorry about that, I had to pick my lower jaw up off the floor!
WOW!!!!!!!!!
Thank you - the old v9000 script was/still is good.
Seems like no one is using this any more but I like it:
I was going to show these too, but I messed up the template at the last minute, here's a shot I took in the heat of the day, then went developer mode ...
Been a hot one!
Last edited by Sector11 (2014-01-19 00:48:22)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
still waiting very ...err... "patiently"
]:D
Patience is "GIMME" on Valium!
And what's this 20% cooler? You making fun of me? ]:D
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
^
![]()
DROOL. DROOL
![]()
![]()
Very, Very Nice!
Towel, Sir?
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Thank you - the old v9000 script was/still is good.
Seems like no one is using this any more but I like it:
http://s20.postimg.org/5l4kg2sg9/2014_01_18_21_11_28_1920x1080_Sector11.jpg
im still using that one too! in fact im working on a modification, changing the draw size to give me more space!
mrpeachy wrote:still waiting very ...err... "patiently"
]:D
Patience is "GIMME" on Valium!
![]()
![]()
![]()
And what's this 20% cooler? You making fun of me? ]:D
Ive had the 20% cooler thing for a while, its a quote from Rainbow Dash (2nd best pony ]:D )
Offline
This is the current state of my astronomy display
Also been tinkering with the inner workings of wun.lua
I have mine set up so that it checks which astronomy data you have downloaded
if the data is current it doesnt download again
So in effect it will only download new astronomy data on the first run of the day
this makes wun significantly faster to load and update on all later tries
changes will be made available soon
Last edited by mrpeachy (2014-01-19 04:38:05)
Offline
im still using that one too! in fact im working on a modification, changing the draw size to give me more space!
I tried that, but lost touch with the buttons. Seeing as I'm struggling with LUA & the interactive stuff I figured that's something best left until later. That's how I learned what the: *(620/421) was - at least I ass·u·me that's what it's for - the buttons.
image({x=0,y=0,w=376,h=265*(620/421),file="/home/sector11/wun/additional_files/bg.png"})
... and not sure how to adjust it.
Sector11 wrote:And what's this 20% cooler? You making fun of me? ]:D
Ive had the 20% cooler thing for a while, its a quote from Rainbow Dash (2nd best pony ]:D )
Never noticed it until yesterday as I was wiping sweat from my eyes.
And just now coming back after 13.5 hours ;( ... but at least it's cooler, only 35°
think positive .. think positive .. think positive!
19 Jan 14 | 12:27:30 ~
$ c2f 35
35°C = 95.00°F19 Jan 14 | 12:27:38 ~
$
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
OK this is what I was afraid of:
Now I work on the skinny vertical conky similar to my v9000 script.
Back later.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
OK this is what I was afraid of: http://s20.postimg.org/5vpv4nb7t/2014_01_19_14_21_47_362x932_Sector11.jpg
Now I work on the skinny vertical conky similar to my v9000 script.
Back later.
overrunning text is something buttons could be useful for
count the number of lines returned
by default display so many lines, if there are more lines to see there is a "MORE" button
click the more button and the box extends to see the whole thing, then close it up afterwards
Offline
Sector11 wrote:OK this is what I was afraid of: http://s20.postimg.org/5vpv4nb7t/2014_01_19_14_21_47_362x932_Sector11.jpg
Now I work on the skinny vertical conky similar to my v9000 script.
Back later.
overrunning text is something buttons could be useful for
count the number of lines returned
by default display so many lines, if there are more lines to see there is a "MORE" button
click the more button and the box extends to see the whole thing, then close it up afterwards
True, but this is the static conky. This is more in line to what I wanted to match at the beginning, but got caught up in the text stuff ... I didn't quite get there before ... I'm a lot closer now!
Here's the skinny on the new skinny version:
with test images . . . . . . . . . . cleaned up .
and how it looks in the boot-up script:
minimum_size 150 925 ## w|h
maximum_width 150
wun_v2_template.lua
--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 #######################################################
--PATH TO FILE - a falldown tip #########################################
ptred="/media/5/Conky/images/red+x.png"
--#######################################################################
--#########################################################################
-- CURRENT IMAGES -- x l|r y u|d
-- WEATHER
image({x=100,y=05,h=55,w=55,file=now.weather_icon})
-- image({x=100,y=05,h=55,w=55,file=ptred})
-- MOON ICON
draw_moon({day=1,size=25,x=80,y=47,moon_icon=1,a=0.9})
-- CURRENT DATA SECTION
gap=14
ypos=15+gap -- x l|r y u|d
out({a=1,c=0xFFD700,fs=14,x=10,y=ypos,txt=os.date("%a %d %b")})
ypos=ypos+gap
out({a=1,fs=16,x=10,y=ypos,txt=" "..now.temp_metric..now.temp_metric_unit})
ypos=ypos+gap
out({a=1,c=0xFFD700,fs=16,x=10,y=ypos,txt="± "..now.feelslike_metric..now.feelslike_metric_unit})
ypos=ypos+gap
out({a=1,x=10,y=ypos,txt="BP "..now.pressure_metric..now.pressure_metric_unit.." |"..now.pressure_trend})
ypos=ypos+gap
out({a=1,x=10,y=ypos,txt="Gusts "..now.wind_gust_metric..now.wind_gust_metric_unit})
ypos=ypos+gap
out({a=1,x=10,y=ypos,txt="UVI "..now.uvi.." "..now.uvi_text})
ypos=ypos+gap
out({a=1,x=10,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=10,y=ypos,txt="Rain ± Hour "..now.precip_1hr_imperial..now.precip_1hr_metric_unit})
ypos=ypos+gap
out({a=1,x=10,y=ypos,txt="Sun R|S"})
out({a=1,c=0xFFEF9B,x=65,y=ypos,txt=day[1].sunrise})
out({a=1,c=0x778899,x=115,y=ypos,txt=day[1].sunset})
ypos=ypos+gap
out({a=1,x=10,y=ypos,txt="Transit"})
out({a=1,x=65,y=ypos,txt=day[1].sun_transit})
ypos=ypos+gap
out({a=1,x=10,y=ypos,txt="Moon R"})
out({a=1,c=0xFFEF9B,x=65,y=ypos,txt=day[1].moonrise[1].." "..day[1].moonrise[2]})
ypos=ypos+gap
out({a=1,x=10,y=ypos,txt="Moon S"})
out({a=1,c=0x778899,x=65,y=ypos,txt=day[1].moonset[1].." "..day[1].moonset[2]})
ypos=ypos+gap
out({a=1,x=10,y=ypos,txt="Transit"})
out({a=1,x=65,y=ypos,txt=day[1].moon_transit[1]})
ypos=ypos+gap
out({a=1,x=10,y=ypos,txt="Visible"})
out({a=1,x=65,y=ypos,txt=day[1].moon_visible.." %"})
--FORECAST REPEAT SECTION
ypos=ypos+gap+5
--set colum width
local column_width=340
--set row height
local row_height=080
--set coordinates first row at y=115
--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)
--row 5, column 1
top_left_xcoordinate[5]=(0*column_width)
top_left_ycoordinate[5]=ypos+(row_height*4)
--row 6, column 1
top_left_xcoordinate[6]=(0*column_width)
top_left_ycoordinate[6]=ypos+(row_height*5)
--row 7, column 1
top_left_xcoordinate[7]=(0*column_width)
top_left_ycoordinate[7]=ypos+(row_height*6)
--row 8, column 1
top_left_xcoordinate[8]=(0*column_width)
top_left_ycoordinate[8]=ypos+(row_height*7)
--row 9, column 1
top_left_xcoordinate[9]=(0*column_width)
top_left_ycoordinate[9]=ypos+(row_height*8)
--row 10, column 1
top_left_xcoordinate[10]=(0*column_width)
top_left_ycoordinate[10]=ypos+(row_height*9)
-- 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=10
--########################################################################################
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+10,y=tly,txt=day[i].weekday_short.." "..day[i].day_pad.." "..day[i].monthname_short})
out({a=1,c=0xFFA07A,x=tlx+10,y=tly+gap,txt=""..day[i].high_metric..day[i].high_metric_unit})
out({a=1,c=0x00BFFF,x=tlx+45,y=tly+gap,txt=""..day[i].low_metric..day[i].low_metric_unit})
ypos=32
gap=14
out({a=1,x=tlx+10,y=tly+ypos,txt="Sun R|S"})
out({a=1,c=0xFFEF9B,x=65,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+10,y=tly+ypos,txt="Moon R"})
out({a=1,c=0xFFEF9B,x=65,y=tly+ypos,txt=day[i].moonrise[1].." "..day[i].moonrise[2]})
ypos=ypos+gap
out({a=1,x=tlx+10,y=tly+ypos,txt="Moon S"})
out({a=1,c=0x778899,x=65,y=tly+ypos,txt=day[i].moonset[1].." "..day[i].moonset[2]})
-- IMAGES FOR FORECAST REPEAT SECTION -- x l|r y u|d
-- WEATHER IMAGE
image({x=tlx+115,y=tly-10,h=30,w=30,file=day[i].weather_icon})
-- image({x=tlx+115,y=tly-10,h=30,w=30,file=ptred})
-- MOON ICON
draw_moon({day=i,size=20,x=tlx+100,y=tly+05,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 LOVE this one ---> it's telling me the heat wave is broken.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
@Sector11
Have you thought about putting the text forecast in a separate lua.
I did this before I started playing with the iweather.lua.
--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION-
--_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
_G.weather_script = function(update,time,now,text_forecast,day,hour,astronomy)--#### 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=12
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
--END OF DEFAULTS #######################################################
--Start Text Forecast ###################################################
out({c=0x0099ff,fs=18,x=15,y=30,txt="Five Day Forecast "})
gap=13
ypos=15+gap
ypos=ypos+gap+gap
out({c=0xd7004c,fs=16,x=15,y=ypos,txt=text_forecast[1].title})
ypos=ypos+gap
wrapy=out({wrap_len=40,wrap_gap=15,x=15,y=ypos,txt=text_forecast[1].fctext_imperial})
ypos=ypos+gap+wrapy
out({c=0xd7004c,fs=14,x=15,y=ypos,txt=text_forecast[2].title})
ypos=ypos+gap
wrapy=out({wrap_len=40,wrap_gap=15,x=15,y=ypos,txt=text_forecast[2].fctext_imperial})
ypos=ypos+gap+wrapy
out({c=0xd7004c,fs=14,x=15,y=ypos,txt=text_forecast[3].title})
ypos=ypos+gap
wrapy=out({wrap_len=40,wrap_gap=15,x=15,y=ypos,txt=text_forecast[3].fctext_imperial})
ypos=ypos+gap+wrapy
out({c=0xd7004c,fs=14,x=15,y=ypos,txt=text_forecast[4].title})
ypos=ypos+gap
wrapy=out({wrap_len=40,wrap_gap=15,x=15,y=ypos,txt=text_forecast[4].fctext_imperial})
ypos=ypos+gap+wrapy
out({c=0xd7004c,fs=14,x=15,y=ypos,txt=text_forecast[5].title})
ypos=ypos+gap
wrapy=out({wrap_len=40,wrap_gap=15,x=15,y=ypos,txt=text_forecast[5].fctext_imperial})
ypos=ypos+gap+wrapy
out({c=0xd7004c,fs=14,x=15,y=ypos,txt=text_forecast[6].title})
ypos=ypos+gap
wrapy=out({wrap_len=40,wrap_gap=15,x=15,y=ypos,txt=text_forecast[6].fctext_imperial})
ypos=ypos+gap+wrapy
out({c=0xd7004c,fs=14,x=15,y=ypos,txt=text_forecast[7].title})
ypos=ypos+gap
wrapy=out({wrap_len=40,wrap_gap=15,x=15,y=ypos,txt=text_forecast[7].fctext_imperial})
ypos=ypos+gap+wrapy
out({c=0xd7004c,fs=14,x=15,y=ypos,txt=text_forecast[8].title})
ypos=ypos+gap
wrapy=out({wrap_len=40,wrap_gap=15,x=15,y=ypos,txt=text_forecast[8].fctext_imperial})
ypos=ypos+gap+wrapy
out({c=0xd7004c,fs=14,x=15,y=ypos,txt=text_forecast[9].title})
ypos=ypos+gap
wrapy=out({wrap_len=40,wrap_gap=15,x=15,y=ypos,txt=text_forecast[9].fctext_imperial})
ypos=ypos+gap+wrapy
out({c=0xd7004c,fs=14,x=15,y=ypos,txt=text_forecast[10].title})
ypos=ypos+gap
wrapy=out({wrap_len=40,wrap_gap=15,x=15,y=ypos,txt=text_forecast[10].fctext_imperial})
ypos=ypos+gap+wrapy
--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--########################################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################
and started it with this
##############################################
# Settings
##############################################
max_specials 10000
max_user_text 1500000
background no
use_xft yes
#xftfont Sans:size=12
#xftalpha 1
font Mono:size=8
total_run_times 0
own_window yes
##own_window_argb_visual yes
own_window_transparent yes
own_window_type override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 450 935
maximum_width 245
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color white
alignment top_right
gap_x 10
gap_y 10
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
color1 86acad #darker blue
color2 b1c9c9 #lighter blue
text_buffer_size 100000
top_name_width 10
update_interval 1
own_window_title interactiveconkyrc
lua_load ~/wun/wun.lua
lua_draw_hook_post weather
lua_load ~/wun/4cast.lua
TEXT
You can see by the 4castrc it's only 250 wide, just a thought.
EDIT
You can see it in this post.
Last edited by jst_joe (2014-01-19 21:44:59)
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
@Sector11
Have you thought about putting the text forecast in a separate lua.
You've been looking at my HDD? 8)
It's in the mill, a "wide" version that has it's base in the one I posted with a touch of the new one (I think)
it's got it's footing built now the foundation ....
It will be a conky in a box, like a few of my weather conkys. My wife has one I'm not allowed to tweak, I got in real do-do when I added the time/date without telling her:
then another favourite ... check the title:
Next 'box' mrpeachy's WUN
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
^ You do really, really nice work.
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
^ You do really, really nice work.
Thank you. Conky is my passion, has been for 6 years now.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
^ I believe and I could be wrong but...
your sig kind of gives that away
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 believe and I could be wrong but...
your sig kind of gives that away![]()
![]()
Well I'll be ... you're right.
O:)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
then another favourite ... check the title:
http://s20.postimg.org/ii9xcc9e1/2014_01_19_20_02_24_1920x1080_Sector11.jpgNext 'box' mrpeachy's WUN
I have to agree with Joe, very nice work indeed!
maybe ill take a look at the maps option available through the wunderground api
im thinking of moving on from the sun moon azimuth altitude stuff, while it is cool, im not sure many people would be interested and setting up the display to be user customizable would be a lot of work
might comment out that part of wun and go for posting a finished project
...then look into the maps ]:D
Offline
Hey guys, I read through the last 5 or 6 pages of posts looking for some info on the "stoplight" leds. Mine appear horizontally in the upper left hand corner. From the looks of some of you guys scrots, they should be down in the middle of the center small rectangular button? Just curious. Have grabbed all the latest relevant updates/configs and all is working perfect except the position of the leds...
Between the four of you, this is unbelievable stuff! I can't get over how sophisticated it works and looks. You guys have serious skills...
Proud user of VSDIO: Jedi! You can download it from here... I'm on the web at NixNut.com!
Offline
im thinking of moving on from the sun moon azimuth altitude stuff, while it is cool, im not sure many people would be interested and setting up the display to be user customizable would be a lot of work
might comment out that part of wun and go for posting a finished project
...then look into the maps ]:D
Thank you again. Yes, comment it out, but leave it there.
Map would be cool. Never had a weather map for here, Does WUN do maps from here?
Last edited by Sector11 (2014-01-20 11:54:14)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
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