SEARCH

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

You are not logged in.

#851 2014-04-10 22:53:47

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

Re: Wun Weather Script for Conky (Lua)

Last edited by mrpeachy (2014-04-10 22:54:41)

Offline

Help fund CrunchBang, donate to the project!

#852 2014-04-10 23:46:30

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

Re: Wun Weather Script for Conky (Lua)

as promised some code

this is the template

wun_circle.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="mono"--font must be in quotes
default_font_size=10
default_face="normal"
default_color=0xffffff
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
default_weather_icons="/home/mcdowall/wun/additional_files/weathericons/icons_merlinthered_flat_black/"
--END OF DEFAULTS #######################################################
--#########################################################################
cairo_set_source_rgba(cr,1,1,1,1)
cairo_set_line_width(cr,1)
--center settings
cx,cy=160,160
rad1=70
rad2=rad1+5
rad3=rad2+30
rad4=rad3+12
srad1=35--size of bump radius
srad2=30--size of outer circles
--circle calculations
px=cx
py=cy
prad=rad4
pdeg=0
local x3,y3=pt(px,py,prad,pdeg)
px=cx
py=cy
prad=rad4
pdeg=45
local x4,y4=pt(px,py,prad,pdeg)
px=cx
py=cy
prad=rad4
pdeg=90
local x5,y5=pt(px,py,prad,pdeg)
px=cx
py=cy
prad=rad4
pdeg=135
local x6,y6=pt(px,py,prad,pdeg)
px=cx
py=cy
prad=rad4
pdeg=180
local x7,y7=pt(px,py,prad,pdeg)
px=cx
py=cy
prad=rad4
pdeg=225
local x8,y8=pt(px,py,prad,pdeg)
px=cx
py=cy
prad=rad4
pdeg=270
local x9,y9=pt(px,py,prad,pdeg)
px=cx
py=cy
prad=rad4
pdeg=315
local xn,yn=pt(px,py,prad,pdeg)

