WUN Weather Templates (en)

From Conky PitStop

Jump to: navigation, search

WUN Weather Templates

 Language   English   Français   

This is actually a Templates and HowTo combined page. There are a few tweaks required to run WUN.

NOTE: The weather images, seen in all templates here are the creative work of falldown. KUDOS falldown!

Lets look at ~/wun/wun:config.lua first

Changed line 16:

key="yourkey",-- get the Cumulus Plan or above, must be in quotes

to my api key for the Cumulus Plan I got from wunderground. You did get yours right?

Lines 70 to 74 changed:




use your <username> here, not me.  :D

You will need to change line 46 to your location as well.

In the conky files I changed lines 2 & 3 to read:

# conky -c /home/sector11/wun/conky_configs/wunrc &
# pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &


# conky -c /home/sector11/wun/conky_configs/wunrc &
# pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &

respectively. Again, your <username>, not me.

No other changes implemented at this time.

This part is optional: I run:

pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &

yes, I know it's not running, bear with me ... now I run:

conky -c /home/sector11/wun/conky_configs/wunrc &

I get an error:

Conky: llua_load: /home/sector11/wun/wun.lua:7: attempt to concatenate global 'username' (a nil value)

I hit enter, up arrow, and enter again to activate:

pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &

I do this with any conky I am working on, not just WUN. Like I said; optional.

Now, I go to ~/wun/wun.lua and comment out lines 5 & 7 and change line 11:

--username=os.getenv("USERNAME") -- line 5
--defualt path to wun folder
--pathtowun='/home/'..username..'/wun/' -- line 7
--if you want to have your wun folder in a different location
--enter the full path to the folder in quotes, for example:
pathtowun="/home/sector11/wun/" -- line 11

and tried again ... and there it is on the right.


No idea why my system doesn't accept the username=os.getenv("USERNAME")

A massive sized conky that show everything, except only 3 of the 10 days of info that WUN gets. Probably not a conky that will get used because of it's size but to look at and see it all in one place is interesting to say the least.

Now, since I'm going to be re-starting this a few times using the default templates included I want to go into Developer Mode, again in ~/wun/wun:config.lua line 15: change




Now I'll will be using the data that exists in ~/wun/backup_data and not using up precious api calls. It is 500 calls a day but has a limit per minute use and we don't want to over run those. From here on you'll see red dots: Developer Mode. Always use this mode when creating / editing a template for your personal use. It will save headaches later if wunderground cuts you off.

The free wunderground api has a usage limit, while it is unlikely that the
daily limit of 500 will be met, the minute limit of 10 is quite possible to
exceed while in Normal Mode.

Back to /wun/conky_configs/wunrc and set it to use the second template:

#lua_load ~/wun/templates/astroweather.lua #900 900
lua_load ~/wun/templates/s11template.lua #350 900
#lua_load ~/wun/templates/wun_glassy_side_bar.lua #200 900
#lua_load ~/wun/templates/classic10day.lua #600 900
#lua_load ~/wun/templates/testing/wun_testing.lua##unfinished

and change

### Minimum size of window: width height
minimum_size 350 900

### Maximum width of window
maximum_width 350

to match the template. That's it on the right


Back in the terminal, hit enter, up arrow twice to get the pkill command, then enter and up twice again to restart wunrc


Notice the beautiful red dots: Developer Mode I'm safe!

There is another purpose for those dots as well, as stated in the wun_config.lua file:

1 to force the script to use saved data and prevent downloading new data
 In developer mode all 3 indicator dots will be red

0 for normal behaviour and the following colours will apply:

The dots left to right:
1st is the update indicator
  green when script is running
  turns yellow when script is updating
2nd is the weather data indicator
  green if using current data
  yellow if using backup data once
  red if using backup data more than once
3rd is the astronomy data indicator
  green if using current data
  yellow if using backup data once
  red if using backup data more than once

Another static wunrc template, wun_glassy_side_bar.lua, all mrpreachy, and 100% LUA as well. Except for the weather images that it.

An old 10 v9000 weather template, classic10day.lua, converted to WUN by mrpeachy


Coming up ... the interactive conky: wunrci with the default template: iweather_falldown.lua

iweather_falldown.lua 1
iweather_falldown.lua 2
iweather_falldown.lua 3

This template has everything that WUN was designed to use when it was created. The LUA template uses two images: wun-bottom-glass-bg.png and wun-top-glass-bg.png, the overlapping parts are transparent where the other image has "info boxes" so they look like one image, very ingenious idea. The design and code for the template is all falldown. I'm in awe of his work. and this has become my default weather conky, after running iweather.lua (see below) for a while, thinking; this is it!

On the left is the template open to show the 10 day selection bars.

On the right the template is closed up, showing just today's current information

In the centre showing Sat 1 Feb 2014 five days into the future from the time the screenshot was taken.

Next iweather.lua - another masterful creation by falldown.

iweather.lua 1
iweather.lua 2
iweather.lua 3

Two things come to mind:

  1. the image background is semi-transparent and suitable for just about any background you can throw at it, works on everything I've used it on.
  2. it doesn't expand or contract, it's all right there. Granted it doesn't have the "text" data that the template above has. However, weather changes from day to day sometimes hour to hour so a "forecast" is just a 'guesstimate' anyway. For a full 10 day, 20 hour weather conky this one is hard to beat.

One OOPS! In ~/wun/templates/iweather.lua you need to set the path to the background image in line 68. It is noted in the conky file along with the default settings for the indicator LED's which I did not set for this exercise. However the 'first time' I ran this I didn't see it. In iweather_joe.lua they will go in the centre button on the bottom.

The oops! has been corrected. 28 Jan 2014 - It now reads:


... handy thing that "pathtowun"

I also find these settings better suited to iweather.lua: An opinion!

### Minimum size of window: width height
minimum_size 370 420

### Maximum width of window
maximum_width 370

your milage may vary.

And last but not least: iweather_joe.lua, no slouch in the design and creativity stage either. Although OOTB better it's better suited for lighter backgrounds.

iweather_joe.lua 1
iweather_joe.lua 2
iweather_joe.lua 3

Patterned after falldown's "bg.png" image, this all lua interactive conky gives testament to that layout, jst_joe took it up a step.

As I said it doesn't seem to be as background friendly as falldown's creation, favouring lighter backgrounds, but I found 'draw-bg.lua' could take care of that quite nicely.

Excellent work guys! Hot chocolate and cookies served at 6!

Go To:

Personal tools