SEARCH

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

You are not logged in.

#451 2014-01-24 18:58:41

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

Re: Wun Weather Script for Conky (Lua)

PackRat wrote:

These are coming along nicely.

@Sector11 - why are using a + with your temps? When I see that, I'm inferring your temperature is only accurate within +50 C  - you need a better meteorologist!

I changed the location of "Temp" and "Feels Like" and took Chill and Heat out as they will only show up if one is different to the reported Temp (or show: N/A if equal to the Temp)... and they "are" the Feels Like" temp anyway.

- Heat Index is always a + factor
- Wind Chill is always a - factor

hence Feels Like = ±  ... I prefer to focus on what my skin feels out there.

In the winter it will be colder than "Temp" and in summer hotter than "Temp"

As seen above: Temp was 36.3°C and ± was 50°C
36.3°C  =  97.34°F and 50°C  =  122.00°F

or the all time high for yesterday: 41.3°C and ±61°C
41.3°C  =  106.34°F  -  61°C  =  141.80°F

In Canada Heat Index isn't 'so mush' a point of contention but Wind Chill in the winter is!  And here it's the reverse, Heat Index is the killer!

Too hot for "nice" words!


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

Be excellent to each other!

#452 2014-01-24 20:45:18

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

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:

I changed the location of "Temp" and "Feels Like" and took Chill and Heat out as they will only show up if one is different to the reported Temp (or show: N/A if equal to the Temp)... and they "are" the Feels Like" temp anyway.

- Heat Index is always a + factor
- Wind Chill is always a - factor

That's why I always take Chill and Heat out also and very logical thinking on the + and - addition. smile

Last edited by jst_joe (2014-01-24 20:46:12)


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

#453 2014-01-24 21:43:32

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

Re: Wun Weather Script for Conky (Lua)

seems like the changes i made to wun.lua recently are running trouble free,
here is an idea for an interactive template big_smile

Screenshot_from_2014_01_24_15_26_22.jpg

Offline

#454 2014-01-24 21:50:08

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

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

seems like the changes i made to wun.lua recently are running trouble free,
here is an idea for an interactive template big_smile

http://s28.postimg.org/pv85s414p/Screenshot_from_2014_01_24_15_26_22.jpg

An expandable menu?
Sweet looking. smile


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

#455 2014-01-24 22:14:55

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

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

seems like the changes i made to wun.lua recently are running trouble free,
here is an idea for an interactive template big_smile

http://s28.postimg.org/pv85s414p/Screenshot_from_2014_01_24_15_26_22.jpg

OH SWEET!  I love those conkys, they go back years ... of course adding LUA to one is the equivalent of putting a Porsche 911 engine & tanny in a VW Beetle!  Gives a whole new meaning to 'Super' Beetle!

And that's where monofur and ASCII characters:

## │ ─ ┌ ┬ ┐ └ ┴ ┘ ├ ┼ ┤
## ║ ═ ╔ ╦ ╗ ╚ ╩ ╝ ╠ ╬ ╣

would look nice!

2014_01_24_18_54_31_1920x1080_Sector11.jpg

  • the Beetle = old style conky

  • the paint job = monofur & ASCII characters

  • The engine and tranny = mrpeachy's WUN!


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#456 2014-01-24 22:15:55

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

Re: Wun Weather Script for Conky (Lua)

jst_joe wrote:

That's why I always take Chill and Heat out also and very logical thinking on the + and - addition. smile

And here I thought I was the only one.  big_smile


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#457 2014-01-24 22:22:44

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

Re: Wun Weather Script for Conky (Lua)

PackRat wrote:

accurate within ±50 C

Actually it just dawned on me ... when it comes to meteorologists, that's about the accuracy required for the job!


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#458 2014-01-24 23:06:48

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

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:
PackRat wrote:

accurate within ±50 C

Actually it just dawned on me ... when it comes to meteorologists, that's about the accuracy required for the job!

At least in my neck of the woods. lol  lol  lol


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

#459 2014-01-25 02:10:56

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,727

Re: Wun Weather Script for Conky (Lua)

This one is going to take some time to finish, but I think it will be worth it..
image.pngimage.pngimage.pngimage.png

Offline

#460 2014-01-25 02:33:20

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

Re: Wun Weather Script for Conky (Lua)

^ That looks really great and with (what looks like) a predefined background you won't have to worry about dark or light walls. cool


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

#461 2014-01-25 03:42:34

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

Re: Wun Weather Script for Conky (Lua)

falldown wrote:

This one is going to take some time to finish, but I think it will be worth it..


cool   cool   cool   cool   cool   cool   cool   cool
amazing!

Offline

#462 2014-01-25 04:24:57

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

Re: Wun Weather Script for Conky (Lua)

archive in first post now contained updated wun.lua with shadow options in out function
and fixed wrap function
with the wrap function, now the minimum wrap length will be the length of the longest word in the text being wrapped.