local function r2d(rad)
return(180/math.pi)*rad
end
local function d2r(deg)
return deg*(math.pi/180)
end
local function tangles(a,b,c)
if a>b and a>c then
sc=a
sa=b
sb=c
elseif b>a and b>c then
sc=b
sa=c
sb=a
elseif c>a and c>b then
sc=c
sa=a
sb=b
end
cosac=((sa^2)+(sb^2)-(sc^2))/(2*sa*sb)
ac=r2d(math.acos(cosac))
sinaa=(sa*(math.sin(d2r(ac))))/sc
aa=r2d(math.asin(sinaa))
ab=180-ac-aa
if a>b and a>c then
return ab,ac,aa
elseif b>a and b>c then
return ac,aa,ab
elseif c>a and c>b then
return aa,ab,ac
end
end
A,B,C=tangles(rad4,srad1,rad3)
px=cx
py=cy
prad=rad3
pdeg=C
local x10,y10=pt(px,py,prad,pdeg)
px=x3
py=y3
prad=srad1
pdeg=-A-180
local x11,y11=pt(px,py,prad,pdeg)
px=cx
py=cy
prad=rad2
pdeg=0
local x1,y1=pt(px,py,prad,pdeg)
px=x3
py=y3
prad=srad1
pdeg=180
local x2,y2=pt(px,py,prad,pdeg)
--short line up
cairo_move_to(cr,x1,y1)
cairo_line_to(cr,x2,y2)
cairo_stroke(cr)
--circles
cairo_set_line_width (cr,2)
cairo_arc(cr,cx,cy,rad1,0,2*math.pi)
cairo_set_source_rgba (cr,1,1,1,1);cairo_fill_preserve(cr);cairo_set_source_rgba(cr,0,0,0,1);cairo_stroke(cr)
cairo_arc(cr,x3,y3,srad2,0,2*math.pi)
cairo_set_source_rgba (cr,1,1,1,1);cairo_fill_preserve(cr);cairo_set_source_rgba(cr,0,0,0,1);cairo_stroke(cr)
cairo_arc(cr,x4,y4,srad2,0,2*math.pi)
cairo_set_source_rgba (cr,1,1,1,1);cairo_fill_preserve(cr);cairo_set_source_rgba(cr,0,0,0,1);cairo_stroke(cr)
cairo_arc(cr,x5,y5,srad2,0,2*math.pi)
cairo_set_source_rgba (cr,1,1,1,1);cairo_fill_preserve(cr);cairo_set_source_rgba(cr,0,0,0,1);cairo_stroke(cr)
cairo_arc(cr,x6,y6,srad2,0,2*math.pi)
cairo_set_source_rgba (cr,1,1,1,1);cairo_fill_preserve(cr);cairo_set_source_rgba(cr,0,0,0,1);cairo_stroke(cr)
cairo_arc(cr,x7,y7,srad2,0,2*math.pi)
cairo_set_source_rgba (cr,1,1,1,1);cairo_fill_preserve(cr);cairo_set_source_rgba(cr,0,0,0,1);cairo_stroke(cr)
cairo_arc(cr,x8,y8,srad2,0,2*math.pi)
cairo_set_source_rgba (cr,1,1,1,1);cairo_fill_preserve(cr);cairo_set_source_rgba(cr,0,0,0,1);cairo_stroke(cr)
cairo_arc(cr,x9,y9,srad2,0,2*math.pi)
cairo_set_source_rgba (cr,1,1,1,1);cairo_fill_preserve(cr);cairo_set_source_rgba(cr,0,0,0,1);cairo_stroke(cr)
cairo_arc(cr,xn,yn,srad2,0,2*math.pi)
cairo_set_source_rgba (cr,1,1,1,1);cairo_fill_preserve(cr);cairo_set_source_rgba(cr,0,0,0,1);cairo_stroke(cr)
--bumpy curve
cairo_set_source_rgba (cr,1,1,1,1)
cairo_set_line_width (cr,2)
cairo_arc(cr,cx,cy,rad2,d2r(-90+180),d2r(-90+360))
cairo_arc_negative(cr,x3,y3,srad1,d2r(180-90),d2r(360-A+90))
cairo_arc(cr,cx,cy,rad3,d2r(C-90),d2r(45-C-90))
cairo_arc_negative(cr,x4,y4,srad1,d2r(-90-90-45+A),d2r(180-A-45))
cairo_arc(cr,cx,cy,rad3,d2r(C-90+45),d2r(90-C-90))
cairo_arc_negative(cr,x5,y5,srad1,d2r(-90-90+A),d2r(180-A))
cairo_arc(cr,cx,cy,rad3,d2r(C-90+90),d2r(135-C-90))
cairo_arc_negative(cr,x6,y6,srad1,d2r(-135+A),d2r(-90-A-45))
cairo_arc(cr,cx,cy,rad3,d2r(C-90+135),d2r(180-C-90))
cairo_arc_negative(cr,x7,y7,srad1,d2r(-90+A),d2r(-90-A))
cairo_arc(cr,cx,cy,rad3,d2r(C-90+180),d2r(225-C-90))
cairo_arc_negative(cr,x8,y8,srad1,d2r(-90+A+45),d2r(-90-A+45))
cairo_arc(cr,cx,cy,rad3,d2r(C-90+225),d2r(270-C-90))
cairo_arc_negative(cr,x9,y9,srad1,d2r(A),d2r(-A))
cairo_arc(cr,cx,cy,rad3,d2r(C-90+270),d2r(315-C-90))
cairo_arc_negative(cr,xn,yn,srad1,d2r(A+45),d2r(-A+45))
cairo_stroke(cr)
ptab={
{x4,y4},
{x5,y5},
{x6,y6},
{x7,y7},
{x8,y8},
{x9,y9},
{xn,yn},
}
--images
image({x=x3-25,y=y3-25,file=now.weather_icon,w=50,h=50})
for i=1,7 do 
image({x=ptab[i][1]-25,y=ptab[i][2]-25,file=day[i].weather_icon,w=50,h=50})
end
--day names
sdeg=60
ldeg=20
local t1x,t1y=pt(x3,y3,srad2+8,sdeg)
out({x=t1x,y=t1y,txt="N",fs=12})
local t1x,t1y=pt(x3,y3,srad2+8,sdeg+ldeg)
out({x=t1x,y=t1y,txt="O",fs=12})
local t1x,t1y=pt(x3,y3,srad2+8,sdeg+ldeg+ldeg)
out({x=t1x,y=t1y,txt="W",fs=12})
function dayname(dayn,degn,xx,yy,dir,gap)
dir=dir or 1
gap=gap or 8
if dir==1 then
l1=string.upper(string.sub(day[dayn].weekday_short,1,1))
l2=string.upper(string.sub(day[dayn].weekday_short,2,2))
l3=string.upper(string.sub(day[dayn].weekday_short,3,3))
elseif dir==2 then
l1=string.upper(string.sub(day[dayn].weekday_short,3,3))
l2=string.upper(string.sub(day[dayn].weekday_short,2,2))
l3=string.upper(string.sub(day[dayn].weekday_short,1,1))
end
sdeg=degn
ldeg=20
local t1x,t1y=pt(xx,yy,srad2+gap,sdeg)
out({x=t1x,y=t1y,txt=l1,hj="c",vj="m"})
local t1x,t1y=pt(xx,yy,srad2+gap,sdeg+ldeg)
out({x=t1x,y=t1y,txt=l2,hj="c",vj="m"})
local t1x,t1y=pt(xx,yy,srad2+gap,sdeg+ldeg+ldeg)
out({x=t1x,y=t1y,txt=l3,hj="c",vj="m"})
end

dayname(1,60+45,		x4,y4)
dayname(2,60+45+45,		x5,y5,2)
dayname(3,60+45+45+45,		x6,y6,2)
dayname(4,60+45+45+45+45,	x7,y7,2)
dayname(5,60+45+45+45+45+45,	x8,y8)
dayname(6,60+45+45+45+45+45+45,	x9,y9)
dayname(7,60+45+45+45+45+45+45+45,xn,yn)
--setup buttons
function button_settings()
b1=do_button({st_type=1,dfal_off=0.5,btype=1,bname="day1",blx_off=x3-(srad2),bly_off=y3+(srad2),	bw_off=srad2*2,bh_off=srad2*2,draw=0,off_on_on={"day2","day3","day4","day5","day6","day7","day8"}})
b2=do_button({dfal_off=0.5,btype=1,bname="day2",blx_off=x4-(srad2),bly_off=y4+(srad2),	bw_off=srad2*2,bh_off=srad2*2,draw=0,off_on_on={"day1","day3","day4","day5","day6","day7","day8"}})
b3=do_button({dfal_off=0.5,btype=1,bname="day3",blx_off=x5-(srad2),bly_off=y5+(srad2),	bw_off=srad2*2,bh_off=srad2*2,draw=0,off_on_on={"day1","day2","day4","day5","day6","day7","day8"}})
b4=do_button({dfal_off=0.5,btype=1,bname="day4",blx_off=x6-(srad2),bly_off=y6+(srad2),	bw_off=srad2*2,bh_off=srad2*2,draw=0,off_on_on={"day1","day2","day3","day5","day6","day7","day8"}})
b5=do_button({dfal_off=0.5,btype=1,bname="day5",blx_off=x7-(srad2),bly_off=y7+(srad2),	bw_off=srad2*2,bh_off=srad2*2,draw=0,off_on_on={"day1","day2","day3","day4","day6","day7","day8"}})
b6=do_button({dfal_off=0.5,btype=1,bname="day6",blx_off=x8-(srad2),bly_off=y8+(srad2),	bw_off=srad2*2,bh_off=srad2*2,draw=0,off_on_on={"day1","day2","day3","day4","day5","day7","day8"}})
b7=do_button({dfal_off=0.5,btype=1,bname="day7",blx_off=x9-(srad2),bly_off=y9+(srad2),	bw_off=srad2*2,bh_off=srad2*2,draw=0,off_on_on={"day1","day2","day3","day4","day5","day6","day8"}})
b8=do_button({dfal_off=0.5,btype=1,bname="day8",blx_off=xn-(srad2),bly_off=yn+(srad2),	bw_off=srad2*2,bh_off=srad2*2,draw=0,off_on_on={"day1","day2","day3","day4","day5","day6","day7"}})
end--function
--set what text to show
if b1==1 and b2==0 and b3==0 and b4==0 and b5==0 and b6==0 and b7==0 and b8==0 then
text1=time.month_pad.."/"..time.day_pad
text2="P: "..now.pressure_imperial..now.pressure_imperial_unit.." "..now.pressure_trend
text3="T: "..now.temp_imperial..now.temp_imperial_unit.." ("..now.feelslike_imperial..now.feelslike_imperial_unit..")"
text4=string.upper(now.conditions_user)
text5="R: "..now.precip_1hr_imperial..string.upper(now.precip_1hr_imperial_unit).." ("..now.precip_today_imperial..string.upper(now.precip_today_imperial_unit)..")"
text6="W: "..now.wind_imperial..string.upper(now.wind_imperial_unit).." "..now.wind_degrees.."°"
text7="U: "..now.uvi
elseif b1==0 and b2==1 and b3==0 and b4==0 and b5==0 and b6==0 and b7==0 and b8==0 then
text1=day[1].month_pad.."/"..day[1].day_pad
text2="H: "..day[1].avehumidity.."% ("..day[1].maxhumidity.."%)"
text3="T: "..day[1].high_imperial..day[1].high_imperial_unit.." / "..day[1].low_imperial..day[1].low_imperial_unit
text4=string.upper(day[1].conditions_user)
text5="R: "..day[1].rain_day_imperial..string.upper(day[1].rain_day_imperial_unit).." ("..day[1].rain_night_imperial..string.upper(day[1].rain_night_imperial_unit)..")"
text6="W: "..day[1].avewind_imperial..string.upper(day[1].avewind_imperial_unit).." "..day[1].avewind_degrees.."°"
text7="P: "..day[1].precipitation.."%"
elseif b1==0 and b2==0 and b3==1 and b4==0 and b5==0 and b6==0 and b7==0 and b8==0 then
text1=day[2].month_pad.."/"..day[2].day_pad
text2="H: "..day[2].avehumidity.."% ("..day[2].maxhumidity.."%)"
text3="T: "..day[2].high_imperial..day[2].high_imperial_unit.." / "..day[2].low_imperial..day[2].low_imperial_unit
text4=string.upper(day[2].conditions_user)
text5="R: "..day[2].rain_day_imperial..string.upper(day[2].rain_day_imperial_unit).." ("..day[2].rain_night_imperial..string.upper(day[2].rain_night_imperial_unit)..")"
text6="W: "..day[2].avewind_imperial..string.upper(day[2].avewind_imperial_unit).." "..day[2].avewind_degrees.."°"
text7="P: "..day[2].precipitation.."%"
elseif b1==0 and b2==0 and b3==0 and b4==1 and b5==0 and b6==0 and b7==0 and b8==0 then
text1=day[3].month_pad.."/"..day[3].day_pad
text2="H: "..day[3].avehumidity.."% ("..day[3].maxhumidity.."%)"
text3="T: "..day[3].high_imperial..day[3].high_imperial_unit.." / "..day[3].low_imperial..day[3].low_imperial_unit
text4=string.upper(day[3].conditions_user)
text5="R: "..day[3].rain_day_imperial..string.upper(day[3].rain_day_imperial_unit).." ("..day[3].rain_night_imperial..string.upper(day[3].rain_night_imperial_unit)..")"
text6="W: "..day[3].avewind_imperial..string.upper(day[3].avewind_imperial_unit).." "..day[3].avewind_degrees.."°"
text7="P: "..day[3].precipitation.."%"
elseif b1==0 and b2==0 and b3==0 and b4==0 and b5==1 and b6==0 and b7==0 and b8==0 then
text1=day[4].month_pad.."/"..day[4].day_pad
text2="H: "..day[4].avehumidity.."% ("..day[4].maxhumidity.."%)"
text3="T: "..day[4].high_imperial..day[4].high_imperial_unit.." / "..day[4].low_imperial..day[4].low_imperial_unit
text4=string.upper(day[4].conditions_user)
text5="R: "..day[4].rain_day_imperial..string.upper(day[4].rain_day_imperial_unit).." ("..day[4].rain_night_imperial..string.upper(day[4].rain_night_imperial_unit)..")"
text6="W: "..day[4].avewind_imperial..string.upper(day[4].avewind_imperial_unit).." "..day[4].avewind_degrees.."°"
text7="P: "..day[4].precipitation.."%"
elseif b1==0 and b2==0 and b3==0 and b4==0 and b5==0 and b6==1 and b7==0 and b8==0 then
text1=day[5].month_pad.."/"..day[5].day_pad
text2="H: "..day[5].avehumidity.."% ("..day[5].maxhumidity.."%)"
text3="T: "..day[5].high_imperial..day[5].high_imperial_unit.." / "..day[5].low_imperial..day[5].low_imperial_unit
text4=string.upper(day[5].conditions_user)
text5="R: "..day[5].rain_day_imperial..string.upper(day[5].rain_day_imperial_unit).." ("..day[5].rain_night_imperial..string.upper(day[5].rain_night_imperial_unit)..")"
text6="W: "..day[5].avewind_imperial..string.upper(day[5].avewind_imperial_unit).." "..day[5].avewind_degrees.."°"
text7="P: "..day[5].precipitation.."%"
elseif b1==0 and b2==0 and b3==0 and b4==0 and b5==0 and b6==0 and b7==1 and b8==0 then
text1=day[6].month_pad.."/"..day[6].day_pad
text2="H: "..day[6].avehumidity.."% ("..day[6].maxhumidity.."%)"
text3="T: "..day[6].high_imperial..day[6].high_imperial_unit.." / "..day[6].low_imperial..day[6].low_imperial_unit
text4=string.upper(day[6].conditions_user)
text5="R: "..day[6].rain_day_imperial..string.upper(day[6].rain_day_imperial_unit).." ("..day[6].rain_night_imperial..string.upper(day[6].rain_night_imperial_unit)..")"
text6="W: "..day[6].avewind_imperial..string.upper(day[6].avewind_imperial_unit).." "..day[6].avewind_degrees.."°"
text7="P: "..day[6].precipitation.."%"
elseif b1==0 and b2==0 and b3==0 and b4==0 and b5==0 and b6==0 and b7==0 and b8==1 then
text1=day[7].month_pad.."/"..day[7].day_pad
text2="H: "..day[7].avehumidity.."% ("..day[7].maxhumidity.."%)"
text3="T: "..day[7].high_imperial..day[7].high_imperial_unit.." / "..day[7].low_imperial..day[7].low_imperial_unit
text4=string.upper(day[7].conditions_user)
text5="R: "..day[7].rain_day_imperial..string.upper(day[7].rain_day_imperial_unit).." ("..day[7].rain_night_imperial..string.upper(day[7].rain_night_imperial_unit)..")"
text6="W: "..day[7].avewind_imperial..string.upper(day[7].avewind_imperial_unit).." "..day[7].avewind_degrees.."°"
text7="P: "..day[7].precipitation.."%"
end--button
local tg=8
--info display
cairo_set_source_rgba (cr,0,0,0,1)
cairo_arc(cr,cx,cy,rad1-10,d2r(-90+180+20),d2r(-90+360-20))
cairo_stroke (cr)
--top
local x,y=pt(cx,cy,rad1-10,340)
cairo_arc(cr,x,y,3,0,2*math.pi)
cairo_fill (cr)
out({x=x+tg,y=y,txt=text1,c=0x000000,vj="m"})
--
local x,y=pt(cx,cy,rad1-10,310)
cairo_arc(cr,x,y,3,0,2*math.pi)
cairo_fill (cr)
out({x=x+tg,y=y,txt=text2,c=0x000000,vj="m"})
--
local x,y=pt(cx,cy,rad1-10,289)
cairo_arc(cr,x,y,3,0,2*math.pi)
cairo_fill (cr)
out({x=x+tg,y=y,txt=text3,c=0x000000,vj="m"})
--
local x,y=pt(cx,cy,rad1-10,270)
cairo_arc(cr,x,y,3,0,2*math.pi)
cairo_fill (cr)
out({x=x+tg,y=y,txt=text4,c=0x000000,vj="m"})
--
local x,y=pt(cx,cy,rad1-10,251)
cairo_arc(cr,x,y,3,0,2*math.pi)
cairo_fill (cr)
out({x=x+tg,y=y,txt=text5,c=0x000000,vj="m"})
--
local x,y=pt(cx,cy,rad1-10,230)
cairo_arc(cr,x,y,3,0,2*math.pi)
cairo_fill (cr)
out({x=x+tg,y=y,txt=text6,c=0x000000,vj="m"})
--
local x,y=pt(cx,cy,rad1-10,200)
cairo_arc(cr,x,y,3,0,2*math.pi)
cairo_fill (cr)
out({x=x+tg,y=y,txt=text7,c=0x000000,vj="m"})