another feature added is that when using out for regular text you can now use it to set a variable that is the x coordinate of where the text ends

this is useful for follow on text, as the variable will adjust with the changing length of the text

nextx=out({c=0x000000,x=100,y=100,txt="some text in black "})
out({c=0xffffff,x=nextx,y=100,txt="this white text will always follow on"})

if you want a string of text but want to apply different formats to different parts of the text then this is how you can do it

Offline

#463 2014-01-25 19:10:34

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

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

another feature added is that when using out for regular text you can now use it to set a variable that is the x coordinate of where the text ends

That's a really nice feature. cool


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

#464 2014-01-25 19:30:44

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

Re: Wun Weather Script for Conky (Lua)

falldown wrote:

This one is going to take some time to finish, but I think it will be worth it..

No but about it ... it will be worth it!  that's great, cool and even more cool ness!


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#465 2014-01-25 19:33:43

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

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

archive in first {snip}

if you want a string of text but want to apply different formats to different parts of the text then this is how you can do it

Ooo that, x=nextx, looks very interesting. ... Thank you.

EDIT:  Archive in first post still says: CURRENT ARCHIVE 01/22/14 ?

Last edited by Sector11 (2014-01-25 19:37:06)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#466 2014-01-25 21:03:34

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

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:
mrpeachy wrote:

archive in first {snip}

if you want a string of text but want to apply different formats to different parts of the text then this is how you can do it

Ooo that, x=nextx, looks very interesting. ... Thank you.

EDIT:  Archive in first post still says: CURRENT ARCHIVE 01/22/14 ?

thats because i forgot to change it smile

Offline

#467 2014-01-25 21:15:55

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

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

thats because i forgot to change it smile

Oh ... I wasn't sure and since I'm like a bull in a china shop when it comes to new conky stuff ... I thought I'd take a break ... and check first this time.  cool

Last edited by Sector11 (2014-01-25 21:19:25)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#468 2014-01-25 21:36:51

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

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

archive in first post now contained updated wun.lua with shadow options in out function
and fixed wrap function
with the wrap function, now the minimum wrap length will be the length of the longest word in the text being wrapped.

another feature added is that when using out for regular text you can now use it to set a variable that is the x coordinate of where the text ends

this is useful for follow on text, as the variable will adjust with the changing length of the text

nextx=out({c=0x000000,x=100,y=100,txt="some text in black "})
out({c=0xffffff,x=nextx,y=100,txt="this white text will always follow on"})

if you want a string of text but want to apply different formats to different parts of the text then this is how you can do it

ADDENDUM

There are a couple of things to be aware of when using this feature
1.  for some reason the cairo_show_text function, that draws the text to the conky window, ignores leading white space
so txt="some text" and txt=" some text" will start at the same place
however, when calculating the length of the text all spaces are included
2. you have to always add spaces to the END of the previous bit of text
something like this is needed:

local function day_suf(date)
local dnu=string.len(date)
	if dnu==1 then
	dend=tostring(date)
	elseif dnu==2 then
	dend=tostring(date):sub(2,2)
	end
	if dend==1 then
	return "st"
	elseif dend==2 then
	return "nd"
	elseif dend==3 then
	return "rd"
	else
	return "th"
	end
end--function

ds=day_suf(day[1].day_pad)
nx=300
ny=300
nx=out({x=nx,y=ny,txt="today is "})
nx=out({c=0xff0000,x=nx,y=ny,txt=day[1].weekday.." "})
nx=out({c=0xffff00,x=nx,y=ny,txt="the "})
nx=out({c=0xff00ff,x=nx,y=ny,txt=day[1].day..ds.." "})
nx=out({c=0xffff00,x=nx,y=ny,txt="of "})
nx=out({c=0xff00ff,x=nx,y=ny,txt=day[1].monthname})

Screenshot_from_2014_01_25_15_24_33.jpg

the function in the above code is something i just wrote to return the correct date suffix smile

Last edited by mrpeachy (2014-01-25 21:37:19)

Offline

#469 2014-01-27 16:14:07

Habitual
#! Member
From: Youngstown, OH
Registered: 2010-09-10
Posts: 62
Website

Re: Wun Weather Script for Conky (Lua)

falldown wrote:

This one is going to take some time to finish, but I think it will be worth it..

I just wanted to give credit where credit is due. All the praises I have given for this wonderful gem have been aimed at MrPeachy when it has pointed out to me that you coded the iweather_falldown.lua I currently use.

I meant no offense and did not do this consciously.
Your code and artwork are examples of excellence and you have my Respect.

Thank you,

JJ


Success is 1% Inspiration
and 98% Perspiration and
2% atttention to details.

Offline

#470 2014-01-28 00:54:17

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

Re: Wun Weather Script for Conky (Lua)

this is the kind of map available through the wunderground api
it is quite configurable, im still working out what settings do what in some cases

Screenshot_from_2014_01_27_18_30_59.jpg