--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--########################################################################################]]
end--of weather_display function do not edit this line ##################
--#######################################################################

not easy to navigate im afraid, lots of code for the drawing part

load it as part of wunrci

####################################################
# Lua Settings - load and activate weather script
####################################################
lua_load ~/wun/wun.lua
lua_draw_hook_post weather
####################################################
# Lua Settings - load weather template
####################################################
lua_load ~/wun/templates/wun_circle.lua#400 x 400
####################################################

####################################################
# Lua Settings - load button script
####################################################
lua_load ~/wun/additional_files/scripts/button_script.lua
####################################################
## activate mouse click logging ####################
####################################################
lua_draw_hook_pre get_mouse {"interactiveconkyrc","/tmp/xdo"} 
## after function call, table containing window title and path to click log file
## before running script create a blank log file first.  In the example above "/tmp/xdo" credate a blank file called xdo in your /tmp directory 
####################################################
## restart click logging on conkyrc save/startup ###
####################################################
lua_startup_hook start_xdo /tmp/xdo
####################################################
## ^ send click file location following function call, must match location set above
####################################################
## kill xdotool process on conkyrc save/shutdown ###
####################################################
lua_shutdown_hook stop_xdo
####################################################

TEXT

ADDITIONAL

i did make a change in my coinfig
to make a short version of "chance of a thunderstorm"
may need to edit with other long weather as they come up