this one takes an additional use of the api key.  there are satellite images that can come with the regular api updates through wun, but they dont look particularly interesting

if you want to try it do this
at the top of a weather template, outside of the main function put this

get_radar=1
--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION-
_G.weather_script = function(update,time,now,text_forecast,day,hour)--#### DO NOT EDIT THIS LINE ##############
--#######################################################################

it must be above the _G.weather_script = function line

then somewhere in the weather script put this code

mykey="yourkey"--your wunderground api key
dloc="/home/mcdowall/wun/radsat/radsat.gif"--download location and name of file
lon=now.location_longitude
lat=now.location_latitude
irad=200--radius from long lat coords
iwid=600--width of image
ihig=600--hight of image
--satellite stuff first
srdu="km"--km or nm nautical miles-- sets units for radar also
satt="sat_vis"-- or "sat_ir4" "sat_vis"
gtt=107--0 - 255 Ground temperature threshhold. Level to cutoff and leave transparent. 107 is a reasonable value to show clouds but hide land. 
bmap=0--for sat 1 is basemap, 0 is transp
sbrd=1--show borders or 0
smth=1--smooth colors or 0-- same for radar
proj="ll" --or "ll" or "me"  Lat/lon projection or Mercator projection
tmlbs=0 --time label or 0
tmlbsy=50--coordinate for time label
tmlbsx=50--coordinate for time label
--radar stuff
tmlbr=1 --time label or 0
tmlbry=50--coordinate for time label
tmlbrx=50--coordinate for time label
nmap=1--for rad 1 is basemap, 0 is transp
rnsn=1--rainsnow different, or 0
nocl=1--noclutter
--#######################################
saturl="http://api.wunderground.com/api/"..mykey.."//radar/satellite/image.gif?rad.centerlat="..lat.."&rad.centerlon="..lon.."&sat.centerlat="..lat.."&sat.centerlon="..lon.."&rad.radius="..irad.."&rad.width="..iwid.."&rad.height="..ihig.."&sat.radius="..irad.."&sat.width="..iwid.."&sat.height="..ihig.."&sat.radunits="..srdu.."&sat.key="..satt.."&sat.gtt="..gtt.."&sat.basemap="..bmap.."&sat.borders="..sbrd.."&sat.smooth="..smth.."&sat.proj="..proj.."&sat.timelabel="..tmlbs.."&sat.timelabel.x="..tmlbsx.."&sat.timelabel.y="..tmlbsy.."&rad.radunits="..srdu.."&rad.newmaps="..nmap.."&rad.rainsnow="..rnsn.."&rad.smooth="..smth.."&rad.proj="..proj.."&rad.timelabel="..tmlbr.."&rad.timelabel.x="..tmlbrx.."&rad.timelabel.y="..tmlbry.."&rad.noclutter="..nocl..""
if get_radar==1 then
print (saturl)
local f=io.popen("wget -O "..dloc.." '"..saturl.."'")
--local sunmoondata=f:read("*a")
f:close()--]]
end
get_radar=0--turns wget off again

every time you save the template a new image will be downloaded
and it will count 1 towards your api key usage so be careful!!

Last edited by mrpeachy (2014-02-13 17:49:40)

Offline

#471 2014-01-28 02:07:18

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

Re: Wun Weather Script for Conky (Lua)

Conky PitStop in the Tips and Tricks page, the new Wun Weather page.

Next:

  • a template page, to show the other default templates and

    • any personal ones people wish to share

  • a help page - similar to the readme file, and

  • any other suggestions people can think of

It's a work in progress.

Last edited by Sector11 (2014-01-28 02:09:41)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#472 2014-01-28 02:10:12

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

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

every time you save the template a new image will be downloaded
and it will count 1 towards your api key usage so be careful!!

Looks very interesting.
Does it count 1 in developer mode also?


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

#473 2014-01-28 02:13:01

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

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:

Conky PitStop in the Tips and Tricks page, the new Wun Weather page.

Next:

  • a template page, to show the other default templates and

    • any personal ones people wish to share

  • a help page - similar to the readme file, and

  • any other suggestions people can think of

It's a work in progress.

Very nice Sector11 cool


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

#474 2014-01-28 02:43:15

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

Re: Wun Weather Script for Conky (Lua)

jst_joe wrote:
mrpeachy wrote:

every time you save the template a new image will be downloaded
and it will count 1 towards your api key usage so be careful!!

Looks very interesting.
Does it count 1 in developer mode also?

yes, its a separate call to the api

Offline

Be excellent to each other!

#475 2014-01-28 02:44:28

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

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:

Conky PitStop in the Tips and Tricks page, the new Wun Weather page.

Next:

  • a template page, to show the other default templates and

    • any personal ones people wish to share

  • a help page - similar to the readme file, and

  • any other suggestions people can think of

It's a work in progress.

Huge THANK YOU!  to Sector11 for his continued support of my work and the conky world in general!
We are lucky to have you  big_smile   big_smile

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: acrobat

Debian Logo