conditions_user={--OPENS TABLE, DO NOT EDIT
["Chance of a Thunderstorm"]="Chance T.Storm",
},--CLOSES CONDITIONS_USER TABLE, DO NOT EDIT

Last edited by mrpeachy (2014-04-10 23:49:17)

Offline

#853 2014-04-11 01:58:34

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

Re: Wun Weather Script for Conky (Lua)

Last edited by mrpeachy (2014-04-11 03:04:48)

Offline

#854 2014-04-11 02:55:06

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

Re: Wun Weather Script for Conky (Lua)

Last edited by mrpeachy (2014-04-11 02:55:51)

Offline

#855 2014-04-11 11:13:25

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

Offline

#856 2014-04-11 14:55:16

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

Re: Wun Weather Script for Conky (Lua)

No not yet.  I wanted to test a couple of locations before posting a resting script  smile

Offline

#857 2014-04-11 15:42:23

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

Re: Wun Weather Script for Conky (Lua)

Offline

#858 2014-04-11 15:56:08

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

Offline

#859 2014-04-11 16:07:17

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

Re: Wun Weather Script for Conky (Lua)

--location="autoip",					--	Location - See: --[[NOTES below
--location="zmw:00000.1.87582",			--	Location - See: --[[NOTES below
--location="Argentina/Buenos_Aires",	--	Location - See: --[[NOTES below
--location="pws:ICIUDADA11",			-- Saavedra, Cap Fed, BsAs
--location="pws:IBUENOSA110",			-- BELGRANO R, Cap Fed, BsAs
--location="pws:IBUENOSA157",			-- Palermo, Cap Fed, BsAs
--location="pws:ICABABUE10",			-- Recoleta, Cap Fed, BsAs
--location="pws:ICABABUE2",				-- Villa Urquiza, Cap Fed, BsAs
--location="pws:IBUENOSA75",			-- Colegiales, Cap Fed, BsAs
--location="pws:IBUENOSA149",			-- Villa Martelli, Greater BsAs
--location="SAEZ"						--SAEZ Ezeiza International
location="SABE"						--SABE Aeroparque Jorge Newberry
--location="pws:EDSB"					--Karlsruhe/Baden, DE (Old CFE Baden-Söllingen)
--location="pws:IBADENWR63"	

Offline

#860 2014-04-11 16:27:42

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

--location="SAEZ"						--SAEZ Ezeiza International
location="SABE"						--SABE Aeroparque Jorge Newberry
--location="pws:EDSB"					--Karlsruhe/Baden, DE (Old CFE Baden-Söllingen)
--location="pws:IBADENWR63"	

Last edited by Sector11 (2014-04-11 17:04:26)

Offline

#861 2014-04-11 20:06:58

noeffort
New Member
Registered: 2014-04-11
Posts: 1

Re: Wun Weather Script for Conky (Lua)

Hi Guys,

I'm a WUN noob, and only just got Conky, (basic lm's) working last night, when then I set my sights on WUN.

I have been able to find all the hidden "/home/mcdowell/wun" paths and updated them to my own path, and figured out how to get and set my key, location and EN language.

Great, so i have the basic view so far but... no weather icons...

I checked their location and perms, and i cannot figure why these are not loading, no errors at cmd line whence launched

Any help appreciated (let me know which/if to post rc, or lua files)

Offline

#862 2014-04-11 20:41:46

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

Re: Wun Weather Script for Conky (Lua)

Offline

#863 2014-04-11 21:57:19

jst_joe
#! Junkie
From: Here, There and After
Registered: 2012-07-03
Posts: 297

Re: Wun Weather Script for Conky (Lua)

Last edited by jst_joe (2014-04-11 21:58:42)

Offline

#864 2014-04-11 23:45:42

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

Offline

#865 2014-04-12 01:04:55

jst_joe
#! Junkie
From: Here, There and After
Registered: 2012-07-03
Posts: 297

Re: Wun Weather Script for Conky (Lua)

Offline

#866 2014-04-12 16:09:09

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

Offline

#867 2014-04-12 16:29:30

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

Re: Wun Weather Script for Conky (Lua)

That does look good  big_smile
the shadow part is in the right place but it looks like the moon is rotated too much in wun compared to Stellarium

what does Stellarium say the moon looks like at the north pole?
or at the equator?

then i can alter the moon image rotation

Offline

#868 2014-04-12 16:30:48

jst_joe
#! Junkie
From: Here, There and After
Registered: 2012-07-03
Posts: 297

Re: Wun Weather Script for Conky (Lua)

Last edited by jst_joe (2014-04-12 16:31:10)

Offline

#869 2014-04-12 18:33:08

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

Offline

#870 2014-04-12 18:35:05

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

Offline

#871 2014-04-12 19:23:43

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

Re: Wun Weather Script for Conky (Lua)

Offline

#872 2014-04-12 20:05:54

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

Last edited by Sector11 (2014-04-12 22:17:36)

Offline

#873 2014-04-12 21:38:25

jst_joe
#! Junkie
From: Here, There and After
Registered: 2012-07-03
Posts: 297

Re: Wun Weather Script for Conky (Lua)

Offline

#874 2014-04-14 19:13:23

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

Re: Wun Weather Script for Conky (Lua)

Offline

Be excellent to each other!

#875 2014-04-14 19:17:34

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

Re: Wun Weather Script for Conky (Lua)

####################################################
# Lua Settings - load and activate weather script
####################################################
lua_load ~/wun/wun.lua
lua_draw_hook_post weather
####################################################
# Lua Settings - load weather template
####################################################

lua_load ~/wun/templates/gui.lua

####################################################
# Lua Settings - load button script
####################################################
lua_load ~/wun/additional_files/scripts/button_script.lua
####################################################
## activate mouse click logging ####################
####################################################
lua_draw_hook_pre get_mouse {"interactiveconkyrc","/tmp/xdo"} 
## after function call, table containing window title and path to click log file
## before running script create a blank log file first.  In the example above "/tmp/xdo" credate a blank file called xdo in your /tmp directory 
####################################################
## restart click logging on conkyrc save/startup ###
####################################################
lua_startup_hook start_xdo /tmp/xdo
####################################################
## ^ send click file location following function call, must match location set above
####################################################
## kill xdotool process on conkyrc save/shutdown ###
####################################################
lua_shutdown_hook stop_xdo
####################################################

TEXT

Last edited by mrpeachy (2014-04-14 19:27:17)

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.
Server: bleh

Debian Logo