http://conky.pitstop.free.fr/wiki/index.php5?title=Special:Contributions/Sector11&feed=atom&limit=50&target=Sector11&year=&month=Conky PitStop - User contributions [en]2024-03-28T08:56:10ZFrom Conky PitStopMediaWiki 1.16.2http://conky.pitstop.free.fr/wiki/index.php5?title=Bar-text-bar_(en)Bar-text-bar (en)2014-04-26T21:05:43Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=bar-text-bar=<br />
__NOTOC__<br />
[[Category:English]]<br />
[[Category:Fonts and text (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|bar-text-bar}}<br />
<br />
'''A complete rewrite thanks to some new tricks.'''<br />
<br />
OK so someone asked if it was possible to have:<br />
-- text here --<br />
in conky. Where the '''—''' was a solid line similar to the ${hr} command.<br />
<br />
People started by saying, ''“No, not possible.”'' I thought about it for a bit and said to myself, “Yea I can do that!”. With another trick in conky that I have already showed you in "[[Bars with text inside (en)|Bars with text inside]]".<br />
<br />
So I set out and experimented and came up with the solution. ${cpubar cpuX} where X is a cpu you do not have. ie: cpu3 for a dual-core<br />
<br />
${alignc}${cpubar cpu 5 1,30} cpubar cpuX ${cpubar cpu5 1,30}<br />
as seen in the image on the right.<br />
<br />
'''''Fast forward to April 2014 in the CrunchBang Forums'''''<br />
<br />
'''Marenbraga''' said: I plan to use a bar only as decoration, but I need it filled because of the background color. Any suggestions?<br />
<br />
Use: ${membar} with a height no greater than 1 and a width of 0, along with a creative use of font size. Good idea but requires a lot of them to make a real '''bar'''<br />
<br />
However you can even give it stripes:<br />
[[File:Bar-TXT-Bar.jpg|right|200px|thumb|Bar-TXT-Bar]]<br />
The test code that did all that:<br />
default_bar_size 0 12<br />
TEXT<br />
${time %T}${alignr}${time %x}<br />
${alignc}CPU % Usage:<br />
${alignc}1 | 2 | 3 | A<br />
${alignc}${if_match ${cpu cpu1}<10}00${cpu cpu1}\<br />
${else}${if_match ${cpu cpu1}<100}0${cpu cpu1}\<br />
${else}${color9}${cpu cpu1}${endif}${endif}\<br />
| ${if_match ${cpu cpu2}<10}00${cpu cpu2}\<br />
${else}${if_match ${cpu cpu2}<100}0${cpu cpu2}\<br />
${else}${color9}${cpu cpu2}${endif}${endif}\<br />
| ${if_match ${cpu cpu3}<10}00${cpu cpu3}\<br />
${else}${if_match ${cpu cpu3}<100}0${cpu cpu3}\<br />
${else}${color9}${cpu cpu3}${endif}${endif}\<br />
| ${if_match ${cpu cpu0}<10}00${cpu cpu0}\<br />
${else}${if_match ${cpu cpu0}<100}0${cpu cpu0}\<br />
${else}${cpu cpu0}${endif}${endif}<br />
<br />
${alignc}${cpubar cpu4 0,30} cpubar cpu4 ${cpubar cpu4 0,30}<br />
${alignc}${cpubar cpu4 1,30} cpubar cpu4 ${cpubar cpu4 1,30}<br />
<br />
${alignc}${membar 1,30} use membar ${membar 1,30}<br />
${font :size=1}${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}${font}<br />
${font :size=1}${color}${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}${color blue}<br />
${membar 1,0}<br />
${membar 1,0}${color}<br />
${membar 1,0}<br />
${membar 1,0}${color blue}<br />
${membar 1,0}<br />
${membar 1,0}${color}<br />
${membar 1,0}<br />
${membar 1,0}${color blue}<br />
${membar 1,0}<br />
${membar 1,0}${color}<br />
${membar 1,0}<br />
${membar 1,0}${font}<br />
${alignc}${membar 0,75} Conky PitStop ${membar 0,75}<br />
${membar 0,0}<br />
${alignc}${membar 1,75} Conky PitStop ${membar 1,75}<br />
${membar 1,0}<br />
${alignc}${membar 2,75} Conky PitStop ${membar 2,75}<br />
${membar 3,0}${goto 6}${color red}${membar 1,0}${color}<br />
${membar 2,0}${goto 6}${color blue}${membar 0,0}${color}<br />
${alignc}${membar 1,30} pvsage's idea ${membar 1,30}<br />
${alignc}${membar 1,30} use execbar ${membar 1,30}<br />
20 ${execbar echo 20}<br />
40 ${execbar echo 40}${goto 150}${voffset -1}${color5}pvsage's idea${color}${voffset 1}<br />
60 ${execbar echo 60}<br />
80 ${execbar echo 80}<br />
100 ${execbar echo 100}${goto 50}${voffset -1}${color 000000}pvsage's idea${color}${voffset 1}<br />
${execbar echo 100}${goto 50}${voffset -1}${color 000000}pvsage's idea${color}${voffset 1}<br />
<br />
<br />
<br />
<br />
${alignc}${membar 1,30} pvsage expanded idea ${membar 1,30}<br />
${execbar echo 10}${goto 10}${voffset -1}${color 000000}${cpu}${color}${goto 40}Avg: ${voffset 1}${cpubar cpu0 12}<br />
${execbar echo 10}${goto 10}${voffset -1}${color 000000}${cpu cpu1}${color}${goto 40} 1: ${voffset 1}${cpubar cpu1 12}<br />
${execbar echo 10}${goto 10}${voffset -1}${color 000000}${cpu cpu2}${color}${goto 40} 2: ${voffset 1}${cpubar cpu2 12}<br />
${execbar echo 10}${goto 10}${voffset -1}${color 000000}${cpu cpu3}${color}${goto 40} 3: ${voffset 1}${cpubar cpu3 12}<br />
<br />
${hr 10}${goto 20}${voffset 2}${color 000000}and great one too!${color}${voffset -2}<br />
<br />
${hr}<br />
${font woodbadge:size=20}${alignc}${color chocolate}Conky${color}${font}<br />
${color yellow}${voffset -15}${membar 3,70}${alignr 2}${membar 3,70}${color}${voffset 15}<br />
${color red}${voffset -29}${membar 1,70}${alignr 2}${membar 1,70}${color}${voffset 15}<br />
${font woodbadge:size=20}${alignc}${color chocolate}PitStop${color}${font}<br />
${color yellow}${voffset -15}${membar 3,70}${alignr 2}${membar 3,70}${color}${voffset 15}<br />
${color red}${voffset -29}${membar 1,70}${alignr 2}${membar 1,70}${color}${voffset 15}<br />
${hr}<br />
<br />
${alignc}${font woodbadge:size=20}Conky${font}<br />
${font woodbadge:size=20}${alignc}Conky${font}<br />
<br />
'''pvsage said'''<br />
Another way to do it:<br />
1. Above the TEXT area, set a default bar size, e.g. "default_bar_size 50 7" is 50 pixels long, 7 pixels high.<br />
2. Where you want the solid bar, use ${execbar echo 100}<br />
and I tested and found that:<br />
default_bar_size 0 7<br />
TEXT<br />
${execbar echo 100}<br />
created a bar as wide as the conky window with a height of 7<br />
<br />
'''''AWESOME! KUDOS to pvsage.'''''<br />
<br />
Now while ''default_bar_size 0 2'' is more or less the same as '''${hr 2}''' ''default_bar_size 50 12'' isn't.<br />
default_bar_size 50 12<br />
TEXT<br />
${alignc}${execbar echo 100}${voffset -1} by pvsage ${voffset 1}${execbar echo 100}<br />
${alignc}${execbar echo 100}${voffset -1} 50 12 ${voffset 1}${execbar echo 100}<br />
<br />
Where this differs from ${membar} is ${execbar} does not take height/width parameters only the the default_bar_size can modify it's appearence<br />
<br />
[[image:50-12.jpg|center|50-12]]<br />
<br />
The last two lines in that code:<br />
${alignc}${font woodbadge:size=20}Conky${font}<br />
${font woodbadge:size=20}${alignc}Conky${font}<br />
are simply to show, when you use a font and size different to the default font, in this case:<br />
use_xft yes<br />
xftfont monofur:bold:size=10<br />
it does matter where you put the ${alignc}</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=Bar-text-bar_(en)Bar-text-bar (en)2014-04-26T20:23:21Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=bar-text-bar=<br />
__NOTOC__<br />
[[Category:English]]<br />
[[Category:Fonts and text (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|bar-text-bar}}<br />
<br />
'''A complete rewrite thanks to some new tricks.'''<br />
<br />
OK so someone asked if it was possible to have:<br />
-- text here --<br />
in conky. Where the '''—''' was a solid line similar to the ${hr} command.<br />
<br />
People started by saying, ''“No, not possible.”'' I thought about it for a bit and said to myself, “Yea I can do that!”. With another trick in conky that I have already showed you in "[[Bars with text inside (en)|Bars with text inside]]".<br />
<br />
So I set out and experimented and came up with the solution. ${cpubar cpuX} where X is a cpu you do not have. ie: cpu3 for a dual-core<br />
<br />
${alignc}${cpubar cpu 5 1,30} cpubar cpuX ${cpubar cpu5 1,30}<br />
as seen in the image on the right.<br />
<br />
'''''Fast forward to April 2014 in the CrunchBang Forums'''''<br />
<br />
'''Marenbraga''' said: I plan to use a bar only as decoration, but I need it filled because of the background color. Any suggestions?<br />
<br />
Use: ${membar} with a height no greater than 1 and a width of 0, along with a creative use of font size. Good idea but requires a lot of them to make a real '''bar'''<br />
<br />
However you can even give it stripes:<br />
[[File:Bar-TXT-Bar.jpg|right|200px|thumb|Bar-TXT-Bar]]<br />
The test code that did all that:<br />
default_bar_size 0 12<br />
TEXT<br />
${time %T}${alignr}${time %x}<br />
${alignc}CPU % Usage:<br />
${alignc}1 | 2 | 3 | A<br />
${alignc}${if_match ${cpu cpu1}<10}00${cpu cpu1}\<br />
${else}${if_match ${cpu cpu1}<100}0${cpu cpu1}\<br />
${else}${color9}${cpu cpu1}${endif}${endif}\<br />
| ${if_match ${cpu cpu2}<10}00${cpu cpu2}\<br />
${else}${if_match ${cpu cpu2}<100}0${cpu cpu2}\<br />
${else}${color9}${cpu cpu2}${endif}${endif}\<br />
| ${if_match ${cpu cpu3}<10}00${cpu cpu3}\<br />
${else}${if_match ${cpu cpu3}<100}0${cpu cpu3}\<br />
${else}${color9}${cpu cpu3}${endif}${endif}\<br />
| ${if_match ${cpu cpu0}<10}00${cpu cpu0}\<br />
${else}${if_match ${cpu cpu0}<100}0${cpu cpu0}\<br />
${else}${cpu cpu0}${endif}${endif}<br />
<br />
${alignc}${cpubar cpu4 0,30} cpubar cpu4 ${cpubar cpu4 0,30}<br />
${alignc}${cpubar cpu4 1,30} cpubar cpu4 ${cpubar cpu4 1,30}<br />
<br />
${alignc}${membar 1,30} use membar ${membar 1,30}<br />
${font :size=1}${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}${font}<br />
${font :size=1}${color}${membar 1,0}<br />
${membar 1,0}<br />
${membar 1,0}${color blue}<br />
${membar 1,0}<br />
${membar 1,0}${color}<br />
${membar 1,0}<br />
${membar 1,0}${color blue}<br />
${membar 1,0}<br />
${membar 1,0}${color}<br />
${membar 1,0}<br />
${membar 1,0}${color blue}<br />
${membar 1,0}<br />
${membar 1,0}${color}<br />
${membar 1,0}<br />
${membar 1,0}${font}<br />
${alignc}${membar 0,75} Conky PitStop ${membar 0,75}<br />
${membar 0,0}<br />
${alignc}${membar 1,75} Conky PitStop ${membar 1,75}<br />
${membar 1,0}<br />
${alignc}${membar 2,75} Conky PitStop ${membar 2,75}<br />
${membar 3,0}${goto 6}${color red}${membar 1,0}${color}<br />
${membar 2,0}${goto 6}${color blue}${membar 0,0}${color}<br />
${alignc}${membar 1,30} pvsage's idea ${membar 1,30}<br />
${alignc}${membar 1,30} use execbar ${membar 1,30}<br />
20 ${execbar echo 20}<br />
40 ${execbar echo 40}${goto 150}${voffset -1}${color5}pvsage's idea${color}${voffset 1}<br />
60 ${execbar echo 60}<br />
80 ${execbar echo 80}<br />
100 ${execbar echo 100}${goto 50}${voffset -1}${color 000000}pvsage's idea${color}${voffset 1}<br />
${execbar echo 100}${goto 50}${voffset -1}${color 000000}pvsage's idea${color}${voffset 1}<br />
<br />
<br />
<br />
<br />
${alignc}${membar 1,30} pvsage expanded idea ${membar 1,30}<br />
${execbar echo 10}${goto 10}${voffset -1}${color 000000}${cpu}${color}${goto 40}Avg: ${voffset 1}${cpubar cpu0 12}<br />
${execbar echo 10}${goto 10}${voffset -1}${color 000000}${cpu cpu1}${color}${goto 40} 1: ${voffset 1}${cpubar cpu1 12}<br />
${execbar echo 10}${goto 10}${voffset -1}${color 000000}${cpu cpu2}${color}${goto 40} 2: ${voffset 1}${cpubar cpu2 12}<br />
${execbar echo 10}${goto 10}${voffset -1}${color 000000}${cpu cpu3}${color}${goto 40} 3: ${voffset 1}${cpubar cpu3 12}<br />
<br />
${hr 10}${goto 20}${voffset 2}${color 000000}and great one too!${color}${voffset -2}<br />
<br />
${hr}<br />
${font woodbadge:size=20}${alignc}${color chocolate}Conky${color}${font}<br />
${color yellow}${voffset -15}${membar 3,70}${alignr 2}${membar 3,70}${color}${voffset 15}<br />
${color red}${voffset -29}${membar 1,70}${alignr 2}${membar 1,70}${color}${voffset 15}<br />
${font woodbadge:size=20}${alignc}${color chocolate}PitStop${color}${font}<br />
${color yellow}${voffset -15}${membar 3,70}${alignr 2}${membar 3,70}${color}${voffset 15}<br />
${color red}${voffset -29}${membar 1,70}${alignr 2}${membar 1,70}${color}${voffset 15}<br />
${hr}<br />
<br />
${alignc}${font woodbadge:size=20}Conky${font}<br />
${font woodbadge:size=20}${alignc}Conky${font}<br />
<br />
'''pvsage said'''<br />
Another way to do it:<br />
1. Above the TEXT area, set a default bar size, e.g. "default_bar_size 50 7" is 50 pixels long, 7 pixels high.<br />
2. Where you want the solid bar, use ${execbar echo 100}<br />
50-12.jpg<br />
and I tested and found that:<br />
default_bar_size 0 7<br />
TEXT<br />
${execbar echo 100}<br />
created a bar as wide as the conky window and a height of 7<br />
<br />
AWESOME! KUDOS to pvsage.<br />
<br />
Now while ''default_bar_size 0 2'' is more or less the same as '''${hr 2}''' ''default_bar_size 50 12'' isn't.<br />
default_bar_size 50 12<br />
TEXT<br />
${alignc}${execbar echo 100}${voffset -1} by pvsage ${voffset 1}${execbar echo 100}<br />
${alignc}${execbar echo 100}${voffset -1} 50 12 ${voffset 1}${execbar echo 100}<br />
<br />
Where this differs from ${membar} is ${execbar} does not take height/width parameters only the the default_bar_size can modify it's appearence<br />
<br />
[[image:50-12.jpg|center|50-12]]<br />
<br />
The last two lines in that code:<br />
${alignc}${font woodbadge:size=20}Conky${font}<br />
${font woodbadge:size=20}${alignc}Conky${font}<br />
are simply to show, when you use a font and size different to the default font, in this case:<br />
use_xft yes<br />
xftfont monofur:bold:size=10<br />
it does matter where you put the ${alignc}</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Bar-TXT-Bar.jpgFile:Bar-TXT-Bar.jpg2014-04-26T20:04:31Z<p>Sector11: uploaded a new version of &quot;File:Bar-TXT-Bar.jpg&quot;</p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Bar-TXT-Bar.jpgFile:Bar-TXT-Bar.jpg2014-04-26T19:44:38Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:50-12.jpgFile:50-12.jpg2014-04-26T19:05:31Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=Bar-text-bar_(en)Bar-text-bar (en)2014-04-26T17:50:05Z<p>Sector11: /* Step 3 */</p>
<hr />
<div>__NOTITLE__<br />
=bar-text-bar=<br />
__NOTOC__<br />
[[Category:English]]<br />
[[Category:Fonts and text (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|bar-text-bar}}<br />
<br />
<center>'''WARNING:''' ''If you are using conky v1.8+ this may not work!''<br><br />
''It works with #! Statler - Conky v1.8.0 Debian: Squeeze''</center><br />
<br />
OK so someone asked if it was possible to have:<br />
<br />
'''-- text here --'''<br />
<br />
in conky. Where the '''—''' was a solid line similar to the ${hr} command.<br />
<br />
People started by saying, ''“No, not possible.”'' I thought about it for a bit and said to myself, “Yea I can do that!”. With another trick in conky that I have already showed you in "[[Bars with text inside (en)|Bars with text inside]]".<br />
<br />
So I set out and experimented and came up with the solution.<br />
<br />
===Step 1===<br />
<br />
[[Image:text-here-1.png|center]] <br />
<br />
Default text for this conky is: '''font Zekton:size=15'''. I’m actually using my ''“conkyemail”'' which is ''alignment tm'' so that is where the width comes from.<br />
<br />
You have a title you want to use: System, Temperatures, Music, Weather, whatever. You used ${alignc} or a ${goto xx} command to get it where you want it. We’ll use '''CONKY''' for this example with the woodbadge font, as seen to the left.<br />
<br />
${hr}<br />
${goto 95}${font woodbadge:size=20}${color2}Conky${color}${font}<br />
${hr}<br />
<br />
===Step 2===<br />
<br />
[[Image:text-here-2.png|center]]<br />
<br />
Now you want to “spruce” it up a bit, by adding lines before and after it. It’s easy with the same method used in '''"[[Bars with text inside (en)|Bars with text]]"''' by using ${membar}<br />
<br />
Now we need to add the code for those “lines” to appear. using the ${membar} command. You’ll need two of them:<br />
<br />
${hr}<br />
${goto 93}${font woodbadge:size=20}${color2}Conky${color}${font}<br />
${membar 1,70}${alignr 2}${membar 1,70}<br />
${hr}<br />
<br />
===Step 3===<br />
<br />
[[Image:text-here-3.png|center]]<br />
<br />
Set the “height” to 1 to create the “bar” and 70 for the length. Yours will vary (40, 60 100) depending of the width of your conky display, the text you use and the font. Seems like “spacing” is everywhere in conky. :) I also use (always) ${alignr 2) to bring the output 2 pixels back from the right edge. If it’s a calculated output that changes values it can cause flickering, if it’s “on the edge” and nobody likes a flickering conky, well, nobody I know.<br />
<br />
OK, there’s the bars, now to add ${voffset -xx}, negative xx to move up, until it’s right where you want it.<br />
<br />
${hr}<br />
${goto 93}${font woodbadge:size=20}${color2}Conky${color}${font}<br />
${voffset -25}${membar 1,70}${alignr 2}${membar 1,70}<br />
${hr}<br />
<br />
See, just like I said, “I can do that.” (I was using a conky version pre v1.8) Now lets go a bit further. Personalize it a bit.<br />
<br />
===Step 4===<br />
<br />
[[Image:text-here-4.png|center]]<br />
<br />
I chose yellow, to match close to the colour of CONKY. “NOT close.” you say. AHHH, but I’m not finished. We are going to “outline” those lines with RED<br />
<br />
To do that copy the line you have producing the “lines” and change the color to “red”, and a ${voffset} to '''-0''' for the moment and change the CPU numbers, I’m using 5 & 6.<br />
<br />
${hr}<br />
${goto 93}${font woodbadge:size=20}${color2}Conky${color}${font}<br />
${color yellow}${voffset -25}${cpubar cpu3 1,70}${alignr 2}${cpubar cpu4 1,70}${color}<br />
${color red}${voffset -0}${cpubar cpu5 1,70}${alignr 2}${cpubar cpu6 1,70}${color}<br />
${hr}<br />
<br />
===Step 5===<br />
<br />
[[Image:text-here-5.png|center]]<br />
<br />
If you’ve done everything right it should look like the image in the left. Now we have to give RED lines height to outline the YELLOW lines. So change the height to: 4. If you think about it, the top of the CPUBAR is 1 and the bottom is 2, so to have something “around” it you need 2 empty spaces between the top and bottom and x-2=2 is 4-2=2. Simple math.<br />
<br />
${hr}<br />
${goto 93}${font woodbadge:size=20}${color2}Conky${color}${font}<br />
${color yellow}${voffset -25}${cpubar cpu3 1,70}${alignr 2}${cpubar cpu4 1,70}${color}<br />
${color red}${voffset -0}${cpubar cpu5 4,70}${alignr 2}${cpubar cpu6 4,70}${color}<br />
${hr}<br />
<br />
===Step 6===<br />
<br />
It’s time to play with that ${voffset -0} value, your will vary obviously, mine comes it at ${voffset -27}<br />
<br />
${hr}<br />
${goto 93}${font woodbadge:size=20}${color2}Conky${color}${font}<br />
${color yellow}${voffset -25}${cpubar cpu3 1,70}${alignr 2}${cpubar cpu4 1,70}${color}<br />
${color red}${voffset -27}${cpubar cpu5 4,70}${alignr 2}${cpubar cpu6 4,70}${color}<br />
${hr}<br />
<br />
[[Image:text-here-6.png|center]]<br />
<br />
And that final code produces the broken ${hr} effect that the user asked about.<br />
<br />
Something conky, earlier than v1.8+, can --'''not'''-- do!<br />
<br />
Happy conkying<br />
Bruce<br />
<br />
<center>'''WARNING:''' ''If you are using conky v1.8+ this may not work!''</center><br />
<br />
===Step 7===<br />
<br />
Well, I assume that it depends on the OS used and maybe what is compiled into Conky because this works on my CrunchBang 10 Statler (based on Debian) with conky v1.8.0<br />
<br />
[[Image:Text-here-7.png|center|thumb|250px]]<br />
<br />
Here is my section after-TEXT:<br />
<br />
TEXT<br />
${goto 80}${font woodbadge:size=20}${color5}Sector11${color}${font}<br />
${voffset -23}${cpubar cpu2 5,70}${goto 210}${cpubar cpu2 5,70}<br />
${voffset -17}${goto 2}${color9}${cpubar cpu2 1,66}${goto 212}${cpubar cpu2 1,66}${color}<br />
<br />
or the full code, if you want it :<br />
<br />
# To use #! in a conky use: ${exec echo '#!'}<br />
background no<br />
own_window yes<br />
own_window_type override #normal<br />
own_window_transparent yes #yes<br />
own_window_hints skip_taskbar,skip_pager<br />
own_window_title test<br />
use_xft yes<br />
#xftfont terminus:bold:size=8<br />
xftfont DejaVu Sans Mono:size=10<br />
xftalpha 1.0 #0.2<br />
override_utf8_locale yes<br />
update_interval 5<br />
total_run_times 0<br />
double_buffer yes<br />
no_buffers yes<br />
cpu_avg_samples 2<br />
net_avg_samples 2<br />
use_spacer none<br />
draw_shades no<br />
draw_outline no<br />
draw_borders no<br />
draw_graph_borders no<br />
uppercase no<br />
imlib_cache_size 0 <br />
<br />
# Colors<br />
default_color DCDCDC<br />
color0 FFD700<br />
color1 FFA07A<br />
color2 FF8C00<br />
color3 7FFF00<br />
color4 778899<br />
color5 FFDEAD<br />
color6 00BFFF<br />
color7 48D1CC<br />
color8 FFFF00<br />
color9 FF0000 <br />
<br />
text_buffer_size 256 # 256 is the minimum<br />
short_units yes<br />
pad_percents 2<br />
<br />
#maximum_width 1280<br />
#minimum_size 500 110 # width, height<br />
alignment tl<br />
gap_x 20 # left-right<br />
gap_y 20 # up-down<br />
border_inner_margin 0<br />
border_outer_margin 0 <br />
<br />
TEXT<br />
${goto 80}${font woodbadge:size=20}${color5}Sector11${color}${font}<br />
${voffset -23}${cpubar cpu2 5,70}${goto 210}${cpubar cpu2 5,70}<br />
${voffset -17}${goto 2}${color9}${cpubar cpu2 1,66}${goto 212}${cpubar cpu2 1,66}${color}</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=Bar-text-bar_(en)Bar-text-bar (en)2014-04-26T17:39:08Z<p>Sector11: /* Step 2 */</p>
<hr />
<div>__NOTITLE__<br />
=bar-text-bar=<br />
__NOTOC__<br />
[[Category:English]]<br />
[[Category:Fonts and text (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|bar-text-bar}}<br />
<br />
<center>'''WARNING:''' ''If you are using conky v1.8+ this may not work!''<br><br />
''It works with #! Statler - Conky v1.8.0 Debian: Squeeze''</center><br />
<br />
OK so someone asked if it was possible to have:<br />
<br />
'''-- text here --'''<br />
<br />
in conky. Where the '''—''' was a solid line similar to the ${hr} command.<br />
<br />
People started by saying, ''“No, not possible.”'' I thought about it for a bit and said to myself, “Yea I can do that!”. With another trick in conky that I have already showed you in "[[Bars with text inside (en)|Bars with text inside]]".<br />
<br />
So I set out and experimented and came up with the solution.<br />
<br />
===Step 1===<br />
<br />
[[Image:text-here-1.png|center]] <br />
<br />
Default text for this conky is: '''font Zekton:size=15'''. I’m actually using my ''“conkyemail”'' which is ''alignment tm'' so that is where the width comes from.<br />
<br />
You have a title you want to use: System, Temperatures, Music, Weather, whatever. You used ${alignc} or a ${goto xx} command to get it where you want it. We’ll use '''CONKY''' for this example with the woodbadge font, as seen to the left.<br />
<br />
${hr}<br />
${goto 95}${font woodbadge:size=20}${color2}Conky${color}${font}<br />
${hr}<br />
<br />
===Step 2===<br />
<br />
[[Image:text-here-2.png|center]]<br />
<br />
Now you want to “spruce” it up a bit, by adding lines before and after it. It’s easy with the same method used in '''"[[Bars with text inside (en)|Bars with text]]"''' by using ${membar}<br />
<br />
Now we need to add the code for those “lines” to appear. using the ${membar} command. You’ll need two of them:<br />
<br />
${hr}<br />
${goto 93}${font woodbadge:size=20}${color2}Conky${color}${font}<br />
${membar 1,70}${alignr 2}${membar 1,70}<br />
${hr}<br />
<br />
===Step 3===<br />
<br />
[[Image:text-here-3.png|center]]<br />
<br />
Set the “height” to 1 to create the “bar” and 70 for the length. Yours will vary (40, 60 100) depending of the width of your conky display, the text you use and the font. Seems like “spacing” is everywhere in conky. :) I also use (always) ${alignr 2) to bring the output 2 pixels back from the right edge. If it’s a calculated output that changes values it can cause flickering, if it’s “on the edge” and nobody likes a flickering conky, well, nobody I know.<br />
<br />
OK, there’s the bars, now to add ${voffset -xx}, negative xx to move up, until it’s right where you want it.<br />
<br />
${hr}<br />
${goto 93}${font woodbadge:size=20}${color2}Conky${color}${font}<br />
${voffset -25}${cpubar cpu3 1,70}${alignr 2}${cpubar cpu4 1,70}<br />
${hr}<br />
<br />
See, just like I said, “I can do that.” (I was using a conky version pre v1.8) Now lets go a bit further. Personalize it a bit.<br />
<br />
===Step 4===<br />
<br />
[[Image:text-here-4.png|center]]<br />
<br />
I chose yellow, to match close to the colour of CONKY. “NOT close.” you say. AHHH, but I’m not finished. We are going to “outline” those lines with RED<br />
<br />
To do that copy the line you have producing the “lines” and change the color to “red”, and a ${voffset} to '''-0''' for the moment and change the CPU numbers, I’m using 5 & 6.<br />
<br />
${hr}<br />
${goto 93}${font woodbadge:size=20}${color2}Conky${color}${font}<br />
${color yellow}${voffset -25}${cpubar cpu3 1,70}${alignr 2}${cpubar cpu4 1,70}${color}<br />
${color red}${voffset -0}${cpubar cpu5 1,70}${alignr 2}${cpubar cpu6 1,70}${color}<br />
${hr}<br />
<br />
===Step 5===<br />
<br />
[[Image:text-here-5.png|center]]<br />
<br />
If you’ve done everything right it should look like the image in the left. Now we have to give RED lines height to outline the YELLOW lines. So change the height to: 4. If you think about it, the top of the CPUBAR is 1 and the bottom is 2, so to have something “around” it you need 2 empty spaces between the top and bottom and x-2=2 is 4-2=2. Simple math.<br />
<br />
${hr}<br />
${goto 93}${font woodbadge:size=20}${color2}Conky${color}${font}<br />
${color yellow}${voffset -25}${cpubar cpu3 1,70}${alignr 2}${cpubar cpu4 1,70}${color}<br />
${color red}${voffset -0}${cpubar cpu5 4,70}${alignr 2}${cpubar cpu6 4,70}${color}<br />
${hr}<br />
<br />
===Step 6===<br />
<br />
It’s time to play with that ${voffset -0} value, your will vary obviously, mine comes it at ${voffset -27}<br />
<br />
${hr}<br />
${goto 93}${font woodbadge:size=20}${color2}Conky${color}${font}<br />
${color yellow}${voffset -25}${cpubar cpu3 1,70}${alignr 2}${cpubar cpu4 1,70}${color}<br />
${color red}${voffset -27}${cpubar cpu5 4,70}${alignr 2}${cpubar cpu6 4,70}${color}<br />
${hr}<br />
<br />
[[Image:text-here-6.png|center]]<br />
<br />
And that final code produces the broken ${hr} effect that the user asked about.<br />
<br />
Something conky, earlier than v1.8+, can --'''not'''-- do!<br />
<br />
Happy conkying<br />
Bruce<br />
<br />
<center>'''WARNING:''' ''If you are using conky v1.8+ this may not work!''</center><br />
<br />
===Step 7===<br />
<br />
Well, I assume that it depends on the OS used and maybe what is compiled into Conky because this works on my CrunchBang 10 Statler (based on Debian) with conky v1.8.0<br />
<br />
[[Image:Text-here-7.png|center|thumb|250px]]<br />
<br />
Here is my section after-TEXT:<br />
<br />
TEXT<br />
${goto 80}${font woodbadge:size=20}${color5}Sector11${color}${font}<br />
${voffset -23}${cpubar cpu2 5,70}${goto 210}${cpubar cpu2 5,70}<br />
${voffset -17}${goto 2}${color9}${cpubar cpu2 1,66}${goto 212}${cpubar cpu2 1,66}${color}<br />
<br />
or the full code, if you want it :<br />
<br />
# To use #! in a conky use: ${exec echo '#!'}<br />
background no<br />
own_window yes<br />
own_window_type override #normal<br />
own_window_transparent yes #yes<br />
own_window_hints skip_taskbar,skip_pager<br />
own_window_title test<br />
use_xft yes<br />
#xftfont terminus:bold:size=8<br />
xftfont DejaVu Sans Mono:size=10<br />
xftalpha 1.0 #0.2<br />
override_utf8_locale yes<br />
update_interval 5<br />
total_run_times 0<br />
double_buffer yes<br />
no_buffers yes<br />
cpu_avg_samples 2<br />
net_avg_samples 2<br />
use_spacer none<br />
draw_shades no<br />
draw_outline no<br />
draw_borders no<br />
draw_graph_borders no<br />
uppercase no<br />
imlib_cache_size 0 <br />
<br />
# Colors<br />
default_color DCDCDC<br />
color0 FFD700<br />
color1 FFA07A<br />
color2 FF8C00<br />
color3 7FFF00<br />
color4 778899<br />
color5 FFDEAD<br />
color6 00BFFF<br />
color7 48D1CC<br />
color8 FFFF00<br />
color9 FF0000 <br />
<br />
text_buffer_size 256 # 256 is the minimum<br />
short_units yes<br />
pad_percents 2<br />
<br />
#maximum_width 1280<br />
#minimum_size 500 110 # width, height<br />
alignment tl<br />
gap_x 20 # left-right<br />
gap_y 20 # up-down<br />
border_inner_margin 0<br />
border_outer_margin 0 <br />
<br />
TEXT<br />
${goto 80}${font woodbadge:size=20}${color5}Sector11${color}${font}<br />
${voffset -23}${cpubar cpu2 5,70}${goto 210}${cpubar cpu2 5,70}<br />
${voffset -17}${goto 2}${color9}${cpubar cpu2 1,66}${goto 212}${cpubar cpu2 1,66}${color}</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=Conky_Setup_Guide_(en)Conky Setup Guide (en)2014-03-28T16:21:26Z<p>Sector11: /* Setting Up A Conky */</p>
<hr />
<div>__NOTITLE__<br />
= Conky Setup Guide =<br />
[[Category:English]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|Conky Setup Guide}}<br />
<br />
'''For: Debian based systems.'''<br>''With a touch of OpenSUSE!''<br />
<br />
== Chapter I ==<br />
=== Setting Up A Conky === <br />
<br />
'''CONKY''' – Since its original conception, Conky has changed a fair bit from its predecessor. Conky can display just about anything, either on your root desktop or in its own window. Conky has many built-in objects, as well as the ability to execute programs and scripts, then display the output from stdout.<br />
<br />
First you need the file “conky” and I’d suggest you look at curl, lm-sensors and hddtemp as well, described below. You may as well get them now, I’ll bet you will in the future if you don’t:<br />
<br />
'''Debian based distros:'''<br />
sudo apt-get install conky<br />
'''OpenSUSE:'''<br />
[http://software.opensuse.org/search Get it]<br />
Choose your OS version.<br />
Search for: 1. conky, 2. curl, 3. hddtemp. 4. conkyForecast<br />
Set search options: [X] Include users' home projects [X] Exclude debug packages<br />
Unfortunately I did not see lm-sensors there.<br />
<br />
<br />
'''curl''' – Get a file from an HTTP, HTTPS or FTP server<br />
<br />
curl is a client to get files from servers using any of the supported protocols. The command is designed to work without user interaction or any kind of interactivity.<br />
<br />
curl offers a busload of useful tricks like proxy support, user authentication, ftp upload, HTTP post, file transfer resume and more.<br />
<br />
<br />
'''lm-sensors''' – utilities to read temperature/voltage/fan sensors<br />
<br />
Lm-sensors is a hardware health monitoring package for Linux. It allows you to access information from temperature, voltage, and fan speed sensors. It works with most newer systems.<br />
<br />
This package contains programs to help you set up and read data from lm-sensors.<br />
<br />
Visit the [*http:''www.lm-sensors.org/" lm-sensors Homepage]<br />
<br />
<br />
'''hddtemp''' – hard drive temperature monitoring utility<br />
<br />
The hddtemp program monitors and reports the temperature of PATA, SATA or SCSI hard drives by reading Self-Monitoring Analysis and Reporting Technology (S.M.A.R.T.) information on drives that support this feature.<br />
<br />
Setting up hddtemp - a little help from Crinos512:<br />
sudo chmod u+s /usr/sbin/hddtemp<br />
<br />
To reconfigure hddtemp<br />
sudo dpkg-reconfigure hddtemp<br />
'''Answers: No, 0, Yes, OK, OK'''<br />
<br />
Now use the conky hddtemp: without -n<br />
${hddtemp /dev/sda}°<br />
<br />
If you want all four, it’s easy, in Terminal :<br />
<br />
sudo apt-get install conky curl lm-sensors hddtemp<br />
<br />
OK, so you have the file(s).<br />
<br />
Now to use conky, open a terminal and type:<br />
<br />
conky<br />
<br />
and you’ll see a little window open and display a basic conky. That’s the default conky found in: ''/etc/conky/conky.conf''<br />
<br />
But you want it on your desktop all the time and customized for your system, not in a pop-up window.<br />
<br />
I’m going to be using gedit, you may have mousepad or kate. I use Xfce, but have gedit installed because I open multiple files in a tabbed environment. I’m also suggesting a directory and file names, one is hidden, use whatever you like, I’m using my setup here as an example only.<br />
<br />
=== Step 1 – Create a conky ===<br />
<br />
* Create a directory in /home called /Conky<br />
* Create an empty file called; conkymain:<br />
geany ~/Conky/conkymain<br />
''geany or any text editor of your choice! I use geany''<br />
<br />
* Paste a conky file from one of the posts in the threads above that you like into that empty file and save it.<br />
<br />
Believe it or not that’s it, you now have a working (maybe not configured correctly) conky.<br />
<br />
In terminal type (the -c is telling conky to load and run the file that follows):<br />
conky -c ~/Conky/conkymain<br />
<br />
and you’ll see it, it may not be perfect for your setup, that’s why I suggest you go to the threads mentioned above or even the default file: ''/etc/conky/conky.conf''<br />
<br />
The point is, you now have a working conky.<br />
<br />
=== Step 2 – Setting up conky to autostart on boot ===<br />
1. Create a hidden file ~/.ssc.sh<br />
<br />
geany ~/.ssc.sh<br />
<br />
* In this empty file paste the following, and save it:<br />
<br />
<pre><br />
#!/bin/sh<br />
# click to start, click to stop<br />
<br />
if pidof conky | grep [0-9] > /dev/null<br />
then<br />
exec killall conky<br />
else<br />
#sleep 30 # sleep not required for xfce on startup - 30 or more for others<br />
conky -c ~/Conky/conkymain &<br />
#conky -c ~/Conky/conkyforecast &<br />
exit<br />
fi<br />
</pre><br />
<br />
If you are using Gnome or KDE you’ll need to change sleep 0 to sleep 20 or better, depending on your system. This gives your desktop (Metacity, Compiz, etc.) time to load itself and not over write an existing conky. The start conky command will be delayed by that time and not start until after your desktop is running.<br />
<br />
I left an extra line in there (commented out: #conky -c ~/Conky/conkyforecast &) for future reference if you ever want to run more than one conky. That’s why I’m suggesting the ~/.ssc.sh here. Once you start with conky, in my opinion, it’s addictive and you may want more than one running. This way you are prepared.<br />
<br />
Now you must make ~/.ssc.sh executable. There are two methods:<br />
<br />
Terminal:<br />
chmod a+x ~/.ssc.sh<br />
<br />
File Manager:<br />
Right click on ~/.ssc.sh > Properties > Permissions > check the box necessary to make it executable.<br />
<br />
OK, so now you have conkymain working and a way to start it and a second one for future reference inside your ~/.ssc.sh file.<br />
<br />
Getting Ubuntu to Autostart conky.<br />
<br />
In Ubuntu:<br />
<br />
* System -> Preferences -> Sessions -> Startup Programs<br />
* Click on the ADD button:<br />
<br />
In Xubuntu:<br />
<br />
* Applications > Settings > Settings Manager > Autostarted Apps<br />
* Click on the ADD button:<br />
<br />
Continuing in Ubuntu and Xubuntu:<br />
<br />
* Name: Conky <<– anything you want<br />
* Description: <<— anything you want (mine is blank)<br />
* Command: <<– see the “Open Icon” click on that. When your home folder shows, right click to show hidden files if not visible … and find the hidden file: .ssc.sh … highlight it and click [ OK ].<br />
* Close<br />
* Now: [Ctrl]+[Alt]+[Backspace] to restart your session and conky will start in xx seconds, depending on your sleep command.<br />
<br />
NOTE: Create a launcher like you would for any other program on your desktop or panel to start/stop conky when you want.<br />
<br />
In Kubuntu<br />
<br />
I am NOT a KDE user and have never seen it but Crinos512 has come up with an easy way to do this in KDE:<br />
<br />
As I promised I have come by to help out on autostarting conky in KDE 4. It actually is just as easy as under Gnome, make your startconky script and make it executable…. as before. Then in the Kick Off panel, click the big blue K, select the Computer tab and then System Settings. In the system settings App select the Advanced Tab and then AutoStart in the top section. Click “Add Script” and browse to your ssc.sh script. Close system settings, you are done.<br />
<br />
Well, that looks easy, Thank you Crinos512. Don’t forget to thank him if you need it.<br />
<br />
Here’s another one for KDE users by Ng Oon-Ee, http://ubuntuforums.org/showpost.php?p=6809184&postcount=29 for those times when:<br />
<br />
* If login time takes unusually long somehow (increased startup programs or low battery situation) the time may not be enough<br />
* When relogging-in without shutdown, the delay is much much longer than needed.<br />
<br />
<pre><br />
#! /bin/bash<br />
until [ "$done" = "true" ]<br />
do<br />
if [ $(dbus-send --print-reply --type=method_call --dest=org.freedesktop.compiz /org/freedesktop/compiz/dbus/screen0 org.freedesktop.compiz.list | wc -l) != 0 ]<br />
then<br />
DISPLAY=:0.0 conky -c /home/symlinked/Conky/conkymain &gt;/dev/null 2&gt;&amp;1 &amp;<br />
DISPLAY=:0.0 conky -c /home/symlinked/Conky/conkyclock &gt;/dev/null 2&gt;&amp;1 &amp;<br />
DISPLAY=:0.1 conky -c /home/symlinked/Conky/conkymain &gt;/dev/null 2&gt;&amp;1 &amp;<br />
done="true";<br />
else<br />
echo "CONKY IS WAITING"<br />
done="false"<br />
sleep 5;<br />
fi<br />
done<br />
exit 0<br />
</pre><br />
<br />
Obviously, some changes will be needed for your system<br />
<br />
Again, Thank you Ng Oon-Ee for your support, and if you find it useful, don’t forget to thank him.<br />
<br />
== Chapter II ==<br />
===A Multiple Conky Setup===<br />
<br />
Ok, you have your conky set up, you’ve configured it the way you want it’s working properly for your system.<br />
<br />
Now you want to put a second conky on your desktop, for example: weather. If you followed the example above you have a ~/.ssc.sh file with a second entry commented out, called conkyforecast. Uncomment those lines and you are ready to create an run a second conky.<br />
<br />
Create that file the same way you created conkymain. When you get the blank file up I “suggest” copying your “conkymain” file into it and deleting everything below TEXT and change the “alignment” line for example:<br />
<br />
alignment tr<br />
<br />
to:<br />
<br />
alignment bl<br />
<br />
so they don’t overlap each other.<br />
<br />
'''NOTE:''' tr = top_right, tl = top_left, bl = bottom_left, br = bottom_right, tm = top_middle, bm = bottom_middle, mr = middle_left and mr = middle_right<br />
<br />
Add what ever you want conky to display below TEXT, save it. Then edit the ~/.ssc.sh file removing the # before the line and make sure the last line points to your second file:<br />
<br />
<pre><br />
#!/bin/sh<br />
# click to start, click to stop<br />
<br />
if pidof conky | grep [0-9] > /dev/null<br />
then<br />
exec killall conky<br />
else<br />
<br />
#sleep 30 # sleep not required for xfce on startup - 30 or more for others<br />
conky -c ~/Conky/conkymain &<br />
conky -c ~/Conky/conkyforecast &<br />
<br />
exit<br />
fi<br />
</pre><br />
<br />
Click on your launcher icon – wait a second – click again and you’ll see the two conkys.<br />
<br />
OK that will get you started, now comes the fun part … configuring it to your own personal tastes and machine.<br />
<br />
Have a nice day.<br><br />
Bruce & Uncertain<br />
<br />
'''PS:''' If you see errors or have other conky resources that you feel might be helpful here please leave a comment.<br />
<br />
<br />
==Sample Conky File==<br />
<br />
When you install conky for the first time opening a terminal and typing:<br />
<br />
conky<br />
<br />
will show you a very basic conky in a window, usually at the lower left of your screen.<br />
<br />
[[Image:Guide-setup-1.png|center]]<br />
<br />
Obviously this is not what we want. We want a conky sitting on our screens displaying what we have configured. And we must do that in a text editor or our choice, as that’s what conky is, a simple text file without the .txt ending. Although, and I’ve just tested this if you name your conky file with a .txt ending it will still work, but you must call it as so. I renamed my conkymain to conkymain.txt and called it like this:<br />
<br />
conky -c ~/Conky/conkymain.txt &<br />
<br />
And it did display. So call your conky whatever you want, but use that name to call it to your screen for displaying it.<br />
<br />
So here you are, thinking; “I don’t have a conky file, other than that sample.” Well, that sample is called: '''conky.conf''' and can be found in '''etc/conky/conky.conf'''.<br />
<br />
I’ll reproduce it here, if you want to copy and paste it to your first conky to get something started right away. It has some simple changes to start in the upper-right and in it’s own window.<br />
<br />
<pre><br />
alignment tr<br />
background no<br />
own_window yes<br />
own_window_type override<br />
own_window_transparent yes<br />
background no<br />
border_width 1<br />
cpu_avg_samples 2<br />
default_color white<br />
default_outline_color white<br />
default_shade_color white<br />
draw_borders no<br />
draw_graph_borders yes<br />
draw_outline no<br />
draw_shades no<br />
font 6x10<br />
gap_x 5<br />
gap_y 60<br />
minimum_size 5 5<br />
net_avg_samples 2<br />
no_buffers yes<br />
out_to_console no<br />
stippled_borders 0<br />
update_interval 3.0<br />
uppercase no<br />
use_spacer no<br />
show_graph_scale no<br />
show_graph_range no<br />
<br />
TEXT<br />
${scroll 16 $nodename - $sysname $kernel on $machine | }<br />
$hr<br />
${color grey}Uptime:$color $uptime<br />
${color grey}Frequency (in MHz):$color $freq<br />
${color grey}Frequency (in GHz):$color $freq_g<br />
${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}<br />
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}<br />
${color grey}CPU Usage:$color $cpu% ${cpubar 4}<br />
${color grey}Processes:$color $processes ${color grey}Running:$color $running_processes<br />
$hr<br />
${color grey}File systems:<br />
/ $color${fs_free /}/${fs_size /} ${fs_bar 6 /}<br />
${color grey}Networking:<br />
Up:$color ${upspeed eth0} k/s${color grey} - Down:$color ${downspeed eth0} k/s<br />
$hr<br />
${color grey}Name PID CPU% MEM%<br />
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}<br />
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}<br />
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}<br />
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}<br />
</pre><br />
<br />
Pretty boring isn’t is, but (there is always a BUT isn’t there) that’s why we’re here. To help you “spruce it up” to “tweak it”, “modify it”, “personalize it”, however you want to call it. You’re at the right place!</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_(en)WUN Weather (en)2014-03-17T19:17:59Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather}}<br />
'''WUN''' a LUA weather script for conky using [http://www.wunderground.com/ wunderground] written maintained and supported by mrpeachy over at the Crunchbang [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua)] thread. The most current archive will always be found there, in the first post and linked to here, below (same links). You need to sign up to post at Crunchbang, but not to read the thread<br />
<br />
* [https://dl.dropboxusercontent.com/u/19008369/wun/wun.tar.gz CURRENT COMPLETE ARCHIVE: 02/08/14] (dd/mm/yy)<br />
* [https://dl.dropboxusercontent.com/u/19008369/wun/wun.lua.tar.gz WUN.LUA SCRIPT: 03/16/14] (dd/mm/yy) [http://crunchbang.org/forums/viewtopic.php?pid=367361#p367361 Why the update?]<br />
* [http://crunchbang.org/forums/viewtopic.php?pid=354940#p354940 WUN HISTORY] check it out.<br />
<br />
'''''NOTE''''' ''wun.lua'' is the main script that gathers and formats the data. It contains all the functions that are used in the templates<br />
As such, most changes/updates/bug fixes will occur in this file. New wun.lua scripts can then be extracted and the old script overwritten. The wun.lua script will always work with the latest complete archive, if it's date is the same or newer. Only download it to get newer functions or fixes<br />
<br />
[[File:Iweather falldown.lua.png|230px|thumb|right|'''Interactive template:'''<br />iweather_falldown.lua]]<br />
<br />
[[File:Astroweather.lua.jpg|230px|thumb|right|'''Static template:'''<br />astroweather.lua]]<br />
'''''OOTB''', these are the two templates used (and seen on the right):''<br />
*Interactive template: iweather_falldown.lua<br />
*Static template: astroweather.lua<br />
<br />
With an '''interactive''' conky template you will need to install ''xdotool'' to get the interactive action working in conky.<br />
<br />
The script is best extracted to /home/username/wun directory, but with a bit of tweaking it can go anywhere.<br />
<br />
The files and directory structure are:<br />
#/home/<username>/wun/ - three files<br />
#* read_me - please read it<br />
#* wun.lua - minor configuring required<br />
#*: ''see lines 4 to 14''<br />
#* wun_config.lua - configuring required<br />
#*: ''see lines 4 to 74 to start with''<br />
#/home/<username>/wun/additional_files - 5 sub-directories and 3 images<br />
#/home/<username>/wun/backup_data - 20 data backup files that the script uses IF: no net connection or one of the sites the script uses it down.<br />
#/home/<username>/wun/conky_configs - two conky files:<br />
## '''wunrc''' - runs the 'static' templates, it is configured to start: astroweather.lua<br />
## '''wunrci''' - runs the interactive templates, it is configured to start: iweather_falldown.lua<br />
#/home/<username>/wun/development docs - 18 files - have a look at them<br />
#/home/<username>/wun/templates - here's the meat of what you see on your desktop depending on what you choose.to use:<br />
#*Static templates, used by '''wunrc''':<br />
##astroweather.lua '''''shown above'''''<br />
##classic10day.lua<br />
##s11template.lua<br />
##wun_glassy_side_bar.lua<br />
##wun_template.lua<br />
#*Interactive templates:<br />
##iweather_falldown.lua '''''shown above'''''<br />
##iweather.lua<br />
##iweather_joe.lua<br />
<br />
'''RECAP:'''<br />
For the interactive templates, you need:<br />
*xdtool must be installed<br />
*you need to get an API key (''Cumulus Plan'')<br />
*conky -v in a terminal must end like this:<br />
<nowiki> * Lua<br />
<br />
Lua bindings:<br />
* Cairo<br />
* Imlib2<br />
<br />
26 Jan 14 | 15:07:26 ~<br />
$ </nowiki><br />
<br />
'''Links from the [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua) first post] by mrpeachy:'''<br />
*Post #2 - [http://crunchbang.org/forums/viewtopic.php?pid=354937#p354937 WUN TESTING POST]<br />
*Post #3 - [http://crunchbang.org/forums/viewtopic.php?pid=354938#p354938 WUN HOW TO: How to use the out() function]<br />
*Post #4 - [http://crunchbang.org/forums/viewtopic.php?pid=354939#p354939 How to use the repeats feature]<br />
*Post #5 - [http://crunchbang.org/forums/viewtopic.php?pid=354940#p354940 History of wun]<br />
*Post #6 - [http://crunchbang.org/forums/viewtopic.php?pid=354941#p354941 Additional_functions.lua] - a very cool add-on<br />
**;FUNCTIONS<br />
**:thermometer()<br />
**:weathermap_sat() and weathermap_radar()<br />
**:tweathergraph()<br />
*Post #7 - still a place holder<br />
*Post #428 - [http://crunchbang.org/forums/viewtopic.php?pid=358223#p358223 A couple of tricks for formatting] - also here at CPS: [[WUN Formatting Tricks (en)|WUN Formatting Tricks]]<br />
*Post #640 - [http://crunchbang.org/forums/viewtopic.php?pid=360593#p360593 How to use your own icons]<br />
<br />
Other related threads by mrpeachy:<br />
*[http://crunchbang.org/forums/viewtopic.php?id=18419 Interactive templates] aka: interactive conky thread<br />
<br />
From the original [http://crunchbang.org/forums/viewtopic.php?id=16100 v9000] thread<br />
*[http://crunchbang.org/forums/viewtopic.php?pid=177785%23p177785#p177785 How to use the image() function] - Post #194<br />
*;Use is unchanged from v9000 (only data option names have changed)<br />
*:'''Note''' - v9000 is not 100% comparable with WUN - these links provided by mrpeachy - therefore compatible for the aspect given<br />
'''CREDITS:'''<br />
{|<br />
|[[File:WundergroundLogo 4c horz.jpg|none|link=http://www.wunderground.com|linked to wunderground]]<br />
|''wunderground.com is the source of the API weather data used by this script.''<br /><br />
You '''need''' to sign up for an [http://www.wunderground.com/weather/api api key], it's free but make sure you get the ''Cumulus Plan''<br />
|}<br />
*[http://www.usno.navy.mil The United States Naval Observatory (USNO)] - for the sun & moon data.<br />
<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=Goto/offset/voffset_(en)Goto/offset/voffset (en)2014-02-25T18:29:37Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=Goto/offset/voffset=<br />
[[Category:English]]<br />
[[Category:Fonts and text (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|Goto/offset/voffset}}<br />
__NOTOC__<br />
==Preamble==<br />
<br />
So you need to do some work regarding “spacing” in conky. You did read the page entitled: [[Spacing in Conky (en)|Spacing]] I hope.<br />
<br />
Some recommendations to consider:<br />
<br />
1. For your conky file '''above''' TEXT lines required to ''pad the % outputs to two places'', and ''use short units'':<br />
short_units yes<br />
pad_percents 2<br />
TEXT<br />
<br />
short_units means you’ll see '''M''' vs '''M/b''' or '''G''' vs '''G/b'''. And pad_percents insures all % output into conky is done with 2 decimal places, unless you use another program like vnstat to get output. Another nice thing about this is if you use the ${goto} command to place them, it uses the decimal point as the reference.<br />
<br />
[[Image:Goto-1.png|center]]<br />
<br />
2. When considering ''spacing as a “critical” factor'' in your display, I can't stress enough that '''“mono” fonts are important'''.<br />
<br />
3. One also has to consider the font and font size. For example the woodbadge font used below is '''“NOT”''' a mono font and at a size of 40 a single space between words or characters is much larger then (for example) DejaVu Sans Mono:bold:size=9, and that is just hitting the “spacebar”. So always turn off fonts (with ${font}) before you go to another line or add a space for the next command – unless you want that large space.<br />
<br />
For example:<br />
${font woodbadge:size=40}Name: ${font DejaVu Sans Mono:bold:size=9}Bruce<br />
Address: 123 Any St.${font}<br />
<br />
would display different than:<br />
${font woodbadge:size=40}Name:${font DejaVu Sans Mono:bold:size=9} Bruce<br />
Address: 123 Any St.${font}<br />
<br />
because of the change in font and size. Check where the “space” is between the<br><br />
&nbsp;&nbsp;&nbsp;''Nam'''e: $'''{font DejaVu Sans Mono:bold:size=9}Bruce''<br><br />
and <br><br />
&nbsp;&nbsp;&nbsp;''Name:${font DejaVu Sans Mono:bold:size='''9} B'''ruce''<br><br />
That’s the only difference between those two lines. '''Spacing is important!'''<br><br />
<br />
[[Image:Goto-2.png|center]]<br />
<br />
==OK, Lets start==<br />
<br />
OK, so what do ${goto}, ${offset} and ${voffset} do. Basically they move the output from commands to another place on the display.<br />
<br />
'''${goto xx}''' – goto normally uses a positive number to move text xx number of pixels ''to the right '''of zero'''''. That '''“of zero”''' is important, it is the extreme left side of your conky output displayed on your screen. Obviously '''-xx''' will move text to the left of 0 (you won’t see the text if you do this.) So if you have a conky that is 1000 pixels wide, 0 is the left most pixel and 999 is the last one on the right.<br />
<br />
'''${offset xx}''' moves it in a similar fashion but starts from where you use it.<br />
<br />
Take a look at this three line example and the results, note the font used:<br />
<br />
'''Line 1''', has text out of place, but that ${goto 0} is going to assure that “This is” will be in the right place. And ${goto 54} will put “text.” at the end to form the phrase properly.<br />
<br />
'''Lines #2 & 3''', show what ${offset} does.<br />
<br />
${font DejaVu Sans Mono:bold:size=9}<br />
Line 1:<br />
${goto 54}text.${goto 0}This is<br />
<br />
Line 2:<br />
This is${offset 80}text<br />
<br />
Line 3:<br />
${offset 80}text${goto 0}This is<br />
${font}<br />
<br />
[[Image:Goto-3.png|center]]<br />
<br />
As you see both lines #2 & 3 have the same command “${offset 80}text” but places “text” different positions on the line. NOTE: Personally I don’t use the ${offset} command but I’ve seen it used in various conkys in the forums.<br />
<br />
==Next we are going to look at ${voffset}==<br />
<br />
But before we get into it I want to point out that “every time” you use this command you create a blank empty space below your conky. It can not be helped to my knowledge. Here’s the reason, lets say you create a conky with 5 command lines below TEXT:<br />
<br />
TEXT<br />
${font DejaVu Sans Mono:bold:size=9}line 1<br />
line 2<br />
line 3<br />
line 4<br />
line 5${font}<br />
<br />
You are creating a conky that requires 5 lines (size determined by the font size you use) of space on your screen!<br />
<br />
OK, so you want to use ${voffset} and move those lines up:<br />
<br />
${font DejaVu Sans Mono:bold:size=9}line 1<br />
${voffset -15}${goto 54}line 2<br />
${voffset -15}${goto 108}line 3<br />
${voffset -15}${goto 162}line 4<br />
${voffset -15}${goto 216}line 5${font}<br />
<br />
But you are still using 5 lines of code, even though you have “moved the display location”, that’s all you have done: '''“moved the display location”''' as seen below:<br />
<br />
[[Image:Goto-4.png|center]]<br />
<br />
And for that reason we see things like this (See: [[Bars with text inside (en)|Bars with text]]):<br />
<br />
[[Image:Goto-05.png|center]]<br />
<br />
You can however put another conky on your screen to use that space. Just give it a sleep time of 1 or 2 seconds longer to allow the first conky with the space to load so the empty space “doesn’t cover” your second conky.<br />
<br />
==OK, lets continue with $voffset==<br />
<br />
'''${voffset xx}''' moves displayed output up or down, according to the "alignment" command used a positive number could be up or down and a negative number the opposite. For example with "alignment tl, tr, tm, bl, br or bm a voffset with a positive number will move the output further into the screen and a negative off the screen<br />
<br />
Let’s look at an example:<br />
<br />
[[Image:Goto-6.png|center]]<br />
<br />
'''NOTE:''' The following examples come from my working conky, I have removed the ${color} command to make it more easily readable.<br />
<br />
TEXT<br />
${font woodbadge:size=40}IP:${font}<br />
${font DejaVu Sans Mono:bold:size=9}Up:${upspeed eth0} k/s ${totalup eth0}<br />
${addr eth0}<br />
Down:${downspeed eth0} k/s ${totaldown eth0}${font}<br />
<br />
As you see I’m using a LARGE font for IP: and the next three lines under that show UP: -speed and total, my IP address and Down: – speed and total in a smaller “mono” font because my spacing is a critical issue here.<br />
<br />
What you get is 4 lines of output on your screen:<br />
<br />
IP:<br />
Up: 0 K/s 2.68M<br />
xxx.xxx.xxx.xxx<br />
Down: 0 k/s 9.34M<br />
<br />
But we want it all on one line, so we need 3 x ${goto xx} and 1x ${voffset xx}. Why only 1 ${voffset} you ask. Simple; once used it moves “everything” up or down<br />
<br />
First we play with the ${goto} command to get that 4th line moved over beyond the IP: display. Why that last line? “Down” has more characters than “Up” and is therefore easier to use as it’s placement will be “closer” then “Up”<br />
<br />
TEXT<br />
${font woodbadge:size=40}IP:${font}<br />
${font DejaVu Sans Mono:bold:size=9}Up:{upspeed eth0} k/s ${totalup eth0}<br />
${addr eth0}<br />
${goto 85}Down:{downspeed eth0} k/s ${totaldown eth0}<br />
<br />
That looks good. Do line 3 now and play with line 2, I put the ${goto} after the ${font} command out of habit. It doesn’t really matter.<br />
<br />
TEXT<br />
${font woodbadge:size=40}IP:${font}<br />
${font DejaVu Sans Mono:bold:size=9}${goto 99}Up:{upspeed eth0} k/s ${totalup eth0}<br />
${goto 85}${addr eth0}<br />
${goto 85}Down:{downspeed eth0} k/s ${totaldown eth0}<br />
<br />
<br />
OK, so everything lines up beyond the IP: now. Now we have to move it up with the ${voffset} command until we get the desired results. Placing the ${voffset} on that second line bringing all three up into place.<br />
<br />
TEXT<br />
${font woodbadge:size=40}IP:${font}<br />
${font DejaVu Sans Mono:bold:size=9}${voffset -45}${goto 99}Up:{upspeed eth0} k/s ${totalup eth0}<br />
${goto 85}${addr eth0}<br />
${goto 85}Down:{downspeed eth0} k/s ${totaldown eth0}<br />
<br />
This is how it looks in my conky with all the codes:<br />
<br />
TEXT<br />
${color2}${font woodbadge:size=40}IP:${font}${color}<br />
${font DejaVu Sans Mono:bold:size=9}${voffset -45}${goto 99}${color9}Up:${color}${upspeed eth0} k/s ${totalup eth0}<br />
${goto 85}${addr eth0}<br />
${goto 85}${color3}Down:${color}${downspeed eth0} k/s ${totaldown eth0}${color}${font}<br />
<br />
<br />
<br />
[[Image:Goto-7.png|left]]''Thanks to '''Jackzor & djyoung4''', for making me aware of this missing tidbit:''<br />
<br />
As you saw at the top of the page:<br />
<br />
short_units yes<br />
pad_percents 2<br />
TEXT<br />
<br />
are two very useful variables and there is another that will help your conky look cleaner, neater, and just generally better if you use “Processes”<br />
<br />
short_units yes<br />
pad_percents 2<br />
top_name_width 7<br />
TEXT<br />
'''top_name_width''' – Width for $top_name value (defaults to 15 characters).<br />
<br />
… so "top_name_width 7" will limit the processes names to “7″ characters allowing for exact spacing with goto’s.<br />
<br />
''The conky code below created the Processes conky you see on the left. Gotta love this decimals all lined up nice and neat!''<br />
{{Clear}}<br />
<br />
default_color FFDEAD #NavajoWhite<br />
color0 FFFFF0 #Ivory<br />
color1 CD5C5C #IndianRed #00CED1 DarkTurquoise #FFA07A LightSalmon #00FFFF Cyan<br />
color2 FF8C00 #Darkorange #D2691E #Chocolate<br />
color3 7FFF00 #Chartreuse<br />
color4 778899 #LightSlateGrey<br />
color5 DCDCDC #Gainsboro<br />
color6 00BFFF #DeepSkyBlue<br />
# colours below used by colorize script<br />
color7 48D1CC #MediumTurquoise<br />
color8 FFFF00 #Yellow<br />
color9 FF0000 #Red<br />
<br />
pad_percents 2<br />
top_name_width 7<br />
minimum_size 120 100<br />
<br />
TEXT<br />
${goto 10}${color4}${cpubar cpu0 25,160}<br />
${voffset -33}${goto 20}${color0}${font dodger:size=15}CPU${font}${goto 120}${voffset -3}${font DejaVu Sans Mono:size=12}${cpu cpu0} %${font}<br />
${voffset 10}${goto 10}${color3}Name${goto 85}CPU${goto 135}MEM${color}<br />
${voffset 5}${goto 10}${top name 1}${goto 70}${top cpu 1}${goto 120}${top mem 1}<br />
${goto 10}${top name 2}${goto 70}${top cpu 2}${goto 120}${top mem 2}<br />
${goto 10}${top name 3}${goto 70}${top cpu 3}${goto 120}${top mem 3}<br />
${goto 10}${top name 4}${goto 70}${top cpu 4}${goto 120}${top mem 4}<br />
${goto 10}${top name 5}${goto 70}${top cpu 5}${goto 120}${top mem 5}<br />
${goto 10}${top name 6}${goto 70}${top cpu 6}${goto 120}${top mem 6}<br />
${goto 10}${top name 7}${goto 70}${top cpu 7}${goto 120}${top mem 7}<br />
${goto 10}${top name 8}${goto 70}${top cpu 8}${goto 120}${top mem 8}<br />
${goto 10}${top name 9}${goto 70}${top cpu 9}${goto 120}${top mem 9}<br />
${goto 10}${voffset 33}${color4}${membar 25,160}<br />
${voffset -33}${goto 20}${color0}${font dodger:size=15}MEM${font}${goto 120}${voffset -3}${font DejaVu Sans Mono:size=12}${memperc} %${font}<br />
${voffset 10}${goto 10}${color3}Name${goto 85}CPU${goto 135}MEM${color}<br />
${voffset 5}${goto 10}${top_mem name 1}${goto 70}${top_mem cpu 1}${goto 120}${top_mem mem 1}<br />
${goto 10}${top_mem name 2}${goto 70}${top_mem cpu 2}${goto 120}${top_mem mem 2}<br />
${goto 10}${top_mem name 3}${goto 70}${top_mem cpu 3}${goto 120}${top_mem mem 3}<br />
${goto 10}${top_mem name 4}${goto 70}${top_mem cpu 4}${goto 120}${top_mem mem 4}<br />
${goto 10}${top_mem name 5}${goto 70}${top_mem cpu 5}${goto 120}${top_mem mem 5}<br />
${goto 10}${top_mem name 6}${goto 70}${top_mem cpu 6}${goto 120}${top_mem mem 6}<br />
${goto 10}${top_mem name 7}${goto 70}${top_mem cpu 7}${goto 120}${top_mem mem 7}<br />
${goto 10}${top_mem name 8}${goto 70}${top_mem cpu 8}${goto 120}${top_mem mem 8}<br />
${goto 10}${top_mem name 9}${goto 70}${top_mem cpu 9}${goto 120}${top_mem mem 9}${font}${color}</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=OpenSUSE_ConkyForecast_(en)OpenSUSE ConkyForecast (en)2014-02-24T18:28:41Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=openSUSE ConkyForecast=<br />
[[Category:English]]<br />
[[Category:Forecast (en)]]<br />
[[Category:openSUSE (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|openSUSE ConkyForecast}}<br />
'''ConkyForecast is dead ... page remains for historical purposes.'''<br />
<br />
OpenSUSE & ConkyForecast v2.09<br />
<br />
'''UPDATE: 18 Sept 10'''<br />
<br />
[http://forums.opensuse.org/members/feathermonkey.html FeatherMonkey] pointed out that [http://forums.opensuse.org/members/malcolmlewis.html malcolmlewis] has an RPM repo with ConkyForecast at : [http://packages.opensuse-community.org/index.jsp?distro=openSUSE_113&searchTerm=forcast Webpin] (Nothing shows at webpin). When I found it it was a bit out of date with ConkyForecast version 2.04 when the current version was 2.08.<br />
<br />
Once c-Forecast hit v2.09 to accommodate images with Conky v1.7.1 and later I contacted Malcolm and he has agreed to keep c-Forecast up to date if I inform him of new updates. EDIT: I can't even find the old ones now.<br />
<br />
We will also maintain links to the latest OpenSuse – ConkyForecast RPM packages.<br />
<br />
Use either the webpin search (see above) or use the following openSUSE search feature:<br />
<br />
For openSUSE 11.1:<br />
<br />
http://software.opensuse.org/search?baseproject=openSUSE%3A11.1&p=1&q=conkyforecast<br />
<br />
For openSUSE 11.2:<br />
<br />
http://software.opensuse.org/search?baseproject=openSUSE%3A11.2&p=1&q=conkyforecast<br />
<br />
It’s better to use openSUSE software search in case they ever move the location, users will still find them. :)<br />
<br />
<br />
<br />
'''NEW:'''<br />
<br />
For openSUSE 11.3:<br />
<br />
http://software.opensuse.org/search?q=conkyforecast&baseproject=openSUSE%3A11.3&lang=en<br />
<br />
Here’s to clear sailing!</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_(en)WUN Weather (en)2014-02-22T18:16:22Z<p>Sector11: /* WUN Weather */</p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather}}<br />
'''WUN''' a LUA weather script for conky using [http://www.wunderground.com/ wunderground] written maintained and supported by mrpeachy over at the Crunchbang [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua)] thread. The most current archive will always be found there, in the first post and linked to here, below (same links). You need to sign up to post at Crunchbang, but not to read the thread<br />
<br />
'''Feb 08, 2014:''' [https://dl.dropboxusercontent.com/u/19008369/wun/wun.tar.gz CURRENT COMPLETE ARCHIVE]<br />
<br />
'''Feb 03, 2014:''' [https://dl.dropboxusercontent.com/u/19008369/wun/wun.lua.tar.gz WUN.LUA SCRIPT ARCHIVE]<br />
<br />
[http://crunchbang.org/forums/viewtopic.php?pid=354940#p354940 WUN HISTORY] check it out.<br />
<br />
'''''NOTE''''' ''wun.lua'' is the main script that gathers and formats the data. It contains all the functions that are used in the templates<br />
As such, most changes/updates/bug fixes will occur in this file. New wun.lua scripts can then be extracted and the old script overwritten. The wun.lua script will always work with the latest complete archive, if it's date is the same or newer. Only download it to get newer functions or fixes<br />
<br />
[[File:Iweather falldown.lua.png|230px|thumb|right|'''Interactive template:'''<br />iweather_falldown.lua]]<br />
<br />
[[File:Astroweather.lua.jpg|230px|thumb|right|'''Static template:'''<br />astroweather.lua]]<br />
'''''OOTB''', these are the two templates used (and seen on the right):''<br />
*Interactive template: iweather_falldown.lua<br />
*Static template: astroweather.lua<br />
<br />
With an '''interactive''' conky template you will need to install ''xdotool'' to get the interactive action working in conky.<br />
<br />
The script is best extracted to /home/username/wun directory, but with a bit of tweaking it can go anywhere.<br />
<br />
The files and directory structure are:<br />
#/home/<username>/wun/ - three files<br />
#* read_me - please read it<br />
#* wun.lua - minor configuring required<br />
#*: ''see lines 4 to 14''<br />
#* wun_config.lua - configuring required<br />
#*: ''see lines 4 to 74 to start with''<br />
#/home/<username>/wun/additional_files - 5 sub-directories and 3 images<br />
#/home/<username>/wun/backup_data - 20 data backup files that the script uses IF: no net connection or one of the sites the script uses it down.<br />
#/home/<username>/wun/conky_configs - two conky files:<br />
## '''wunrc''' - runs the 'static' templates, it is configured to start: astroweather.lua<br />
## '''wunrci''' - runs the interactive templates, it is configured to start: iweather_falldown.lua<br />
#/home/<username>/wun/development docs - 18 files - have a look at them<br />
#/home/<username>/wun/templates - here's the meat of what you see on your desktop depending on what you choose.to use:<br />
#*Static templates, used by '''wunrc''':<br />
##astroweather.lua '''''shown above'''''<br />
##classic10day.lua<br />
##s11template.lua<br />
##wun_glassy_side_bar.lua<br />
##wun_template.lua<br />
#*Interactive templates:<br />
##iweather_falldown.lua '''''shown above'''''<br />
##iweather.lua<br />
##iweather_joe.lua<br />
<br />
'''RECAP:'''<br />
For the interactive templates, you need:<br />
*xdtool must be installed<br />
*you need to get an API key (''Cumulus Plan'')<br />
*conky -v in a terminal must end like this:<br />
<nowiki> * Lua<br />
<br />
Lua bindings:<br />
* Cairo<br />
* Imlib2<br />
<br />
26 Jan 14 | 15:07:26 ~<br />
$ </nowiki><br />
<br />
'''Links from the [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua) first post] by mrpeachy:'''<br />
*Post #2 - [http://crunchbang.org/forums/viewtopic.php?pid=354937#p354937 WUN TESTING POST]<br />
*Post #3 - [http://crunchbang.org/forums/viewtopic.php?pid=354938#p354938 WUN HOW TO: How to use the out() function]<br />
*Post #4 - [http://crunchbang.org/forums/viewtopic.php?pid=354939#p354939 How to use the repeats feature]<br />
*Post #5 - [http://crunchbang.org/forums/viewtopic.php?pid=354940#p354940 History of wun]<br />
*Post #6 - [http://crunchbang.org/forums/viewtopic.php?pid=354941#p354941 Additional_functions.lua] - a very cool add-on<br />
**;FUNCTIONS<br />
**:thermometer()<br />
**:weathermap_sat() and weathermap_radar()<br />
**:tweathergraph()<br />
*Post #7 - still a place holder<br />
*Post #428 - [http://crunchbang.org/forums/viewtopic.php?pid=358223#p358223 A couple of tricks for formatting] - also here at CPS: [[WUN Formatting Tricks (en)|WUN Formatting Tricks]]<br />
*Post #640 - [http://crunchbang.org/forums/viewtopic.php?pid=360593#p360593 How to use your own icons]<br />
<br />
Other related threads by mrpeachy:<br />
*[http://crunchbang.org/forums/viewtopic.php?id=18419 Interactive templates] aka: interactive conky thread<br />
<br />
From the original [http://crunchbang.org/forums/viewtopic.php?id=16100 v9000] thread<br />
*[http://crunchbang.org/forums/viewtopic.php?pid=177785%23p177785#p177785 How to use the image() function] - Post #194<br />
*;Use is unchanged from v9000 (only data option names have changed)<br />
*:'''Note''' - v9000 is not 100% comparable with WUN - these links provided by mrpeachy - therefore compatible for the aspect given<br />
'''CREDITS:'''<br />
{|<br />
|[[File:WundergroundLogo 4c horz.jpg|none|link=http://www.wunderground.com|linked to wunderground]]<br />
|''wunderground.com is the source of the API weather data used by this script.''<br /><br />
You '''need''' to sign up for an [http://www.wunderground.com/weather/api api key], it's free but make sure you get the ''Cumulus Plan''<br />
|}<br />
*[http://www.usno.navy.mil The United States Naval Observatory (USNO)] - for the sun & moon data.<br />
<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_(en)WUN Weather (en)2014-02-22T16:59:30Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather}}<br />
'''WUN''' a LUA weather script for conky using [http://www.wunderground.com/ wunderground] written maintained and supported by mrpeachy over at the Crunchbang [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua)] thread. The most current archive will always be found there, in the first post and linked to here, below (same links). You need to sign up to post at Crunchbang, but not to read the thread<br />
<br />
'''Feb 08, 2014:''' [https://dl.dropboxusercontent.com/u/19008369/wun/wun.tar.gz CURRENT COMPLETE ARCHIVE]<br />
<br />
'''Feb 03, 2014:''' [https://dl.dropboxusercontent.com/u/19008369/wun/wun.lua.tar.gz WUN.LUA SCRIPT ARCHIVE]<br />
<br />
[http://crunchbang.org/forums/viewtopic.php?pid=354940#p354940 WUN HISTORY] check it out.<br />
<br />
'''''NOTE''''' ''wun.lua'' is the main script that gathers and formats the data. It contains all the functions that are used in the templates<br />
As such, most changes/updates/bug fixes will occur in this file. New wun.lua scripts can then be extracted and the old script overwritten. The wun.lua script will always work with the latest complete archive, if it's date is the same or newer. Only download it to get newer functions or fixes<br />
<br />
[[File:Iweather falldown.lua.png|230px|thumb|right|'''Interactive template:'''<br />iweather_falldown.lua]]<br />
<br />
[[File:Astroweather.lua.jpg|230px|thumb|right|'''Static template:'''<br />astroweather.lua]]<br />
'''''OOTB''', these are the two templates used (and seen on the right):''<br />
*Interactive template: iweather_falldown.lua<br />
*Static template: astroweather.lua<br />
<br />
With an '''interactive''' conky template you will need to install ''xdotool'' to get the interactive action working in conky.<br />
<br />
The script is best extracted to /home/username/wun directory, but with a bit of tweaking it can go anywhere.<br />
<br />
The files and directory structure are:<br />
#/home/<username>/wun/ - three files<br />
#* read_me - please read it<br />
#* wun.lua - minor configuring required<br />
#*: ''see lines 4 to 14''<br />
#* wun_config.lua - configuring required<br />
#*: ''see lines 4 to 74 to start with''<br />
#/home/<username>/wun/additional_files - 5 sub-directories and 3 images<br />
#/home/<username>/wun/backup_data - 20 data backup files that the script uses IF: no net connection or one of the sites the script uses it down.<br />
#/home/<username>/wun/conky_configs - two conky files:<br />
## '''wunrc''' - runs the 'static' templates, it is configured to start: astroweather.lua<br />
## '''wunrci''' - runs the interactive templates, it is configured to start: iweather_falldown.lua<br />
#/home/<username>/wun/development docs - 18 files - have a look at them<br />
#/home/<username>/wun/templates - here's the meat of what you see on your desktop depending on what you choose.to use:<br />
#*Static templates, used by '''wunrc''':<br />
##astroweather.lua '''''shown above'''''<br />
##classic10day.lua<br />
##s11template.lua<br />
##wun_glassy_side_bar.lua<br />
##wun_template.lua<br />
#*Interactive templates:<br />
##iweather_falldown.lua '''''shown above'''''<br />
##iweather.lua<br />
##iweather_joe.lua<br />
<br />
'''RECAP:'''<br />
For the interactive templates, you need:<br />
*xdtool must be installed<br />
*you need to get an API key (''Cumulus Plan'')<br />
*conky -v in a terminal must end like this:<br />
<nowiki> * Lua<br />
<br />
Lua bindings:<br />
* Cairo<br />
* Imlib2<br />
<br />
26 Jan 14 | 15:07:26 ~<br />
$ </nowiki><br />
<br />
Links from the first post by mrpeachy:<br />
[http://crunchbang.org/forums/viewtopic.php?pid=354938#p354938 WUN HOW TO: How to use the out() function]<br />
[http://crunchbang.org/forums/viewtopic.php?pid=177785%23p177785#p177785 How to use the image() fuction]<br />
[http://crunchbang.org/forums/viewtopic.php?pid=354939#p354939 How to use the repeats feature]<br />
http://crunchbang.org/forums/viewtopic.php?pid=358223#p358223 A couple of tricks for formatting] - also here at CPS: [[WUN Formatting Tricks (en)|WUN Formatting Tricks]]<br />
[http://crunchbang.org/forums/viewtopic.php?pid=360593#p360593 How to use your own icons]<br />
[http://crunchbang.org/forums/viewtopic.php?id=18419 Interactive templates] aka: Interactive Conkys<br />
[http://crunchbang.org/forums/viewtopic.php?pid=354941#p354941 additional_functions.lua] - a very cool add-on<br />
[http://crunchbang.org/forums/viewtopic.php?pid=354940#p354940 History of wun]<br />
<br />
'''CREDITS:'''<br />
{|<br />
|[[File:WundergroundLogo 4c horz.jpg|none|link=http://www.wunderground.com|linked to wunderground]]<br />
|''wunderground.com is the source of the API weather data used by this script.''<br /><br />
You '''need''' to sign up for an [http://www.wunderground.com/weather/api api key], it's free but make sure you get the ''Cumulus Plan''<br />
|}<br />
*[http://www.usno.navy.mil The United States Naval Observatory (USNO)] - for the sun & moon data.<br />
<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Formatting_Tricks_(en)WUN Formatting Tricks (en)2014-02-22T16:34:23Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Formatting Tricks=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Formatting Tricks}}<br />
From the words of mrpeachy seen here in post [http://crunchbang.org/forums/viewtopic.php?pid=358223#p358223 #428].<br />
<br />
Because WUN weather templates are written in lua code you can do a lot of other things to the output of data options.<br />
<br />
If i were to try and cover ALL the bases in the data options there would be thousands of them!<br />
<br />
Example: using an option in the out function like so<br />
out({txt=now.location_full})<br />
For mrpeachy that outputs:<br />
Saint Louis, MO<br />
But, if you wanted all '''lowercase''' letters:<br />
out({txt=string.lower(now.location_full)})<br />
The output:<br />
saint louis, mo<br />
Or if you wanted all '''caps''':<br />
out({txt=string.upper(now.location_full)})<br />
Again the output:<br />
SAINT LOUIS, MO<br />
It also works for long multi-part text strings like this:<br />
txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T"))<br />
That line would output something like:<br />
updated: Mon, 06 jan 2014 20:10:34 -0600 from data at saint louis, mo 22:15:41<br />
'''''NOTE''' the use of () with this added feature:''<br />
out({txt=now.location_full})<br />
out({txt=string.lower(now.location_full)})<br />
<br />
out({txt="Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
out({txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
'''To reiterate:''' Make sure you surround all your output with brackets (), when using string.upper or string.lower<br />
== Another example is "gsub" ==<br />
Say you have set in the config that makes imperial units for temperature display: "°F"<br />
However if there is a ''single'' part of the output that you think it would look better if it was just "°", you could remove the F in the template like this<br />
out({txt=(now.temp_imperial..now.temp_imperial_unit):gsub("°F","°")})<br />
<br />
'''NOTE:''' again, surround the output with brackets () then add :gsub("find","replace") at the end<br />
<br />
Between the first set of quotes goes the text to find, between the second set of quotes goes the text to display in its place<br />
<br />
In the example above, gsub finds "°F" and replaces it with "°"<br />
<br />
'''''EDIT''''' by mrpeachy - This is probably a bad example because it would be much easier to just hard code the "°" into the output instead of using the units data options, but the same principal can be applied to lots of other things.<br />
<br />
This is why I added the ''single''<br />
<br />
Since my config is set to use "°" here's a reverse example where I commented out the feels_like temp line to show it in action:<br />
out({a=1,x=15,y=ypos,txt=("Temp : "..now.temp_imperial..now.temp_imperial_unit):gsub("°","FF°°")})<br />
--out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.feelslike_imperial..now.feelslike_imperial_unit})<br />
out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.temp_imperial..now.temp_imperial_unit}) -- NO FF°° HERE<br />
[[file:Gsub.jpg]]<br />
← Temp: shows the FF°° but ± doesn't.<br />
<br />
Now if you use it in a "repeat table" section of the template it will affect every instance that is repeated, which would make mrpeachy's original statement:<br />
in the example above, gsub finds every instance of "°F" and replaces it with "°" <br />
absolutely correct.<br />
<br />
Using things like this it should be possible to achieve any desired format for your output<br />
<br />
One more: [http://stackoverflow.com/questions/20284515/capitalize-first-letter-of-every-word-in-lua Capitalize first letter of every word in Lua]<br />
<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]<br />
<br />
''Some editorial modifications by Sestor11''</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Formatting_Tricks_(en)WUN Formatting Tricks (en)2014-02-22T16:32:47Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Formatting Tricks=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Formatting Tricks}}<br />
From the words of mrpeachy seen here in post [http://crunchbang.org/forums/viewtopic.php?pid=358223#p358223 #428].<br />
<br />
Because WUN weather templates are written in lua code you can do a lot of other things to the output of data options.<br />
<br />
If i were to try and cover ALL the bases in the data options there would be thousands of them!<br />
<br />
Example: using an option in the out function like so<br />
out({txt=now.location_full})<br />
For mrpeachy that outputs:<br />
Saint Louis, MO<br />
But, if you wanted all '''lowercase''' letters:<br />
out({txt=string.lower(now.location_full)})<br />
The output:<br />
saint louis, mo<br />
Or if you wanted all '''caps''':<br />
out({txt=string.upper(now.location_full)})<br />
Again the output:<br />
SAINT LOUIS, MO<br />
It also works for long multi-part text strings like this:<br />
txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T"))<br />
That line would output something like:<br />
updated: Mon, 06 jan 2014 20:10:34 -0600 from data at saint louis, mo 22:15:41<br />
'''''NOTE''' the use of () with this added feature:''<br />
out({txt=now.location_full})<br />
out({txt=string.lower(now.location_full)})<br />
<br />
out({txt="Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
out({txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
'''To reiterate:''' Make sure you surround all your output with brackets (), when using string.upper or string.lower<br />
<br />
<br />
== Another example is "gsub" ==<br />
Say you have set in the config that makes imperial units for temperature display: "°F"<br />
However if there is a ''single'' part of the output that you think it would look better if it was just "°", you could remove the F in the template like this<br />
out({txt=(now.temp_imperial..now.temp_imperial_unit):gsub("°F","°")})<br />
<br />
'''NOTE:''' again, surround the output with brackets () then add :gsub("find","replace") at the end<br />
<br />
Between the first set of quotes goes the text to find, between the second set of quotes goes the text to display in its place<br />
<br />
In the example above, gsub finds "°F" and replaces it with "°"<br />
<br />
'''''EDIT''''' by mrpeachy - This is probably a bad example because it would be much easier to just hard code the "°" into the output instead of using the units data options, but the same principal can be applied to lots of other things.<br />
<br />
This is why I added the ''single''<br />
<br />
Since my config is set to use "°" here's a reverse example where I commented out the feels_like temp line to show it in action:<br />
out({a=1,x=15,y=ypos,txt=("Temp : "..now.temp_imperial..now.temp_imperial_unit):gsub("°","FF°°")})<br />
--out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.feelslike_imperial..now.feelslike_imperial_unit})<br />
out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.temp_imperial..now.temp_imperial_unit}) -- NO FF°° HERE<br />
[[file:Gsub.jpg]]<br />
← Temp: shows the FF°° but ± doesn't.<br />
<br />
Now if you use it in a "repeat table" section of the template it will affect every instance that is repeated, which would make mrpeachy's original statement:<br />
in the example above, gsub finds every instance of "°F" and replaces it with "°" <br />
absolutely correct.<br />
<br />
Using things like this it should be possible to achieve any desired format for your output<br />
<br />
One more: [http://stackoverflow.com/questions/20284515/capitalize-first-letter-of-every-word-in-lua Capitalize first letter of every word in Lua]<br />
<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]<br />
<br />
''Some editorial modifications by Sestor11''</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Formatting_Tricks_(en)WUN Formatting Tricks (en)2014-02-22T16:31:26Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Formatting Tricks=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Formatting Tricks}}<br />
From the words of mrpeachy seen here in post [http://crunchbang.org/forums/viewtopic.php?pid=358223#p358223 #428].<br />
<br />
Because WUN weather templates are written in lua code you can do a lot of other things to the output of data options.<br />
<br />
If i were to try and cover ALL the bases in the data options there would be thousands of them!<br />
<br />
Example: using an option in the out function like so<br />
out({txt=now.location_full})<br />
For mrpeachy that outputs:<br />
Saint Louis, MO<br />
But, if you wanted all '''lowercase''' letters:<br />
out({txt=string.lower(now.location_full)})<br />
The output:<br />
saint louis, mo<br />
Or if you wanted all '''caps''':<br />
out({txt=string.upper(now.location_full)})<br />
Again the output:<br />
SAINT LOUIS, MO<br />
It also works for long multi-part text strings like this:<br />
txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T"))<br />
That line would output something like:<br />
updated: Mon, 06 jan 2014 20:10:34 -0600 from data at saint louis, mo 22:15:41<br />
'''''NOTE''' the use of () with this added feature:''<br />
out({txt=now.location_full})<br />
out({txt=string.lower(now.location_full)})<br />
<br />
out({txt="Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
out({txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
'''To reiterate:''' Make sure you surround all your output with brackets (), when using string.upper or string.lower<br />
<br />
'''Another example is '''gsub''''''<br />
<br />
Say you have set in the config that makes imperial units for temperature display: "°F"<br />
However if there is a ''single'' part of the output that you think it would look better if it was just "°", you could remove the F in the template like this<br />
out({txt=(now.temp_imperial..now.temp_imperial_unit):gsub("°F","°")})<br />
<br />
'''NOTE:''' again, surround the output with brackets () then add :gsub("find","replace") at the end<br />
<br />
Between the first set of quotes goes the text to find, between the second set of quotes goes the text to display in its place<br />
<br />
In the example above, gsub finds "°F" and replaces it with "°"<br />
<br />
'''''EDIT''''' by mrpeachy - This is probably a bad example because it would be much easier to just hard code the "°" into the output instead of using the units data options, but the same principal can be applied to lots of other things.<br />
<br />
This is why I added the ''single''<br />
<br />
Since my config is set to use "°" here's a reverse example where I commented out the feels_like temp line to show it in action:<br />
out({a=1,x=15,y=ypos,txt=("Temp : "..now.temp_imperial..now.temp_imperial_unit):gsub("°","FF°°")})<br />
--out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.feelslike_imperial..now.feelslike_imperial_unit})<br />
out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.temp_imperial..now.temp_imperial_unit}) -- NO FF°° HERE<br />
[[file:Gsub.jpg]]<br />
← Temp: shows the FF°° but ± doesn't.<br />
<br />
Now if you use it in a "repeat table" section of the template it will affect every instance that is repeated, which would make mrpeachy's original statement:<br />
in the example above, gsub finds every instance of "°F" and replaces it with "°" <br />
absolutely correct.<br />
<br />
Using things like this it should be possible to achieve any desired format for your output<br />
<br />
One more: [http://stackoverflow.com/questions/20284515/capitalize-first-letter-of-every-word-in-lua Capitalize first letter of every word in Lua]<br />
<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]<br />
<br />
''Some editorial modifications by Sestor11''</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Formatting_Tricks_(en)WUN Formatting Tricks (en)2014-02-22T16:29:02Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Formatting Tricks=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Formatting Tricks}}<br />
From the words of mrpeachy seen here in post [http://crunchbang.org/forums/viewtopic.php?pid=358223#p358223 #428].<br />
<br />
Because WUN weather templates are written in lua code you can do a lot of other things to the output of data options.<br />
<br />
If i were to try and cover ALL the bases in the data options there would be thousands of them!<br />
<br />
Example: using an option in the out function like so<br />
out({txt=now.location_full})<br />
for mrpeachy that outputs:<br />
Saint Louis, MO<br />
but, if you wanted all '''lowercase''' letters:<br />
out({txt=string.lower(now.location_full)})<br />
the output:<br />
saint louis, mo<br />
or if you wanted all '''caps''':<br />
out({txt=string.upper(now.location_full)})<br />
again the output:<br />
SAINT LOUIS, MO<br />
it also works for long multi part text strings like this:<br />
txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T"))<br />
That line would output something like:<br />
updated: Mon, 06 jan 2014 20:10:34 -0600 from data at saint louis, mo 22:15:41<br />
'''''NOTE''' the use of ( ) with this added feature:''<br />
out({txt=now.location_full})<br />
out({txt=string.lower(now.location_full)})<br />
<br />
out({txt="Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
out({txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
<br />
'''To reiterate:''' Make sure you surround all your output with brackets (), when using string.upper or string.lower<br />
<br />
Another example is '''gsub'''<br />
<br />
Say you have set in the config that makes imperial units for temperature display: "°F"<br />
However if there is a ''single'' part of the output that you think it would look better if it was just "°", you could remove the F in the template like this<br />
out({txt=(now.temp_imperial..now.temp_imperial_unit):gsub("°F","°")})<br />
<br />
'''NOTE:''' again, surround the output with brackets () then add :gsub("find","replace") at the end<br />
<br />
Between the first set of quotes goes the text to find, between the second set of quotes goes the text to display in its place<br />
<br />
In the example above, gsub finds "°F" and replaces it with "°"<br />
<br />
'''''EDIT''''' by mrpeachy - This is probably a bad example because it would be much easier to just hard code the "°" into the output instead of using the units data options, but the same principal can be applied to lots of other things.<br />
<br />
This is why I added the ''single''<br />
<br />
Since my config is set to use "°" here's a reverse example where I commented out the feels_like temp line to show it in action:<br />
out({a=1,x=15,y=ypos,txt=("Temp : "..now.temp_imperial..now.temp_imperial_unit):gsub("°","FF°°")})<br />
--out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.feelslike_imperial..now.feelslike_imperial_unit})<br />
out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.temp_imperial..now.temp_imperial_unit}) -- NO FF°° HERE<br />
[[file:Gsub.jpg]]<br />
← Temp: shows the FF°° but ± doesn't.<br />
<br />
Now if you use it in a "repeat table" section of the template it will affect every instance that is repeated, which would make mrpeachy's original statement:<br />
in the example above, gsub finds every instance of "°F" and replaces it with "°" <br />
absolutely correct.<br />
<br />
Using things like this it should be possible to achieve any desired format for your output<br />
<br />
One more: [http://stackoverflow.com/questions/20284515/capitalize-first-letter-of-every-word-in-lua Capitalize first letter of every word in Lua]<br />
<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]<br />
<br />
''Some editorial modifications by Sestor11''</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Formatting_Tricks_(en)WUN Formatting Tricks (en)2014-02-22T16:19:42Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Formatting Tricks=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Formatting Tricks}}<br />
From the words of mrpeachy seen here in post [http://crunchbang.org/forums/viewtopic.php?pid=358223#p358223 #428].<br />
<br />
Because WUN weather templates are written in lua code you can do a lot of other things to the output of data options.<br />
<br />
If i were to try and cover ALL the bases in the data options there would be thousands of them!<br />
<br />
Example: using an option in the out function like so<br />
out({txt=now.location_full})<br />
for mrpeachy that outputs:<br />
Saint Louis, MO<br />
but, if you wanted all '''lowercase''' letters:<br />
out({txt=string.lower(now.location_full)})<br />
the output:<br />
saint louis, mo<br />
or if you wanted all '''caps''':<br />
out({txt=string.upper(now.location_full)})<br />
again the output:<br />
SAINT LOUIS, MO<br />
it also works for long multi part text strings like this:<br />
txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T"))<br />
That line would output something like:<br />
updated: Mon, 06 jan 2014 20:10:34 -0600 from data at saint louis, mo 22:15:41<br />
'''''NOTE''' the use of ( ) with this added feature:''<br />
out({txt=now.location_full})<br />
out({txt=string.lower(now.location_full)})<br />
<br />
out({txt="Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
out({txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
<br />
'''To reiterate:''' Make sure you surround all your output with brackets (), when using string.upper or string.lower<br />
<br />
Another example is '''gsub'''<br />
<br />
Say you have set in the config that makes imperial units for temperature display: "°F"<br />
However if there is a ''single'' part of the output that you think it would look better if it was just "°"<br />
<br />
you could remove the F in the template like this<br />
out({txt=(now.temp_imperial..now.temp_imperial_unit):gsub("°F","°")})<br />
<br />
'''NOTE:''' again, surround the output with brackets ()<br />
then add :gsub("find","replace") at the end<br />
<br />
Between the first set of quotes goes the text to find, between the second set of quotes goes the text to go in its place<br />
<br />
In the example above, gsub finds "°F" and replaces it with "°"<br />
<br />
'''''EDIT''''' by mrpeachy - This is probably a bad example because it would be much easier to just hard code the "°" into the output instead of using the units data options, but the same principal can be applied to lots of other things.<br />
<br />
This is why I added the ''single''<br />
<br />
Since my config is set to use "°" here's a reverse example where I commented out the feels_like temp line to show it in action:<br />
out({a=1,x=15,y=ypos,txt=("Temp : "..now.temp_imperial..now.temp_imperial_unit):gsub("°","FF°°")})<br />
--out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.feelslike_imperial..now.feelslike_imperial_unit})<br />
out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.temp_imperial..now.temp_imperial_unit}) -- NO FF°° HERE<br />
[[file:Gsub.jpg]]<br />
← Temp: shows the FF°° but ± doesn't.<br />
<br />
Now if you use it in a "repeat table" section of the template it will affect every instance that is repeated.<br />
<br />
Using things like this it should be possible to achieve any desired format for your output<br />
<br />
One more: [http://stackoverflow.com/questions/20284515/capitalize-first-letter-of-every-word-in-lua Capitalize first letter of every word in Lua]<br />
<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]<br />
<br />
''Some editorial modifications by Sestor11''</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_Icons_(en)WUN Weather Icons (en)2014-02-22T16:15:14Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather Icons=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather Icons}}<br />
Information taken from: Crunchbang Forums post dated: [http://crunchbang.org/forums/viewtopic.php?pid=360593#p360593 2014-02-06]<br />
<br />
It is quite easy to incorporate additional icon sets into the WUN lua script.<br />
If you have an icon set you want to use here is how to adapt it!<br />
<br />
*This file will create '''/icons_yours''' ([[media:icons_yours.tar.gz|icons_yours.tar.gz]]) extract it anywhere.<br />
**the folder is named "/icons_yours" but could be called anything you like<br />
**;'''''Suggestion'''''<br />
**:Rename icons_yours before continuing to something unique: ie: /icons_s11 then continue<br />
**in the folder "/icons_yours" there are 3 things<br />
***a folder called '''/icon''' - this is where the icons you want to use will be.<br />
***;''it is important that this folder is not renamed''<br />
***a shell script called: ''001_icon_symlink_basic.sh'', and <br />
***another shell script: ''001_icon_symlink_extended.sh''<br />
***:These scripts generate the symlinks from the icons in "/icons_yours/icon"<br />
***:They should be executable<br />
<br />
Looking in '''001_icon_symlink_basic.sh''' there are many lines that are all similar:<br />
ln -s -f ./icon/000 chanceflurries<br />
ln -s -f ./icon/000 nt_chanceflurries<br />
'''^''' these are the commands that create the symlinks<br />
ln -s -f<br />
'''^''' calls the program that creates the symlink<br />
./icon/000<br />
'''^''' is the name of the icon being used, ''this is the part that needs to be edited''<br />
chanceflurries<br />
'''^''' this is the name of the symlink that will be created<br />
*''it is important that none of the symlink names are altered''<br />
*in the examples above, night time icons are indicated by a preceding '''nt_'''<br />
Go through the script line by line, look at the description of the weather type in the symlink then pick the icon you want to be displayed and edit the line to point to that icon.<br />
<br />
''The only thing that should need to be changed is the '''000''' part of the icon name''<br />
<br />
'''For example:'''<br />
ln -s -f ./icon/000.png chanceflurries<br />
to<br />
ln -s -f ./icon/10.png chanceflurries<br />
*'''NOTES'''<br />
*;- you need to specify the icon name '''''and''''' extension.<br />
*:this method will work for any image file type; .png, .jpg, .gif, etc.<br />
*;- you could in fact have your original icons anywhere<br />
*:just edit the shell script to point to them<br />
<br />
If you have an extensive icon set you could also edit ''001_icon_symlink_extended.sh'' in a similar way:<br />
ln -s -f ./icon/000 01_l_drizzle<br />
ln -s -f ./icon/000 01_l_drizzle_nt<br />
ln -s -f ./icon/000 02_drizzle<br />
ln -s -f ./icon/000 02_drizzle_nt<br />
ln -s -f ./icon/000 03_h_drizzle<br />
ln -s -f ./icon/000 03_h_drizzle_nt<br />
<br />
in these examples the ''_l_'' stands for light, the ''_h_'' stands for heavy<br />
a following ''_nt'' signifies the night time icon<br />
<br />
When you have finished editing the shell scripts, run them to generate the symlinks<br />
open a terminal in the icons_yours folder, the location where the shell scripts are, and type<br />
001_icon_symlink_basic.sh<br />
or just double click and run<br />
<br />
Take a look through the symlinks to see if there were any mistakes<br />
if there are edit the files again and re-run them, they will overwrite the existing links.<br />
<br />
OK at this point everything looks good and the icons are all correct<br />
<br />
'''NOW:''' cut and paste /icons_yours to the wun/additional_files/weathericons/ directory.<br />
<br />
As per the example above I'd see: '''wun/additional_files/weathericons/icons_s11'''<br />
<br />
Edit the '''wun_config.lua''' file to point to the icons or use default_weather_icons variable in a template<br />
<br />
{| class="wikitable"<br />
|+Icons already prepared by mrpeachy<br/>''Showing: /icons_<name>/icons/05.png''<br/>so not the same ''condition''<br />
|-<br />
!Icon<br />
!File Name<br/>is the directory name<br />
!Link to author's site<br />
|-<br />
|[[file:icons_falldown_05.png|90px|thumb|center]]<br />
|[https://dl.dropboxusercontent.com/u/19008369/wun/icons_falldown.tar.gz icons_falldown.tar.gz]<br />
|[http://falldown-aka-chris.deviantart.com/gallery/ falldown]<br />
|-<br />
|[[file:icons_merlinthered_colorful_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_colorful.tar.gz|Icons_merlinthered_colorful.tar.gz]]<br />
|rowspan="6"|[http://merlinthered.deviantart.com/art/plain-weather-icons-157162192 merlinthered]<br />
|-<br />
|[[file:icons_merlinthered_dark_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_dark.tar.gz|Icons_merlinthered_dark.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_flat_black_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_flat_black.tar.gz|Icons_merlinthered_flat_black.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_flat_colorful_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_flat_colorful.tar.gz|Icons_merlinthered_flat_colorful.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_light_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_light.tar.gz|Icons_merlinthered_light.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_white_05.png|90px|thumb|center|It is here!]]<br />
|[[media:Icons_merlinthered_white.tar.gz|Icons_merlinthered_white.tar.gz]]<br />
|-<br />
|[[file:Icons_tick_05.png|90px|thumb|center]]<br />
|[[media:Icons_tick.tar.gz|Icons_tick.tar.gz]]<br />
|[http://xiao4.deviantart.com/art/tick-weather-icons-96294478 tick]<br />
|-<br />
|[[file:icons_wun_05.png|90px|thumb|center]]<br />
|Included in Archive<br/>old conkyForecast icons<br />
|/icons_wun<br />
|}<br />
<br />
That should be it. Any questions, ask in the Crunchbang thread: [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua)]<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Formatting_Tricks_(en)WUN Formatting Tricks (en)2014-02-22T16:14:20Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Formatting Tricks=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Formatting Tricks}}<br />
From the words of mrpeachy seen here in post [http://crunchbang.org/forums/viewtopic.php?pid=358223#p358223 #428].<br />
<br />
Because WUN weather templates are written in lua code you can do a lot of other things to the output of data options.<br />
<br />
If i were to try and cover ALL the bases in the data options there would be thousands of them!<br />
<br />
Example: using an option in the out function like so<br />
out({txt=now.location_full})<br />
for mrpeachy that outputs:<br />
Saint Louis, MO<br />
but, if you wanted all '''lowercase''' letters:<br />
out({txt=string.lower(now.location_full)})<br />
the output:<br />
saint louis, mo<br />
or if you wanted all '''caps''':<br />
out({txt=string.upper(now.location_full)})<br />
again the output:<br />
SAINT LOUIS, MO<br />
it also works for long multi part text strings like this:<br />
txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T"))<br />
That line would output something like:<br />
updated: Mon, 06 jan 2014 20:10:34 -0600 from data at saint louis, mo 22:15:41<br />
'''''NOTE''' the use of ( ) with this added feature:''<br />
out({txt=now.location_full})<br />
out({txt=string.lower(now.location_full)})<br />
<br />
out({txt="Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
out({txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
<br />
'''To reiterate:''' Make sure you surround all your output with brackets (), when using string.upper or string.lower<br />
<br />
Another example is '''gsub'''<br />
<br />
Say you have set in the config that makes imperial units for temperature display: "°F"<br />
However if there is a ''single'' part of the output that you think it would look better if it was just "°"<br />
<br />
you could remove the F in the template like this<br />
out({txt=(now.temp_imperial..now.temp_imperial_unit):gsub("°F","°")})<br />
<br />
'''NOTE:''' again, surround the output with brackets ()<br />
then add :gsub("find","replace") at the end<br />
<br />
Between the first set of quotes goes the text to find, between the second set of quotes goes the text to go in its place<br />
<br />
In the example above, gsub finds "°F" and replaces it with "°"<br />
<br />
'''''EDIT''''' by mrpeachy - This is probably a bad example because it would be much easier to just hard code the "°" into the output instead of using the units data options, but the same principal can be applied to lots of other things.<br />
<br />
This is why I added the ''single''<br />
<br />
Since my config is set to use "°" here's a reverse example where I commented out the feels like temp to show it in action:<br />
out({a=1,x=15,y=ypos,txt=("Temp : "..now.temp_imperial..now.temp_imperial_unit):gsub("°","FF°°")})<br />
--out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.feelslike_imperial..now.feelslike_imperial_unit})<br />
out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.temp_imperial..now.temp_imperial_unit}) -- NO FF°° HERE<br />
[[file:Gsub.jpg]]<br />
Temp: shows the FF°° but ± doesn't.<br />
<br />
Now use it in a repeat table of the template and it will affect every instance that is repeated.<br />
<br />
Using things like this it should be possible to achieve any desired format for your output<br />
<br />
One more: [http://stackoverflow.com/questions/20284515/capitalize-first-letter-of-every-word-in-lua Capitalize first letter of every word in Lua]<br />
<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]<br />
<br />
''Some editorial modifications by Sestor11''</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_(en)WUN Weather (en)2014-02-22T16:14:10Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather}}<br />
'''WUN''' a LUA weather script for conky using [http://www.wunderground.com/ wunderground] written maintained and supported by mrpeachy over at the Crunchbang [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua)] thread. The most current archive will always be found there, in the first post and linked to here, below (same links). You need to sign up to post at Crunchbang, but not to read the thread<br />
<br />
'''Feb 08, 2014:''' [https://dl.dropboxusercontent.com/u/19008369/wun/wun.tar.gz CURRENT COMPLETE ARCHIVE]<br />
<br />
'''Feb 03, 2014:''' [https://dl.dropboxusercontent.com/u/19008369/wun/wun.lua.tar.gz WUN.LUA SCRIPT ARCHIVE]<br />
<br />
[http://crunchbang.org/forums/viewtopic.php?pid=354940#p354940 WUN HISTORY] check it out.<br />
<br />
'''''NOTE''''' ''wun.lua'' is the main script that gathers and formats the data. It contains all the functions that are used in the templates<br />
As such, most changes/updates/bug fixes will occur in this file. New wun.lua scripts can then be extracted and the old script overwritten. The wun.lua script will always work with the latest complete archive, if it's date is the same or newer. Only download it to get newer functions or fixes<br />
<br />
[[File:Iweather falldown.lua.png|230px|thumb|right|'''Interactive template:'''<br />iweather_falldown.lua]]<br />
<br />
[[File:Astroweather.lua.jpg|230px|thumb|right|'''Static template:'''<br />astroweather.lua]]<br />
'''''OOTB''', these are the two templates used (and seen on the right):''<br />
*Interactive template: iweather_falldown.lua<br />
*Static template: astroweather.lua<br />
<br />
With an '''interactive''' conky template you will need to install ''xdotool'' to get the interactive action working in conky.<br />
<br />
The script is best extracted to /home/username/wun directory, but with a bit of tweaking it can go anywhere.<br />
<br />
The files and directory structure are:<br />
#/home/<username>/wun/ - three files<br />
#* read_me - please read it<br />
#* wun.lua - minor configuring required<br />
#*: ''see lines 4 to 14''<br />
#* wun_config.lua - configuring required<br />
#*: ''see lines 4 to 74 to start with''<br />
#/home/<username>/wun/additional_files - 5 sub-directories and 3 images<br />
#/home/<username>/wun/backup_data - 20 data backup files that the script uses IF: no net connection or one of the sites the script uses it down.<br />
#/home/<username>/wun/conky_configs - two conky files:<br />
## '''wunrc''' - runs the 'static' templates, it is configured to start: astroweather.lua<br />
## '''wunrci''' - runs the interactive templates, it is configured to start: iweather_falldown.lua<br />
#/home/<username>/wun/development docs - 18 files - have a look at them<br />
#/home/<username>/wun/templates - here's the meat of what you see on your desktop depending on what you choose.to use:<br />
#*Static templates, used by '''wunrc''':<br />
##astroweather.lua '''''shown above'''''<br />
##classic10day.lua<br />
##s11template.lua<br />
##wun_glassy_side_bar.lua<br />
##wun_template.lua<br />
#*Interactive templates:<br />
##iweather_falldown.lua '''''shown above'''''<br />
##iweather.lua<br />
##iweather_joe.lua<br />
<br />
'''RECAP:'''<br />
For the interactive templates, you need:<br />
*xdtool must be installed<br />
*you need to get an API key (''Cumulus Plan'')<br />
*conky -v in a terminal must end like this:<br />
<nowiki> * Lua<br />
<br />
Lua bindings:<br />
* Cairo<br />
* Imlib2<br />
<br />
26 Jan 14 | 15:07:26 ~<br />
$ </nowiki><br />
<br />
'''CREDITS:'''<br />
<br />
{|<br />
|[[File:WundergroundLogo 4c horz.jpg|none|link=http://www.wunderground.com|linked to wunderground]]<br />
|''wunderground.com is the source of the API weather data used by this script.''<br /><br />
You '''need''' to sign up for an [http://www.wunderground.com/weather/api api key], it's free but make sure you get the ''Cumulus Plan''<br />
|}<br />
[http://www.usno.navy.mil The United States Naval Observatory (USNO)] - for the sun & moon data.<br />
<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Formatting_Tricks_(en)WUN Formatting Tricks (en)2014-02-22T16:13:47Z<p>Sector11: /* Go To: */</p>
<hr />
<div>__NOTITLE__<br />
=WUN Formatting Tricks=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Formatting Tricks}}<br />
From the words of mrpeachy seen here in post [http://crunchbang.org/forums/viewtopic.php?pid=358223#p358223 #428].<br />
<br />
Because WUN weather templates are written in lua code you can do a lot of other things to the output of data options.<br />
<br />
If i were to try and cover ALL the bases in the data options there would be thousands of them!<br />
<br />
Example: using an option in the out function like so<br />
out({txt=now.location_full})<br />
for mrpeachy that outputs:<br />
Saint Louis, MO<br />
but, if you wanted all '''lowercase''' letters:<br />
out({txt=string.lower(now.location_full)})<br />
the output:<br />
saint louis, mo<br />
or if you wanted all '''caps''':<br />
out({txt=string.upper(now.location_full)})<br />
again the output:<br />
SAINT LOUIS, MO<br />
it also works for long multi part text strings like this:<br />
txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T"))<br />
That line would output something like:<br />
updated: Mon, 06 jan 2014 20:10:34 -0600 from data at saint louis, mo 22:15:41<br />
'''''NOTE''' the use of ( ) with this added feature:''<br />
out({txt=now.location_full})<br />
out({txt=string.lower(now.location_full)})<br />
<br />
out({txt="Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
out({txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
<br />
'''To reiterate:''' Make sure you surround all your output with brackets (), when using string.upper or string.lower<br />
<br />
Another example is '''gsub'''<br />
<br />
Say you have set in the config that makes imperial units for temperature display: "°F"<br />
However if there is a ''single'' part of the output that you think it would look better if it was just "°"<br />
<br />
you could remove the F in the template like this<br />
out({txt=(now.temp_imperial..now.temp_imperial_unit):gsub("°F","°")})<br />
<br />
'''NOTE:''' again, surround the output with brackets ()<br />
then add :gsub("find","replace") at the end<br />
<br />
Between the first set of quotes goes the text to find, between the second set of quotes goes the text to go in its place<br />
<br />
In the example above, gsub finds "°F" and replaces it with "°"<br />
<br />
'''''EDIT''''' by mrpeachy - This is probably a bad example because it would be much easier to just hard code the "°" into the output instead of using the units data options, but the same principal can be applied to lots of other things.<br />
<br />
This is why I added the ''single''<br />
<br />
Since my config is set to use "°" here's a reverse example where I commented out the feels like temp to show it in action:<br />
out({a=1,x=15,y=ypos,txt=("Temp : "..now.temp_imperial..now.temp_imperial_unit):gsub("°","FF°°")})<br />
--out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.feelslike_imperial..now.feelslike_imperial_unit})<br />
out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.temp_imperial..now.temp_imperial_unit}) -- NO FF°° HERE<br />
[[file:Gsub.jpg]]<br />
Temp: shows the FF°° but ± doesn't.<br />
<br />
Now use it in a repeat table of the template and it will affect every instance that is repeated.<br />
<br />
Using things like this it should be possible to achieve any desired format for your output<br />
<br />
One more: [http://stackoverflow.com/questions/20284515/capitalize-first-letter-of-every-word-in-lua Capitalize first letter of every word in Lua]<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]<br />
<br />
''Some editorial modifications by Sestor11''</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_Templates_(en)WUN Weather Templates (en)2014-02-22T16:13:29Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather Templates=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather Templates}}<br />
This is actually a ''Templates and HowTo'' combined page. There are a few tweaks required to run WUN.<br />
<br />
'''NOTE:''' The weather images, seen in all templates here are the creative work of falldown. '''KUDOS falldown!'''<br />
<br />
Lets look at '''''~/wun/wun:config.lua''''' first<br />
<br />
Changed line 16:<br />
key="yourkey",-- get the Cumulus Plan or above, must be in quotes<br />
to my api key for the Cumulus Plan I got from [http://www.wunderground.com/weather/api wunderground]. You did get yours right?<br />
<br />
Lines 70 to 74 changed:<br />
"/home/mcdowall/wun/<br />
to<br />
"/home/sector11/wun/<br />
use your <username> here, not me. :D<br />
<br />
You will need to change line 46 to your location as well.<br />
<br />
In the conky files I changed lines 2 & 3 to read:<br />
# conky -c /home/sector11/wun/conky_configs/wunrc &<br />
# pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
and<br />
# conky -c /home/sector11/wun/conky_configs/wunrc &<br />
# pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
respectively. Again, your <username>, not me.<br />
<br />
''No other changes implemented at this time''.<br />
<br />
This part is optional: I run:<br />
pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
yes, I know it's not running, bear with me ... now I run:<br />
conky -c /home/sector11/wun/conky_configs/wunrc &<br />
I get an error:<br />
Conky: llua_load: /home/sector11/wun/wun.lua:7: attempt to concatenate global 'username' (a nil value)<br />
I hit enter, up arrow, and enter again to activate:<br />
pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
I do this with any conky I am working on, not just WUN. Like I said; optional.<br />
<br />
Now, I go to '''~/wun/wun.lua''' and comment out lines 5 & 7 and change line 11:<br />
--username=os.getenv("USERNAME") -- line 5<br />
--defualt path to wun folder<br />
--pathtowun='/home/'..username..'/wun/' -- line 7<br />
--if you want to have your wun folder in a different location<br />
--enter the full path to the folder in quotes, for example:<br />
--#########################################<br />
pathtowun="/home/sector11/wun/" -- line 11<br />
and tried again ... and there it is on the right.<br />
[[File:astroweather.lua.jpg|200px|thumb|right|astroweather.lua]]<br />
No idea why my system doesn't accept the ''username=os.getenv("USERNAME")''<br />
<br />
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.<br />
<br />
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:<br />
change<br />
developer_mode=0,<br />
to<br />
developer_mode=1,<br />
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.<br />
<br />
The free wunderground api has a usage limit, while it is unlikely that the<br />
daily limit of 500 will be met, the minute limit of 10 is quite possible to<br />
exceed while in Normal Mode.<br />
<br />
Back to /wun/conky_configs/wunrc and set it to use the second template:<br />
#lua_load ~/wun/templates/astroweather.lua #900 900<br />
lua_load ~/wun/templates/s11template.lua #350 900<br />
#lua_load ~/wun/templates/wun_glassy_side_bar.lua #200 900<br />
#lua_load ~/wun/templates/classic10day.lua #600 900<br />
#lua_load ~/wun/templates/testing/wun_testing.lua##unfinished<br />
and change<br />
### Minimum size of window: width height<br />
minimum_size 350 900<br />
<br />
### Maximum width of window<br />
maximum_width 350<br />
to match the template. That's it on the right<br />
[[File:s11template.lua.jpg|200px|thumb|right|s11template.lua]]<br />
Back in the terminal, hit enter, up arrow ''twice'' to get the pkill command, then enter and up twice again to restart wunrc<br />
[[File:wun_glassy_side_bar.lua.jpg|100px|thumb|left|wun_glassy_side_bar.lua]]<br />
Notice the beautiful red dots: '''Developer Mode''' I'm safe!<br />
<br />
There is another purpose for those dots as well, as stated in the ''wun_config.lua'' file:<br />
1 to force the script to use saved data and prevent downloading new data<br />
In developer mode all 3 indicator dots will be red<br />
<br />
0 for normal behaviour and the following colours will apply:<br />
<br />
The dots left to right:<br />
1st is the update indicator<br />
green when script is running<br />
turns yellow when script is updating<br />
2nd is the weather data indicator<br />
green if using current data<br />
yellow if using backup data once<br />
red if using backup data more than once<br />
3rd is the astronomy data indicator<br />
green if using current data<br />
yellow if using backup data once<br />
red if using backup data more than once<br />
<br />
Another static wunrc template, '''wun_glassy_side_bar.lua''', all mrpreachy, and 100% LUA as well. Except for the weather images that it.<br />
<br />
An old 10 v9000 weather template, '''classic10day.lua''', converted to WUN by mrpeachy<br />
[[File:classic10day.lua.jpg|200px|thumb|center|classic10day.lua]]<br />
<br />
<br clear=all>Coming up ... the interactive conky: '''''wunrci''''' with the default template: '''iweather_falldown.lua'''<br />
[[File:iweather_falldown.lua-1.jpg|200px|thmb|left|iweather_falldown.lua 1]][[File:iweather_falldown.lua-2.jpg|200px|thmb|right|iweather_falldown.lua 2]]<br />
[[File:iweather_falldown.lua-3.jpg|200px|thmb|center|iweather_falldown.lua 3]]<br />
<br clear=all>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!'''''<br />
<br />
On the left is the template open to show the 10 day selection bars.<br />
<br />
On the right the template is closed up, showing just today's current information<br />
<br />
In the centre showing Sat 1 Feb 2014 five days into the future from the time the screenshot was taken.<br />
<br />
<br clear=all>Next '''iweather.lua''' - another masterful creation by falldown.<br />
[[File:iweather.lua-1.jpg|200px|thmb|left|iweather.lua 1]][[File:iweather.lua-2.jpg|200px|thmb|right|iweather.lua 2]]<br />
[[File:iweather.lua-3.jpg|200px|thmb|center|iweather.lua 3]]<br />
<br clear=all>Two things come to mind:<br />
# 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.<br />
# 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.<br />
<br />
'''One OOPS!'''<br />
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.<br />
<br />
'''''The oops! has been corrected. 28 Jan 2014 - It now reads:'''''<br />
image({x=0,y=15,w=376,h=265*(620/421),file=pathtowun.."additional_files/backgrounds/bg.png"})<br />
... handy thing that "pathtowun"<br />
<br />
I also find these settings better suited to '''iweather.lua:''' ''An opinion!''<br />
### Minimum size of window: width height<br />
minimum_size 370 420<br />
<br />
### Maximum width of window<br />
maximum_width 370<br />
your milage may vary.<br />
<br />
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.<br />
[[File:iweather_joe.lua-1.jpg|200px|thumb|left|iweather_joe.lua 1]] [[File:iweather_joe.lua-2.jpg|200px|thumb|right|iweather_joe.lua 2]]<br />
[[File:iweather_joe.lua-1.jpg|200px|thumb|center|iweather_joe.lua 3]]<br />
<br clear=all>Patterned after falldown's "bg.png" image, this all lua interactive conky gives testament to that layout, jst_joe took it up a step.<br />
<br />
As I said it doesn't seem to be as background friendly as falldown's creation, favouring lighter backgrounds, [http://crunchbang.org/forums/viewtopic.php?pid=359022#p359022 but I found 'draw-bg.lua' could take care of that quite nicely].<br />
<br />
'''Excellent work guys! Hot chocolate and cookies served at 6!'''<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Formatting_Tricks_(en)WUN Formatting Tricks (en)2014-02-22T16:08:22Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Formatting Tricks=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Formatting Tricks}}<br />
From the words of mrpeachy seen here in post [http://crunchbang.org/forums/viewtopic.php?pid=358223#p358223 #428].<br />
<br />
Because WUN weather templates are written in lua code you can do a lot of other things to the output of data options.<br />
<br />
If i were to try and cover ALL the bases in the data options there would be thousands of them!<br />
<br />
Example: using an option in the out function like so<br />
out({txt=now.location_full})<br />
for mrpeachy that outputs:<br />
Saint Louis, MO<br />
but, if you wanted all '''lowercase''' letters:<br />
out({txt=string.lower(now.location_full)})<br />
the output:<br />
saint louis, mo<br />
or if you wanted all '''caps''':<br />
out({txt=string.upper(now.location_full)})<br />
again the output:<br />
SAINT LOUIS, MO<br />
it also works for long multi part text strings like this:<br />
txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T"))<br />
That line would output something like:<br />
updated: Mon, 06 jan 2014 20:10:34 -0600 from data at saint louis, mo 22:15:41<br />
'''''NOTE''' the use of ( ) with this added feature:''<br />
out({txt=now.location_full})<br />
out({txt=string.lower(now.location_full)})<br />
<br />
out({txt="Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
out({txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
<br />
'''To reiterate:''' Make sure you surround all your output with brackets (), when using string.upper or string.lower<br />
<br />
Another example is '''gsub'''<br />
<br />
Say you have set in the config that makes imperial units for temperature display: "°F"<br />
However if there is a ''single'' part of the output that you think it would look better if it was just "°"<br />
<br />
you could remove the F in the template like this<br />
out({txt=(now.temp_imperial..now.temp_imperial_unit):gsub("°F","°")})<br />
<br />
'''NOTE:''' again, surround the output with brackets ()<br />
then add :gsub("find","replace") at the end<br />
<br />
Between the first set of quotes goes the text to find, between the second set of quotes goes the text to go in its place<br />
<br />
In the example above, gsub finds "°F" and replaces it with "°"<br />
<br />
'''''EDIT''''' by mrpeachy - This is probably a bad example because it would be much easier to just hard code the "°" into the output instead of using the units data options, but the same principal can be applied to lots of other things.<br />
<br />
This is why I added the ''single''<br />
<br />
Since my config is set to use "°" here's a reverse example where I commented out the feels like temp to show it in action:<br />
out({a=1,x=15,y=ypos,txt=("Temp : "..now.temp_imperial..now.temp_imperial_unit):gsub("°","FF°°")})<br />
--out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.feelslike_imperial..now.feelslike_imperial_unit})<br />
out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.temp_imperial..now.temp_imperial_unit}) -- NO FF°° HERE<br />
[[file:Gsub.jpg]]<br />
Temp: shows the FF°° but ± doesn't.<br />
<br />
Now use it in a repeat table of the template and it will affect every instance that is repeated.<br />
<br />
Using things like this it should be possible to achieve any desired format for your output<br />
<br />
One more: [http://stackoverflow.com/questions/20284515/capitalize-first-letter-of-every-word-in-lua Capitalize first letter of every word in Lua]<br />
==Go To:==<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]<br />
<br />
''Some editorial modifications by Sestor11''</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_(en)WUN Weather (en)2014-02-22T16:07:06Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather}}<br />
'''WUN''' a LUA weather script for conky using [http://www.wunderground.com/ wunderground] written maintained and supported by mrpeachy over at the Crunchbang [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua)] thread. The most current archive will always be found there, in the first post and linked to here, below (same links). You need to sign up to post at Crunchbang, but not to read the thread<br />
<br />
'''Feb 08, 2014:''' [https://dl.dropboxusercontent.com/u/19008369/wun/wun.tar.gz CURRENT COMPLETE ARCHIVE]<br />
<br />
'''Feb 03, 2014:''' [https://dl.dropboxusercontent.com/u/19008369/wun/wun.lua.tar.gz WUN.LUA SCRIPT ARCHIVE]<br />
<br />
[http://crunchbang.org/forums/viewtopic.php?pid=354940#p354940 WUN HISTORY] check it out.<br />
<br />
'''''NOTE''''' ''wun.lua'' is the main script that gathers and formats the data. It contains all the functions that are used in the templates<br />
As such, most changes/updates/bug fixes will occur in this file. New wun.lua scripts can then be extracted and the old script overwritten. The wun.lua script will always work with the latest complete archive, if it's date is the same or newer. Only download it to get newer functions or fixes<br />
<br />
[[File:Iweather falldown.lua.png|230px|thumb|right|'''Interactive template:'''<br />iweather_falldown.lua]]<br />
<br />
[[File:Astroweather.lua.jpg|230px|thumb|right|'''Static template:'''<br />astroweather.lua]]<br />
'''''OOTB''', these are the two templates used (and seen on the right):''<br />
*Interactive template: iweather_falldown.lua<br />
*Static template: astroweather.lua<br />
<br />
With an '''interactive''' conky template you will need to install ''xdotool'' to get the interactive action working in conky.<br />
<br />
The script is best extracted to /home/username/wun directory, but with a bit of tweaking it can go anywhere.<br />
<br />
The files and directory structure are:<br />
#/home/<username>/wun/ - three files<br />
#* read_me - please read it<br />
#* wun.lua - minor configuring required<br />
#*: ''see lines 4 to 14''<br />
#* wun_config.lua - configuring required<br />
#*: ''see lines 4 to 74 to start with''<br />
#/home/<username>/wun/additional_files - 5 sub-directories and 3 images<br />
#/home/<username>/wun/backup_data - 20 data backup files that the script uses IF: no net connection or one of the sites the script uses it down.<br />
#/home/<username>/wun/conky_configs - two conky files:<br />
## '''wunrc''' - runs the 'static' templates, it is configured to start: astroweather.lua<br />
## '''wunrci''' - runs the interactive templates, it is configured to start: iweather_falldown.lua<br />
#/home/<username>/wun/development docs - 18 files - have a look at them<br />
#/home/<username>/wun/templates - here's the meat of what you see on your desktop depending on what you choose.to use:<br />
#*Static templates, used by '''wunrc''':<br />
##astroweather.lua '''''shown above'''''<br />
##classic10day.lua<br />
##s11template.lua<br />
##wun_glassy_side_bar.lua<br />
##wun_template.lua<br />
#*Interactive templates:<br />
##iweather_falldown.lua '''''shown above'''''<br />
##iweather.lua<br />
##iweather_joe.lua<br />
<br />
'''RECAP:'''<br />
For the interactive templates, you need:<br />
*xdtool must be installed<br />
*you need to get an API key (''Cumulus Plan'')<br />
*conky -v in a terminal must end like this:<br />
<nowiki> * Lua<br />
<br />
Lua bindings:<br />
* Cairo<br />
* Imlib2<br />
<br />
26 Jan 14 | 15:07:26 ~<br />
$ </nowiki><br />
<br />
'''CREDITS:'''<br />
<br />
{|<br />
|[[File:WundergroundLogo 4c horz.jpg|none|link=http://www.wunderground.com|linked to wunderground]]<br />
|''wunderground.com is the source of the API weather data used by this script.''<br /><br />
You '''need''' to sign up for an [http://www.wunderground.com/weather/api api key], it's free but make sure you get the ''Cumulus Plan''<br />
|}<br />
[http://www.usno.navy.mil The United States Naval Observatory (USNO)] - for the sun & moon data.<br />
<br />
==Go To:==<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_Templates_(en)WUN Weather Templates (en)2014-02-22T16:06:44Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather Templates=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather Templates}}<br />
This is actually a ''Templates and HowTo'' combined page. There are a few tweaks required to run WUN.<br />
<br />
'''NOTE:''' The weather images, seen in all templates here are the creative work of falldown. '''KUDOS falldown!'''<br />
<br />
Lets look at '''''~/wun/wun:config.lua''''' first<br />
<br />
Changed line 16:<br />
key="yourkey",-- get the Cumulus Plan or above, must be in quotes<br />
to my api key for the Cumulus Plan I got from [http://www.wunderground.com/weather/api wunderground]. You did get yours right?<br />
<br />
Lines 70 to 74 changed:<br />
"/home/mcdowall/wun/<br />
to<br />
"/home/sector11/wun/<br />
use your <username> here, not me. :D<br />
<br />
You will need to change line 46 to your location as well.<br />
<br />
In the conky files I changed lines 2 & 3 to read:<br />
# conky -c /home/sector11/wun/conky_configs/wunrc &<br />
# pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
and<br />
# conky -c /home/sector11/wun/conky_configs/wunrc &<br />
# pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
respectively. Again, your <username>, not me.<br />
<br />
''No other changes implemented at this time''.<br />
<br />
This part is optional: I run:<br />
pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
yes, I know it's not running, bear with me ... now I run:<br />
conky -c /home/sector11/wun/conky_configs/wunrc &<br />
I get an error:<br />
Conky: llua_load: /home/sector11/wun/wun.lua:7: attempt to concatenate global 'username' (a nil value)<br />
I hit enter, up arrow, and enter again to activate:<br />
pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
I do this with any conky I am working on, not just WUN. Like I said; optional.<br />
<br />
Now, I go to '''~/wun/wun.lua''' and comment out lines 5 & 7 and change line 11:<br />
--username=os.getenv("USERNAME") -- line 5<br />
--defualt path to wun folder<br />
--pathtowun='/home/'..username..'/wun/' -- line 7<br />
--if you want to have your wun folder in a different location<br />
--enter the full path to the folder in quotes, for example:<br />
--#########################################<br />
pathtowun="/home/sector11/wun/" -- line 11<br />
and tried again ... and there it is on the right.<br />
[[File:astroweather.lua.jpg|200px|thumb|right|astroweather.lua]]<br />
No idea why my system doesn't accept the ''username=os.getenv("USERNAME")''<br />
<br />
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.<br />
<br />
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:<br />
change<br />
developer_mode=0,<br />
to<br />
developer_mode=1,<br />
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.<br />
<br />
The free wunderground api has a usage limit, while it is unlikely that the<br />
daily limit of 500 will be met, the minute limit of 10 is quite possible to<br />
exceed while in Normal Mode.<br />
<br />
Back to /wun/conky_configs/wunrc and set it to use the second template:<br />
#lua_load ~/wun/templates/astroweather.lua #900 900<br />
lua_load ~/wun/templates/s11template.lua #350 900<br />
#lua_load ~/wun/templates/wun_glassy_side_bar.lua #200 900<br />
#lua_load ~/wun/templates/classic10day.lua #600 900<br />
#lua_load ~/wun/templates/testing/wun_testing.lua##unfinished<br />
and change<br />
### Minimum size of window: width height<br />
minimum_size 350 900<br />
<br />
### Maximum width of window<br />
maximum_width 350<br />
to match the template. That's it on the right<br />
[[File:s11template.lua.jpg|200px|thumb|right|s11template.lua]]<br />
Back in the terminal, hit enter, up arrow ''twice'' to get the pkill command, then enter and up twice again to restart wunrc<br />
[[File:wun_glassy_side_bar.lua.jpg|100px|thumb|left|wun_glassy_side_bar.lua]]<br />
Notice the beautiful red dots: '''Developer Mode''' I'm safe!<br />
<br />
There is another purpose for those dots as well, as stated in the ''wun_config.lua'' file:<br />
1 to force the script to use saved data and prevent downloading new data<br />
In developer mode all 3 indicator dots will be red<br />
<br />
0 for normal behaviour and the following colours will apply:<br />
<br />
The dots left to right:<br />
1st is the update indicator<br />
green when script is running<br />
turns yellow when script is updating<br />
2nd is the weather data indicator<br />
green if using current data<br />
yellow if using backup data once<br />
red if using backup data more than once<br />
3rd is the astronomy data indicator<br />
green if using current data<br />
yellow if using backup data once<br />
red if using backup data more than once<br />
<br />
Another static wunrc template, '''wun_glassy_side_bar.lua''', all mrpreachy, and 100% LUA as well. Except for the weather images that it.<br />
<br />
An old 10 v9000 weather template, '''classic10day.lua''', converted to WUN by mrpeachy<br />
[[File:classic10day.lua.jpg|200px|thumb|center|classic10day.lua]]<br />
<br />
<br clear=all>Coming up ... the interactive conky: '''''wunrci''''' with the default template: '''iweather_falldown.lua'''<br />
[[File:iweather_falldown.lua-1.jpg|200px|thmb|left|iweather_falldown.lua 1]][[File:iweather_falldown.lua-2.jpg|200px|thmb|right|iweather_falldown.lua 2]]<br />
[[File:iweather_falldown.lua-3.jpg|200px|thmb|center|iweather_falldown.lua 3]]<br />
<br clear=all>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!'''''<br />
<br />
On the left is the template open to show the 10 day selection bars.<br />
<br />
On the right the template is closed up, showing just today's current information<br />
<br />
In the centre showing Sat 1 Feb 2014 five days into the future from the time the screenshot was taken.<br />
<br />
<br clear=all>Next '''iweather.lua''' - another masterful creation by falldown.<br />
[[File:iweather.lua-1.jpg|200px|thmb|left|iweather.lua 1]][[File:iweather.lua-2.jpg|200px|thmb|right|iweather.lua 2]]<br />
[[File:iweather.lua-3.jpg|200px|thmb|center|iweather.lua 3]]<br />
<br clear=all>Two things come to mind:<br />
# 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.<br />
# 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.<br />
<br />
'''One OOPS!'''<br />
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.<br />
<br />
'''''The oops! has been corrected. 28 Jan 2014 - It now reads:'''''<br />
image({x=0,y=15,w=376,h=265*(620/421),file=pathtowun.."additional_files/backgrounds/bg.png"})<br />
... handy thing that "pathtowun"<br />
<br />
I also find these settings better suited to '''iweather.lua:''' ''An opinion!''<br />
### Minimum size of window: width height<br />
minimum_size 370 420<br />
<br />
### Maximum width of window<br />
maximum_width 370<br />
your milage may vary.<br />
<br />
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.<br />
[[File:iweather_joe.lua-1.jpg|200px|thumb|left|iweather_joe.lua 1]] [[File:iweather_joe.lua-2.jpg|200px|thumb|right|iweather_joe.lua 2]]<br />
[[File:iweather_joe.lua-1.jpg|200px|thumb|center|iweather_joe.lua 3]]<br />
<br clear=all>Patterned after falldown's "bg.png" image, this all lua interactive conky gives testament to that layout, jst_joe took it up a step.<br />
<br />
As I said it doesn't seem to be as background friendly as falldown's creation, favouring lighter backgrounds, [http://crunchbang.org/forums/viewtopic.php?pid=359022#p359022 but I found 'draw-bg.lua' could take care of that quite nicely].<br />
<br />
'''Excellent work guys! Hot chocolate and cookies served at 6!'''<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]]<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_Icons_(en)WUN Weather Icons (en)2014-02-22T16:06:27Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather Icons=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather Icons}}<br />
Information taken from: Crunchbang Forums post dated: [http://crunchbang.org/forums/viewtopic.php?pid=360593#p360593 2014-02-06]<br />
<br />
It is quite easy to incorporate additional icon sets into the WUN lua script.<br />
If you have an icon set you want to use here is how to adapt it!<br />
<br />
*This file will create '''/icons_yours''' ([[media:icons_yours.tar.gz|icons_yours.tar.gz]]) extract it anywhere.<br />
**the folder is named "/icons_yours" but could be called anything you like<br />
**;'''''Suggestion'''''<br />
**:Rename icons_yours before continuing to something unique: ie: /icons_s11 then continue<br />
**in the folder "/icons_yours" there are 3 things<br />
***a folder called '''/icon''' - this is where the icons you want to use will be.<br />
***;''it is important that this folder is not renamed''<br />
***a shell script called: ''001_icon_symlink_basic.sh'', and <br />
***another shell script: ''001_icon_symlink_extended.sh''<br />
***:These scripts generate the symlinks from the icons in "/icons_yours/icon"<br />
***:They should be executable<br />
<br />
Looking in '''001_icon_symlink_basic.sh''' there are many lines that are all similar:<br />
ln -s -f ./icon/000 chanceflurries<br />
ln -s -f ./icon/000 nt_chanceflurries<br />
'''^''' these are the commands that create the symlinks<br />
ln -s -f<br />
'''^''' calls the program that creates the symlink<br />
./icon/000<br />
'''^''' is the name of the icon being used, ''this is the part that needs to be edited''<br />
chanceflurries<br />
'''^''' this is the name of the symlink that will be created<br />
*''it is important that none of the symlink names are altered''<br />
*in the examples above, night time icons are indicated by a preceding '''nt_'''<br />
Go through the script line by line, look at the description of the weather type in the symlink then pick the icon you want to be displayed and edit the line to point to that icon.<br />
<br />
''The only thing that should need to be changed is the '''000''' part of the icon name''<br />
<br />
'''For example:'''<br />
ln -s -f ./icon/000.png chanceflurries<br />
to<br />
ln -s -f ./icon/10.png chanceflurries<br />
*'''NOTES'''<br />
*;- you need to specify the icon name '''''and''''' extension.<br />
*:this method will work for any image file type; .png, .jpg, .gif, etc.<br />
*;- you could in fact have your original icons anywhere<br />
*:just edit the shell script to point to them<br />
<br />
If you have an extensive icon set you could also edit ''001_icon_symlink_extended.sh'' in a similar way:<br />
ln -s -f ./icon/000 01_l_drizzle<br />
ln -s -f ./icon/000 01_l_drizzle_nt<br />
ln -s -f ./icon/000 02_drizzle<br />
ln -s -f ./icon/000 02_drizzle_nt<br />
ln -s -f ./icon/000 03_h_drizzle<br />
ln -s -f ./icon/000 03_h_drizzle_nt<br />
<br />
in these examples the ''_l_'' stands for light, the ''_h_'' stands for heavy<br />
a following ''_nt'' signifies the night time icon<br />
<br />
When you have finished editing the shell scripts, run them to generate the symlinks<br />
open a terminal in the icons_yours folder, the location where the shell scripts are, and type<br />
001_icon_symlink_basic.sh<br />
or just double click and run<br />
<br />
Take a look through the symlinks to see if there were any mistakes<br />
if there are edit the files again and re-run them, they will overwrite the existing links.<br />
<br />
OK at this point everything looks good and the icons are all correct<br />
<br />
'''NOW:''' cut and paste /icons_yours to the wun/additional_files/weathericons/ directory.<br />
<br />
As per the example above I'd see: '''wun/additional_files/weathericons/icons_s11'''<br />
<br />
Edit the '''wun_config.lua''' file to point to the icons or use default_weather_icons variable in a template<br />
<br />
{| class="wikitable"<br />
|+Icons already prepared by mrpeachy<br/>''Showing: /icons_<name>/icons/05.png''<br/>so not the same ''condition''<br />
|-<br />
!Icon<br />
!File Name<br/>is the directory name<br />
!Link to author's site<br />
|-<br />
|[[file:icons_falldown_05.png|90px|thumb|center]]<br />
|[https://dl.dropboxusercontent.com/u/19008369/wun/icons_falldown.tar.gz icons_falldown.tar.gz]<br />
|[http://falldown-aka-chris.deviantart.com/gallery/ falldown]<br />
|-<br />
|[[file:icons_merlinthered_colorful_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_colorful.tar.gz|Icons_merlinthered_colorful.tar.gz]]<br />
|rowspan="6"|[http://merlinthered.deviantart.com/art/plain-weather-icons-157162192 merlinthered]<br />
|-<br />
|[[file:icons_merlinthered_dark_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_dark.tar.gz|Icons_merlinthered_dark.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_flat_black_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_flat_black.tar.gz|Icons_merlinthered_flat_black.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_flat_colorful_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_flat_colorful.tar.gz|Icons_merlinthered_flat_colorful.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_light_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_light.tar.gz|Icons_merlinthered_light.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_white_05.png|90px|thumb|center|It is here!]]<br />
|[[media:Icons_merlinthered_white.tar.gz|Icons_merlinthered_white.tar.gz]]<br />
|-<br />
|[[file:Icons_tick_05.png|90px|thumb|center]]<br />
|[[media:Icons_tick.tar.gz|Icons_tick.tar.gz]]<br />
|[http://xiao4.deviantart.com/art/tick-weather-icons-96294478 tick]<br />
|-<br />
|[[file:icons_wun_05.png|90px|thumb|center]]<br />
|Included in Archive<br/>old conkyForecast icons<br />
|/icons_wun<br />
|}<br />
<br />
That should be it. Any questions, ask in the Crunchbang thread: [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua)]<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] Main Page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Formatting Tricks (en)|WUN Formatting Tricks]]</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Formatting_Tricks_(en)WUN Formatting Tricks (en)2014-02-22T15:55:46Z<p>Sector11: Created page with "__NOTITLE__ =WUN Formatting Tricks= Category:English Category:Programs (en) Category:Tips and tricks (en) {{i18n|en|WUN Formatting Tricks}} From the words of mrpeachy..."</p>
<hr />
<div>__NOTITLE__<br />
=WUN Formatting Tricks=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Formatting Tricks}}<br />
From the words of mrpeachy seen here in post [http://crunchbang.org/forums/viewtopic.php?pid=358223#p358223 #428].<br />
<br />
Because WUN weather templates are written in lua code you can do a lot of other things to the output of data options.<br />
<br />
If i were to try and cover ALL the bases in the data options there would be thousands of them!<br />
<br />
Example: using an option in the out function like so<br />
out({txt=now.location_full})<br />
for mrpeachy that outputs:<br />
Saint Louis, MO<br />
but, if you wanted all '''lowercase''' letters:<br />
out({txt=string.lower(now.location_full)})<br />
the output:<br />
saint louis, mo<br />
or if you wanted all '''caps''':<br />
out({txt=string.upper(now.location_full)})<br />
again the output:<br />
SAINT LOUIS, MO<br />
it also works for long multi part text strings like this:<br />
txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T"))<br />
That line would output something like:<br />
updated: Mon, 06 jan 2014 20:10:34 -0600 from data at saint louis, mo 22:15:41<br />
'''''NOTE''' the use of ( ) with this added feature:''<br />
out({txt=now.location_full})<br />
out({txt=string.lower(now.location_full)})<br />
<br />
out({txt="Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
out({txt=string.lower("Updated: "..now.observation_time_rfc822.." from data at: "..now.observation_location_city.." "..os.date("%T")})<br />
<br />
'''To reiterate:''' Make sure you surround all your output with brackets (), when using string.upper or string.lower<br />
<br />
Another example is '''gsub'''<br />
<br />
Say you have set in the config that makes imperial units for temperature display: "°F"<br />
However if there is a ''single'' part of the output that you think it would look better if it was just "°"<br />
<br />
you could remove the F in the template like this<br />
out({txt=(now.temp_imperial..now.temp_imperial_unit):gsub("°F","°")})<br />
<br />
'''NOTE:''' again, surround the output with brackets ()<br />
then add :gsub("find","replace") at the end<br />
<br />
Between the first set of quotes goes the text to find, between the second set of quotes goes the text to go in its place<br />
<br />
In the example above, gsub finds "°F" and replaces it with "°"<br />
<br />
'''''EDIT''''' by mrpeachy - This is probably a bad example because it would be much easier to just hard code the "°" into the output instead of using the units data options, but the same principal can be applied to lots of other things.<br />
<br />
This is why I added the ''single''<br />
<br />
Since my config is set to use "°" here's a reverse example where I commented out the feels like temp to show it in action:<br />
out({a=1,x=15,y=ypos,txt=("Temp : "..now.temp_imperial..now.temp_imperial_unit):gsub("°","FF°°")})<br />
--out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.feelslike_imperial..now.feelslike_imperial_unit})<br />
out({a=1,c=0xFFD700,x=115,y=ypos,txt=" ±: "..now.temp_imperial..now.temp_imperial_unit}) -- NO FF°° HERE<br />
[[file:Gsub.jpg]]<br />
Temp: shows the FF°° but ± doesn't.<br />
<br />
Now use it in a repeat table of the template and it will affect every instance that is repeated.<br />
<br />
Using things like this it should be possible to achieve any desired format for your output<br />
<br />
One more: [http://stackoverflow.com/questions/20284515/capitalize-first-letter-of-every-word-in-lua Capitalize first letter of every word in Lua]<br />
<br />
''Some editorial modifications by Sestor11''</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Gsub.jpgFile:Gsub.jpg2014-02-22T15:48:49Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_Icons_(en)WUN Weather Icons (en)2014-02-14T20:27:00Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather Icons=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather Icons}}<br />
Information taken from: Crunchbang Forums post dated: [http://crunchbang.org/forums/viewtopic.php?pid=360593#p360593 2014-02-06]<br />
<br />
It is quite easy to incorporate additional icon sets into the WUN lua script.<br />
If you have an icon set you want to use here is how to adapt it!<br />
<br />
*This file will create '''/icons_yours''' ([[media:icons_yours.tar.gz|icons_yours.tar.gz]]) extract it anywhere.<br />
**the folder is named "/icons_yours" but could be called anything you like<br />
**;'''''Suggestion'''''<br />
**:Rename icons_yours before continuing to something unique: ie: /icons_s11 then continue<br />
**in the folder "/icons_yours" there are 3 things<br />
***a folder called '''/icon''' - this is where the icons you want to use will be.<br />
***;''it is important that this folder is not renamed''<br />
***a shell script called: ''001_icon_symlink_basic.sh'', and <br />
***another shell script: ''001_icon_symlink_extended.sh''<br />
***:These scripts generate the symlinks from the icons in "/icons_yours/icon"<br />
***:They should be executable<br />
<br />
Looking in '''001_icon_symlink_basic.sh''' there are many lines that are all similar:<br />
ln -s -f ./icon/000 chanceflurries<br />
ln -s -f ./icon/000 nt_chanceflurries<br />
'''^''' these are the commands that create the symlinks<br />
ln -s -f<br />
'''^''' calls the program that creates the symlink<br />
./icon/000<br />
'''^''' is the name of the icon being used, ''this is the part that needs to be edited''<br />
chanceflurries<br />
'''^''' this is the name of the symlink that will be created<br />
*''it is important that none of the symlink names are altered''<br />
*in the examples above, night time icons are indicated by a preceding '''nt_'''<br />
Go through the script line by line, look at the description of the weather type in the symlink then pick the icon you want to be displayed and edit the line to point to that icon.<br />
<br />
''The only thing that should need to be changed is the '''000''' part of the icon name''<br />
<br />
'''For example:'''<br />
ln -s -f ./icon/000.png chanceflurries<br />
to<br />
ln -s -f ./icon/10.png chanceflurries<br />
*'''NOTES'''<br />
*;- you need to specify the icon name '''''and''''' extension.<br />
*:this method will work for any image file type; .png, .jpg, .gif, etc.<br />
*;- you could in fact have your original icons anywhere<br />
*:just edit the shell script to point to them<br />
<br />
If you have an extensive icon set you could also edit ''001_icon_symlink_extended.sh'' in a similar way:<br />
ln -s -f ./icon/000 01_l_drizzle<br />
ln -s -f ./icon/000 01_l_drizzle_nt<br />
ln -s -f ./icon/000 02_drizzle<br />
ln -s -f ./icon/000 02_drizzle_nt<br />
ln -s -f ./icon/000 03_h_drizzle<br />
ln -s -f ./icon/000 03_h_drizzle_nt<br />
<br />
in these examples the ''_l_'' stands for light, the ''_h_'' stands for heavy<br />
a following ''_nt'' signifies the night time icon<br />
<br />
When you have finished editing the shell scripts, run them to generate the symlinks<br />
open a terminal in the icons_yours folder, the location where the shell scripts are, and type<br />
001_icon_symlink_basic.sh<br />
or just double click and run<br />
<br />
Take a look through the symlinks to see if there were any mistakes<br />
if there are edit the files again and re-run them, they will overwrite the existing links.<br />
<br />
OK at this point everything looks good and the icons are all correct<br />
<br />
'''NOW:''' cut and paste /icons_yours to the wun/additional_files/weathericons/ directory.<br />
<br />
As per the example above I'd see: '''wun/additional_files/weathericons/icons_s11'''<br />
<br />
Edit the '''wun_config.lua''' file to point to the icons or use default_weather_icons variable in a template<br />
<br />
{| class="wikitable"<br />
|+Icons already prepared by mrpeachy<br/>''Showing: /icons_<name>/icons/05.png''<br/>so not the same ''condition''<br />
|-<br />
!Icon<br />
!File Name<br/>is the directory name<br />
!Link to author's site<br />
|-<br />
|[[file:icons_falldown_05.png|90px|thumb|center]]<br />
|[https://dl.dropboxusercontent.com/u/19008369/wun/icons_falldown.tar.gz icons_falldown.tar.gz]<br />
|[http://falldown-aka-chris.deviantart.com/gallery/ falldown]<br />
|-<br />
|[[file:icons_merlinthered_colorful_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_colorful.tar.gz|Icons_merlinthered_colorful.tar.gz]]<br />
|rowspan="6"|[http://merlinthered.deviantart.com/art/plain-weather-icons-157162192 merlinthered]<br />
|-<br />
|[[file:icons_merlinthered_dark_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_dark.tar.gz|Icons_merlinthered_dark.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_flat_black_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_flat_black.tar.gz|Icons_merlinthered_flat_black.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_flat_colorful_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_flat_colorful.tar.gz|Icons_merlinthered_flat_colorful.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_light_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_light.tar.gz|Icons_merlinthered_light.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_white_05.png|90px|thumb|center|It is here!]]<br />
|[[media:Icons_merlinthered_white.tar.gz|Icons_merlinthered_white.tar.gz]]<br />
|-<br />
|[[file:Icons_tick_05.png|90px|thumb|center]]<br />
|[[media:Icons_tick.tar.gz|Icons_tick.tar.gz]]<br />
|[http://xiao4.deviantart.com/art/tick-weather-icons-96294478 tick]<br />
|-<br />
|[[file:icons_wun_05.png|90px|thumb|center]]<br />
|Included in Archive<br/>old conkyForecast icons<br />
|/icons_wun<br />
|}<br />
<br />
That should be it. Any questions, ask in the Crunchbang thread: [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua)]<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] main page.<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_Templates_(en)WUN Weather Templates (en)2014-02-14T20:24:50Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather Templates=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather Templates}}<br />
This is actually a ''Templates and HowTo'' combined page. There are a few tweaks required to run WUN.<br />
<br />
'''NOTE:''' The weather images, seen in all templates here are the creative work of falldown. '''KUDOS falldown!'''<br />
<br />
Lets look at '''''~/wun/wun:config.lua''''' first<br />
<br />
Changed line 16:<br />
key="yourkey",-- get the Cumulus Plan or above, must be in quotes<br />
to my api key for the Cumulus Plan I got from [http://www.wunderground.com/weather/api wunderground]. You did get yours right?<br />
<br />
Lines 70 to 74 changed:<br />
"/home/mcdowall/wun/<br />
to<br />
"/home/sector11/wun/<br />
use your <username> here, not me. :D<br />
<br />
You will need to change line 46 to your location as well.<br />
<br />
In the conky files I changed lines 2 & 3 to read:<br />
# conky -c /home/sector11/wun/conky_configs/wunrc &<br />
# pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
and<br />
# conky -c /home/sector11/wun/conky_configs/wunrc &<br />
# pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
respectively. Again, your <username>, not me.<br />
<br />
''No other changes implemented at this time''.<br />
<br />
This part is optional: I run:<br />
pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
yes, I know it's not running, bear with me ... now I run:<br />
conky -c /home/sector11/wun/conky_configs/wunrc &<br />
I get an error:<br />
Conky: llua_load: /home/sector11/wun/wun.lua:7: attempt to concatenate global 'username' (a nil value)<br />
I hit enter, up arrow, and enter again to activate:<br />
pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
I do this with any conky I am working on, not just WUN. Like I said; optional.<br />
<br />
Now, I go to '''~/wun/wun.lua''' and comment out lines 5 & 7 and change line 11:<br />
--username=os.getenv("USERNAME") -- line 5<br />
--defualt path to wun folder<br />
--pathtowun='/home/'..username..'/wun/' -- line 7<br />
--if you want to have your wun folder in a different location<br />
--enter the full path to the folder in quotes, for example:<br />
--#########################################<br />
pathtowun="/home/sector11/wun/" -- line 11<br />
and tried again ... and there it is on the right.<br />
[[File:astroweather.lua.jpg|200px|thumb|right|astroweather.lua]]<br />
No idea why my system doesn't accept the ''username=os.getenv("USERNAME")''<br />
<br />
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.<br />
<br />
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:<br />
change<br />
developer_mode=0,<br />
to<br />
developer_mode=1,<br />
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.<br />
<br />
The free wunderground api has a usage limit, while it is unlikely that the<br />
daily limit of 500 will be met, the minute limit of 10 is quite possible to<br />
exceed while in Normal Mode.<br />
<br />
Back to /wun/conky_configs/wunrc and set it to use the second template:<br />
#lua_load ~/wun/templates/astroweather.lua #900 900<br />
lua_load ~/wun/templates/s11template.lua #350 900<br />
#lua_load ~/wun/templates/wun_glassy_side_bar.lua #200 900<br />
#lua_load ~/wun/templates/classic10day.lua #600 900<br />
#lua_load ~/wun/templates/testing/wun_testing.lua##unfinished<br />
and change<br />
### Minimum size of window: width height<br />
minimum_size 350 900<br />
<br />
### Maximum width of window<br />
maximum_width 350<br />
to match the template. That's it on the right<br />
[[File:s11template.lua.jpg|200px|thumb|right|s11template.lua]]<br />
Back in the terminal, hit enter, up arrow ''twice'' to get the pkill command, then enter and up twice again to restart wunrc<br />
[[File:wun_glassy_side_bar.lua.jpg|100px|thumb|left|wun_glassy_side_bar.lua]]<br />
Notice the beautiful red dots: '''Developer Mode''' I'm safe!<br />
<br />
There is another purpose for those dots as well, as stated in the ''wun_config.lua'' file:<br />
1 to force the script to use saved data and prevent downloading new data<br />
In developer mode all 3 indicator dots will be red<br />
<br />
0 for normal behaviour and the following colours will apply:<br />
<br />
The dots left to right:<br />
1st is the update indicator<br />
green when script is running<br />
turns yellow when script is updating<br />
2nd is the weather data indicator<br />
green if using current data<br />
yellow if using backup data once<br />
red if using backup data more than once<br />
3rd is the astronomy data indicator<br />
green if using current data<br />
yellow if using backup data once<br />
red if using backup data more than once<br />
<br />
Another static wunrc template, '''wun_glassy_side_bar.lua''', all mrpreachy, and 100% LUA as well. Except for the weather images that it.<br />
<br />
An old 10 v9000 weather template, '''classic10day.lua''', converted to WUN by mrpeachy<br />
[[File:classic10day.lua.jpg|200px|thumb|center|classic10day.lua]]<br />
<br />
<br clear=all>Coming up ... the interactive conky: '''''wunrci''''' with the default template: '''iweather_falldown.lua'''<br />
[[File:iweather_falldown.lua-1.jpg|200px|thmb|left|iweather_falldown.lua 1]][[File:iweather_falldown.lua-2.jpg|200px|thmb|right|iweather_falldown.lua 2]]<br />
[[File:iweather_falldown.lua-3.jpg|200px|thmb|center|iweather_falldown.lua 3]]<br />
<br clear=all>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!'''''<br />
<br />
On the left is the template open to show the 10 day selection bars.<br />
<br />
On the right the template is closed up, showing just today's current information<br />
<br />
In the centre showing Sat 1 Feb 2014 five days into the future from the time the screenshot was taken.<br />
<br />
<br clear=all>Next '''iweather.lua''' - another masterful creation by falldown.<br />
[[File:iweather.lua-1.jpg|200px|thmb|left|iweather.lua 1]][[File:iweather.lua-2.jpg|200px|thmb|right|iweather.lua 2]]<br />
[[File:iweather.lua-3.jpg|200px|thmb|center|iweather.lua 3]]<br />
<br clear=all>Two things come to mind:<br />
# 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.<br />
# 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.<br />
<br />
'''One OOPS!'''<br />
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.<br />
<br />
'''''The oops! has been corrected. 28 Jan 2014 - It now reads:'''''<br />
image({x=0,y=15,w=376,h=265*(620/421),file=pathtowun.."additional_files/backgrounds/bg.png"})<br />
... handy thing that "pathtowun"<br />
<br />
I also find these settings better suited to '''iweather.lua:''' ''An opinion!''<br />
### Minimum size of window: width height<br />
minimum_size 370 420<br />
<br />
### Maximum width of window<br />
maximum_width 370<br />
your milage may vary.<br />
<br />
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.<br />
[[File:iweather_joe.lua-1.jpg|200px|thumb|left|iweather_joe.lua 1]] [[File:iweather_joe.lua-2.jpg|200px|thumb|right|iweather_joe.lua 2]]<br />
[[File:iweather_joe.lua-1.jpg|200px|thumb|center|iweather_joe.lua 3]]<br />
<br clear=all>Patterned after falldown's "bg.png" image, this all lua interactive conky gives testament to that layout, jst_joe took it up a step.<br />
<br />
As I said it doesn't seem to be as background friendly as falldown's creation, favouring lighter backgrounds, [http://crunchbang.org/forums/viewtopic.php?pid=359022#p359022 but I found 'draw-bg.lua' could take care of that quite nicely].<br />
<br />
'''Excellent work guys! Hot chocolate and cookies served at 6!'''<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] main page.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]].</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_Templates_(en)WUN Weather Templates (en)2014-02-14T20:24:33Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather Templates=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather Templates}}<br />
Go to: [[WUN Weather (en)]] main page.<br />
<br />
This is actually a ''Templates and HowTo'' combined page. There are a few tweaks required to run WUN.<br />
<br />
'''NOTE:''' The weather images, seen in all templates here are the creative work of falldown. '''KUDOS falldown!'''<br />
<br />
Lets look at '''''~/wun/wun:config.lua''''' first<br />
<br />
Changed line 16:<br />
key="yourkey",-- get the Cumulus Plan or above, must be in quotes<br />
to my api key for the Cumulus Plan I got from [http://www.wunderground.com/weather/api wunderground]. You did get yours right?<br />
<br />
Lines 70 to 74 changed:<br />
"/home/mcdowall/wun/<br />
to<br />
"/home/sector11/wun/<br />
use your <username> here, not me. :D<br />
<br />
You will need to change line 46 to your location as well.<br />
<br />
In the conky files I changed lines 2 & 3 to read:<br />
# conky -c /home/sector11/wun/conky_configs/wunrc &<br />
# pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
and<br />
# conky -c /home/sector11/wun/conky_configs/wunrc &<br />
# pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
respectively. Again, your <username>, not me.<br />
<br />
''No other changes implemented at this time''.<br />
<br />
This part is optional: I run:<br />
pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
yes, I know it's not running, bear with me ... now I run:<br />
conky -c /home/sector11/wun/conky_configs/wunrc &<br />
I get an error:<br />
Conky: llua_load: /home/sector11/wun/wun.lua:7: attempt to concatenate global 'username' (a nil value)<br />
I hit enter, up arrow, and enter again to activate:<br />
pkill -xf "conky -c /home/sector11/wun/conky_configs/wunrc" &<br />
I do this with any conky I am working on, not just WUN. Like I said; optional.<br />
<br />
Now, I go to '''~/wun/wun.lua''' and comment out lines 5 & 7 and change line 11:<br />
--username=os.getenv("USERNAME") -- line 5<br />
--defualt path to wun folder<br />
--pathtowun='/home/'..username..'/wun/' -- line 7<br />
--if you want to have your wun folder in a different location<br />
--enter the full path to the folder in quotes, for example:<br />
--#########################################<br />
pathtowun="/home/sector11/wun/" -- line 11<br />
and tried again ... and there it is on the right.<br />
[[File:astroweather.lua.jpg|200px|thumb|right|astroweather.lua]]<br />
No idea why my system doesn't accept the ''username=os.getenv("USERNAME")''<br />
<br />
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.<br />
<br />
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:<br />
change<br />
developer_mode=0,<br />
to<br />
developer_mode=1,<br />
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.<br />
<br />
The free wunderground api has a usage limit, while it is unlikely that the<br />
daily limit of 500 will be met, the minute limit of 10 is quite possible to<br />
exceed while in Normal Mode.<br />
<br />
Back to /wun/conky_configs/wunrc and set it to use the second template:<br />
#lua_load ~/wun/templates/astroweather.lua #900 900<br />
lua_load ~/wun/templates/s11template.lua #350 900<br />
#lua_load ~/wun/templates/wun_glassy_side_bar.lua #200 900<br />
#lua_load ~/wun/templates/classic10day.lua #600 900<br />
#lua_load ~/wun/templates/testing/wun_testing.lua##unfinished<br />
and change<br />
### Minimum size of window: width height<br />
minimum_size 350 900<br />
<br />
### Maximum width of window<br />
maximum_width 350<br />
to match the template. That's it on the right<br />
[[File:s11template.lua.jpg|200px|thumb|right|s11template.lua]]<br />
Back in the terminal, hit enter, up arrow ''twice'' to get the pkill command, then enter and up twice again to restart wunrc<br />
[[File:wun_glassy_side_bar.lua.jpg|100px|thumb|left|wun_glassy_side_bar.lua]]<br />
Notice the beautiful red dots: '''Developer Mode''' I'm safe!<br />
<br />
There is another purpose for those dots as well, as stated in the ''wun_config.lua'' file:<br />
1 to force the script to use saved data and prevent downloading new data<br />
In developer mode all 3 indicator dots will be red<br />
<br />
0 for normal behaviour and the following colours will apply:<br />
<br />
The dots left to right:<br />
1st is the update indicator<br />
green when script is running<br />
turns yellow when script is updating<br />
2nd is the weather data indicator<br />
green if using current data<br />
yellow if using backup data once<br />
red if using backup data more than once<br />
3rd is the astronomy data indicator<br />
green if using current data<br />
yellow if using backup data once<br />
red if using backup data more than once<br />
<br />
Another static wunrc template, '''wun_glassy_side_bar.lua''', all mrpreachy, and 100% LUA as well. Except for the weather images that it.<br />
<br />
An old 10 v9000 weather template, '''classic10day.lua''', converted to WUN by mrpeachy<br />
[[File:classic10day.lua.jpg|200px|thumb|center|classic10day.lua]]<br />
<br />
<br clear=all>Coming up ... the interactive conky: '''''wunrci''''' with the default template: '''iweather_falldown.lua'''<br />
[[File:iweather_falldown.lua-1.jpg|200px|thmb|left|iweather_falldown.lua 1]][[File:iweather_falldown.lua-2.jpg|200px|thmb|right|iweather_falldown.lua 2]]<br />
[[File:iweather_falldown.lua-3.jpg|200px|thmb|center|iweather_falldown.lua 3]]<br />
<br clear=all>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!'''''<br />
<br />
On the left is the template open to show the 10 day selection bars.<br />
<br />
On the right the template is closed up, showing just today's current information<br />
<br />
In the centre showing Sat 1 Feb 2014 five days into the future from the time the screenshot was taken.<br />
<br />
<br clear=all>Next '''iweather.lua''' - another masterful creation by falldown.<br />
[[File:iweather.lua-1.jpg|200px|thmb|left|iweather.lua 1]][[File:iweather.lua-2.jpg|200px|thmb|right|iweather.lua 2]]<br />
[[File:iweather.lua-3.jpg|200px|thmb|center|iweather.lua 3]]<br />
<br clear=all>Two things come to mind:<br />
# 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.<br />
# 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.<br />
<br />
'''One OOPS!'''<br />
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.<br />
<br />
'''''The oops! has been corrected. 28 Jan 2014 - It now reads:'''''<br />
image({x=0,y=15,w=376,h=265*(620/421),file=pathtowun.."additional_files/backgrounds/bg.png"})<br />
... handy thing that "pathtowun"<br />
<br />
I also find these settings better suited to '''iweather.lua:''' ''An opinion!''<br />
### Minimum size of window: width height<br />
minimum_size 370 420<br />
<br />
### Maximum width of window<br />
maximum_width 370<br />
your milage may vary.<br />
<br />
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.<br />
[[File:iweather_joe.lua-1.jpg|200px|thumb|left|iweather_joe.lua 1]] [[File:iweather_joe.lua-2.jpg|200px|thumb|right|iweather_joe.lua 2]]<br />
[[File:iweather_joe.lua-1.jpg|200px|thumb|center|iweather_joe.lua 3]]<br />
<br clear=all>Patterned after falldown's "bg.png" image, this all lua interactive conky gives testament to that layout, jst_joe took it up a step.<br />
<br />
As I said it doesn't seem to be as background friendly as falldown's creation, favouring lighter backgrounds, [http://crunchbang.org/forums/viewtopic.php?pid=359022#p359022 but I found 'draw-bg.lua' could take care of that quite nicely].<br />
<br />
'''Excellent work guys! Hot chocolate and cookies served at 6!'''<br />
==Go To:==<br />
*[[WUN Weather (en)|WUN Weather]] main page.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]].</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_(en)WUN Weather (en)2014-02-14T20:22:18Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather}}<br />
'''WUN''' a LUA weather script for conky using [http://www.wunderground.com/ wunderground] written maintained and supported by mrpeachy over at the Crunchbang [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua)] thread. The most current archive will always be found there, in the first post and linked to here, below (same links). You need to sign up to post at Crunchbang, but not to read the thread<br />
<br />
'''Feb 08, 2014:''' [https://dl.dropboxusercontent.com/u/19008369/wun/wun.tar.gz CURRENT COMPLETE ARCHIVE]<br />
<br />
'''Feb 03, 2014:''' [https://dl.dropboxusercontent.com/u/19008369/wun/wun.lua.tar.gz WUN.LUA SCRIPT ARCHIVE]<br />
<br />
[http://crunchbang.org/forums/viewtopic.php?pid=354940#p354940 WUN HISTORY] check it out.<br />
<br />
'''''NOTE''''' ''wun.lua'' is the main script that gathers and formats the data. It contains all the functions that are used in the templates<br />
As such, most changes/updates/bug fixes will occur in this file. New wun.lua scripts can then be extracted and the old script overwritten. The wun.lua script will always work with the latest complete archive, if it's date is the same or newer. Only download it to get newer functions or fixes<br />
<br />
[[File:Iweather falldown.lua.png|230px|thumb|right|'''Interactive template:'''<br />iweather_falldown.lua]]<br />
<br />
[[File:Astroweather.lua.jpg|230px|thumb|right|'''Static template:'''<br />astroweather.lua]]<br />
'''''OOTB''', these are the two templates used (and seen on the right):''<br />
*Interactive template: iweather_falldown.lua<br />
*Static template: astroweather.lua<br />
<br />
With an '''interactive''' conky template you will need to install ''xdotool'' to get the interactive action working in conky.<br />
<br />
The script is best extracted to /home/username/wun directory, but with a bit of tweaking it can go anywhere.<br />
<br />
The files and directory structure are:<br />
#/home/<username>/wun/ - three files<br />
#* read_me - please read it<br />
#* wun.lua - minor configuring required<br />
#*: ''see lines 4 to 14''<br />
#* wun_config.lua - configuring required<br />
#*: ''see lines 4 to 74 to start with''<br />
#/home/<username>/wun/additional_files - 5 sub-directories and 3 images<br />
#/home/<username>/wun/backup_data - 20 data backup files that the script uses IF: no net connection or one of the sites the script uses it down.<br />
#/home/<username>/wun/conky_configs - two conky files:<br />
## '''wunrc''' - runs the 'static' templates, it is configured to start: astroweather.lua<br />
## '''wunrci''' - runs the interactive templates, it is configured to start: iweather_falldown.lua<br />
#/home/<username>/wun/development docs - 18 files - have a look at them<br />
#/home/<username>/wun/templates - here's the meat of what you see on your desktop depending on what you choose.to use:<br />
#*Static templates, used by '''wunrc''':<br />
##astroweather.lua '''''shown above'''''<br />
##classic10day.lua<br />
##s11template.lua<br />
##wun_glassy_side_bar.lua<br />
##wun_template.lua<br />
#*Interactive templates:<br />
##iweather_falldown.lua '''''shown above'''''<br />
##iweather.lua<br />
##iweather_joe.lua<br />
<br />
'''RECAP:'''<br />
For the interactive templates, you need:<br />
*xdtool must be installed<br />
*you need to get an API key (''Cumulus Plan'')<br />
*conky -v in a terminal must end like this:<br />
<nowiki> * Lua<br />
<br />
Lua bindings:<br />
* Cairo<br />
* Imlib2<br />
<br />
26 Jan 14 | 15:07:26 ~<br />
$ </nowiki><br />
<br />
'''CREDITS:'''<br />
<br />
{|<br />
|[[File:WundergroundLogo 4c horz.jpg|none|link=http://www.wunderground.com|linked to wunderground]]<br />
|''wunderground.com is the source of the API weather data used by this script.''<br /><br />
You '''need''' to sign up for an [http://www.wunderground.com/weather/api api key], it's free but make sure you get the ''Cumulus Plan''<br />
|}<br />
[http://www.usno.navy.mil The United States Naval Observatory (USNO)] - for the sun & moon data.<br />
<br />
==Go To==<br />
*[[WUN Weather Templates (en)|WUN Weather Templates]] and Mini HowTo.<br />
*[[WUN Weather Icons (en)|WUN Weather Icons]].</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_Icons_(en)WUN Weather Icons (en)2014-02-14T20:11:24Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather Icons=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather Icons}}<br />
Information taken from: Crunchbang Forums post dated: [http://crunchbang.org/forums/viewtopic.php?pid=360593#p360593 2014-02-06]<br />
<br />
It is quite easy to incorporate additional icon sets into the WUN lua script.<br />
If you have an icon set you want to use here is how to adapt it!<br />
<br />
*This file will create '''/icons_yours''' ([[media:icons_yours.tar.gz|icons_yours.tar.gz]]) extract it anywhere.<br />
**the folder is named "/icons_yours" but could be called anything you like<br />
**;'''''Suggestion'''''<br />
**:Rename icons_yours before continuing to something unique: ie: /icons_s11 then continue<br />
**in the folder "/icons_yours" there are 3 things<br />
***a folder called '''/icon''' - this is where the icons you want to use will be.<br />
***;''it is important that this folder is not renamed''<br />
***a shell script called: ''001_icon_symlink_basic.sh'', and <br />
***another shell script: ''001_icon_symlink_extended.sh''<br />
***:These scripts generate the symlinks from the icons in "/icons_yours/icon"<br />
***:They should be executable<br />
<br />
Looking in '''001_icon_symlink_basic.sh''' there are many lines that are all similar:<br />
ln -s -f ./icon/000 chanceflurries<br />
ln -s -f ./icon/000 nt_chanceflurries<br />
'''^''' these are the commands that create the symlinks<br />
ln -s -f<br />
'''^''' calls the program that creates the symlink<br />
./icon/000<br />
'''^''' is the name of the icon being used, ''this is the part that needs to be edited''<br />
chanceflurries<br />
'''^''' this is the name of the symlink that will be created<br />
*''it is important that none of the symlink names are altered''<br />
*in the examples above, night time icons are indicated by a preceding '''nt_'''<br />
Go through the script line by line, look at the description of the weather type in the symlink then pick the icon you want to be displayed and edit the line to point to that icon.<br />
<br />
''The only thing that should need to be changed is the '''000''' part of the icon name''<br />
<br />
'''For example:'''<br />
ln -s -f ./icon/000.png chanceflurries<br />
to<br />
ln -s -f ./icon/10.png chanceflurries<br />
*'''NOTES'''<br />
*;- you need to specify the icon name '''''and''''' extension.<br />
*:this method will work for any image file type; .png, .jpg, .gif, etc.<br />
*;- you could in fact have your original icons anywhere<br />
*:just edit the shell script to point to them<br />
<br />
If you have an extensive icon set you could also edit ''001_icon_symlink_extended.sh'' in a similar way:<br />
ln -s -f ./icon/000 01_l_drizzle<br />
ln -s -f ./icon/000 01_l_drizzle_nt<br />
ln -s -f ./icon/000 02_drizzle<br />
ln -s -f ./icon/000 02_drizzle_nt<br />
ln -s -f ./icon/000 03_h_drizzle<br />
ln -s -f ./icon/000 03_h_drizzle_nt<br />
<br />
in these examples the ''_l_'' stands for light, the ''_h_'' stands for heavy<br />
a following ''_nt'' signifies the night time icon<br />
<br />
When you have finished editing the shell scripts, run them to generate the symlinks<br />
open a terminal in the icons_yours folder, the location where the shell scripts are, and type<br />
001_icon_symlink_basic.sh<br />
or just double click and run<br />
<br />
Take a look through the symlinks to see if there were any mistakes<br />
if there are edit the files again and re-run them, they will overwrite the existing links.<br />
<br />
OK at this point everything looks good and the icons are all correct<br />
<br />
'''NOW:''' cut and paste /icons_yours to the wun/additional_files/weathericons/ directory.<br />
<br />
As per the example above I'd see: '''wun/additional_files/weathericons/icons_s11'''<br />
<br />
Edit the '''wun_config.lua''' file to point to the icons or use default_weather_icons variable in a template<br />
<br />
{| class="wikitable"<br />
|+Icons already prepared by mrpeachy<br/>''Showing: /icons_<name>/icons/05.png''<br/>so not the same ''condition''<br />
|-<br />
!Icon<br />
!File Name<br/>is the directory name<br />
!Link to author's site<br />
|-<br />
|[[file:icons_falldown_05.png|90px|thumb|center]]<br />
|[https://dl.dropboxusercontent.com/u/19008369/wun/icons_falldown.tar.gz icons_falldown.tar.gz]<br />
|[http://falldown-aka-chris.deviantart.com/gallery/ falldown]<br />
|-<br />
|[[file:icons_merlinthered_colorful_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_colorful.tar.gz|Icons_merlinthered_colorful.tar.gz]]<br />
|rowspan="6"|[http://merlinthered.deviantart.com/art/plain-weather-icons-157162192 merlinthered]<br />
|-<br />
|[[file:icons_merlinthered_dark_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_dark.tar.gz|Icons_merlinthered_dark.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_flat_black_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_flat_black.tar.gz|Icons_merlinthered_flat_black.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_flat_colorful_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_flat_colorful.tar.gz|Icons_merlinthered_flat_colorful.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_light_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_light.tar.gz|Icons_merlinthered_light.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_white_05.png|90px|thumb|center|It is here!]]<br />
|[[media:Icons_merlinthered_white.tar.gz|Icons_merlinthered_white.tar.gz]]<br />
|-<br />
|[[file:Icons_tick_05.png|90px|thumb|center]]<br />
|[[media:Icons_tick.tar.gz|Icons_tick.tar.gz]]<br />
|[http://xiao4.deviantart.com/art/tick-weather-icons-96294478 tick]<br />
|-<br />
|[[file:icons_wun_05.png|90px|thumb|center]]<br />
|Included in Archive<br/>old conkyForecast icons<br />
|/icons_wun<br />
|}<br />
<br />
That should be it. Any questions, ask in the Crunchbang thread: [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua)]</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_Icons_(en)WUN Weather Icons (en)2014-02-14T20:09:31Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather Icons=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather Icons}}<br />
Information taken from: Crunchbang Forums post dated: [http://crunchbang.org/forums/viewtopic.php?pid=360593#p360593 2014-02-06]<br />
<br />
It is quite easy to incorporate additional icon sets into the WUN lua script.<br />
If you have an icon set you want to use here is how to adapt it!<br />
<br />
*This file will create '''/icons_yours''' ([[media:icons_yours.tar.gz|icons_yours.tar.gz]]) extract it anywhere.<br />
**the folder is named "/icons_yours" but could be called anything you like<br />
**;'''''Suggestion'''''<br />
**:Rename icons_yours before continuing to something unique: ie: /icons_s11 then continue<br />
**in the folder "/icons_yours" there are 3 things<br />
***a folder called '''/icon''' - this is where the icons you want to use will be.<br />
***;''it is important that this folder is not renamed''<br />
***a shell script called: ''001_icon_symlink_basic.sh'', and <br />
***another shell script: ''001_icon_symlink_extended.sh''<br />
***:These scripts generate the symlinks from the icons in "/icons_yours/icon"<br />
***:They should be executable<br />
<br />
Looking in '''001_icon_symlink_basic.sh''' there are many lines that are all similar:<br />
ln -s -f ./icon/000 chanceflurries<br />
ln -s -f ./icon/000 nt_chanceflurries<br />
'''^''' these are the commands that create the symlinks<br />
ln -s -f<br />
'''^''' calls the program that creates the symlink<br />
./icon/000<br />
'''^''' is the name of the icon being used, ''this is the part that needs to be edited''<br />
chanceflurries<br />
'''^''' this is the name of the symlink that will be created<br />
*''it is important that none of the symlink names are altered''<br />
*in the examples above, night time icons are indicated by a preceding '''nt_'''<br />
Go through the script line by line, look at the description of the weather type in the symlink then pick the icon you want to be displayed and edit the line to point to that icon.<br />
<br />
''The only thing that should need to be changed is the '''000''' part of the icon name''<br />
<br />
'''For example:'''<br />
ln -s -f ./icon/000.png chanceflurries<br />
to<br />
ln -s -f ./icon/10.png chanceflurries<br />
*'''NOTES'''<br />
*;- you need to specify the icon name '''''and''''' extension.<br />
*:this method will work for any image file type; .png, .jpg, .gif, etc.<br />
*;- you could in fact have your original icons anywhere<br />
*:just edit the shell script to point to them<br />
<br />
If you have an extensive icon set you could also edit ''001_icon_symlink_extended.sh'' in a similar way:<br />
ln -s -f ./icon/000 01_l_drizzle<br />
ln -s -f ./icon/000 01_l_drizzle_nt<br />
ln -s -f ./icon/000 02_drizzle<br />
ln -s -f ./icon/000 02_drizzle_nt<br />
ln -s -f ./icon/000 03_h_drizzle<br />
ln -s -f ./icon/000 03_h_drizzle_nt<br />
<br />
in these examples the ''_l_'' stands for light, the ''_h_'' stands for heavy<br />
a following ''_nt'' signifies the night time icon<br />
<br />
When you have finished editing the shell scripts, run them to generate the symlinks<br />
open a terminal in the icons_yours folder, the location where the shell scripts are, and type<br />
001_icon_symlink_basic.sh<br />
or just double click and run<br />
<br />
Take a look through the symlinks to see if there were any mistakes<br />
if there are edit the files again and re-run them, they will overwrite the existing links.<br />
<br />
OK at this point everything looks good and the icons are all correct<br />
<br />
'''NOW:''' cut and paste /icons_yours to the wun/additional_files/weathericons/ directory.<br />
<br />
As per the example above I'd see: '''wun/additional_files/weathericons/icons_s11'''<br />
<br />
Edit the '''wun_config.lua''' file to point to the icons or use default_weather_icons variable in a template<br />
<br />
{| class="wikitable"<br />
|+Icons already prepared by mrpeachy<br/>''Showing: /icons_<name>/icons/05.png''<br/>so not the same ''condition''<br />
|-<br />
!Icon<br />
!File Name<br/>is the directory name<br />
!Link to author's site<br />
|-<br />
|[[file:icons_falldown_05.png|90px|thumb|center]]<br />
|[https://dl.dropboxusercontent.com/u/19008369/wun/icons_falldown.tar.gz icons_falldown.tar.gz]<br />
|[http://falldown-aka-chris.deviantart.com/gallery/ falldown]<br />
|-<br />
|[[file:icons_merlinthered_colorful_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_colorful.tar.gz|Icons_merlinthered_colorful.tar.gz]]<br />
|rowspan="6"|[http://merlinthered.deviantart.com/art/plain-weather-icons-157162192 merlinthered]<br />
|-<br />
|[[file:icons_merlinthered_dark_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_dark.tar.gz|Icons_merlinthered_dark.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_flat_black_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_flat_black.tar.gz|Icons_merlinthered_flat_black.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_flat_colorful_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_flat_colorful.tar.gz|Icons_merlinthered_flat_colorful.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_light_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_light.tar.gz|Icons_merlinthered_light.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_white_05.png|90px|thumb|center|It is here!]]<br />
|[[media:Icons_merlinthered_white.tar.gz|Icons_merlinthered_white.tar.gz]]<br />
|-<br />
|[[file:Icons_tick_05.png|90px|thumb|center]]<br />
|[[media:Icons_tick.tar.gz|Icons_tick.tar.gz]]<br />
|[http://xiao4.deviantart.com/art/tick-weather-icons-96294478 tick]<br />
|-<br />
|[[file:icons_wun_05.png|90px|thumb|center]]<br />
|Included in Archive<br />
|/icons_wun<br />
|}<br />
<br />
That should be it. Any questions, ask in the Crunchbang thread: [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua)]</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_Icons_(en)WUN Weather Icons (en)2014-02-14T17:07:49Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather Icons=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather Icons}}<br />
Information taken from: Crunchbang Forums post dated: [http://crunchbang.org/forums/viewtopic.php?pid=360593#p360593 2014-02-06]<br />
<br />
It is quite easy to incorporate additional icon sets into the WUN lua script.<br />
If you have an icon set you want to use here is how to adapt it!<br />
<br />
*This file will create '''/icons_yours''' ([[media:icons_yours.tar.gz|icons_yours.tar.gz]]) extract it anywhere.<br />
**the folder is named "/icons_yours" but could be called anything you like<br />
**;'''''Suggestion'''''<br />
**:Rename icons_yours before continuing to something unique: ie: /icons_s11 then continue<br />
**in the folder "/icons_yours" there are 3 things<br />
***a folder called '''/icon''' - this is where the icons you want to use will be.<br />
***;''it is important that this folder is not renamed''<br />
***a shell script called: ''001_icon_symlink_basic.sh'', and <br />
***another shell script: ''001_icon_symlink_extended.sh''<br />
***:These scripts generate the symlinks from the icons in "/icons_yours/icon"<br />
***:They should be executable<br />
<br />
Looking in '''001_icon_symlink_basic.sh''' there are many lines that are all similar:<br />
ln -s -f ./icon/000 chanceflurries<br />
ln -s -f ./icon/000 nt_chanceflurries<br />
'''^''' these are the commands that create the symlinks<br />
ln -s -f<br />
'''^''' calls the program that creates the symlink<br />
./icon/000<br />
'''^''' is the name of the icon being used, ''this is the part that needs to be edited''<br />
chanceflurries<br />
'''^''' this is the name of the symlink that will be created<br />
*''it is important that none of the symlink names are altered''<br />
*in the examples above, night time icons are indicated by a preceding '''nt_'''<br />
Go through the script line by line, look at the description of the weather type in the symlink then pick the icon you want to be displayed and edit the line to point to that icon.<br />
<br />
''The only thing that should need to be changed is the '''000''' part of the icon name''<br />
<br />
'''For example:'''<br />
ln -s -f ./icon/000.png chanceflurries<br />
to<br />
ln -s -f ./icon/10.png chanceflurries<br />
*'''NOTES'''<br />
*;- you need to specify the icon name '''''and''''' extension.<br />
*:this method will work for any image file type; .png, .jpg, .gif, etc.<br />
*;- you could in fact have your original icons anywhere<br />
*:just edit the shell script to point to them<br />
<br />
If you have an extensive icon set you could also edit ''001_icon_symlink_extended.sh'' in a similar way:<br />
ln -s -f ./icon/000 01_l_drizzle<br />
ln -s -f ./icon/000 01_l_drizzle_nt<br />
ln -s -f ./icon/000 02_drizzle<br />
ln -s -f ./icon/000 02_drizzle_nt<br />
ln -s -f ./icon/000 03_h_drizzle<br />
ln -s -f ./icon/000 03_h_drizzle_nt<br />
<br />
in these examples the ''_l_'' stands for light, the ''_h_'' stands for heavy<br />
a following ''_nt'' signifies the night time icon<br />
<br />
When you have finished editing the shell scripts, run them to generate the symlinks<br />
open a terminal in the icons_yours folder, the location where the shell scripts are, and type<br />
001_icon_symlink_basic.sh<br />
or just double click and run<br />
<br />
Take a look through the symlinks to see if there were any mistakes<br />
if there are edit the files again and re-run them, they will overwrite the existing links.<br />
<br />
OK at this point everything looks good and the icons are all correct<br />
<br />
'''NOW:''' cut and paste /icons_yours to the wun/additional_files/weathericons/ directory.<br />
<br />
As per the example above I'd see: '''wun/additional_files/weathericons/icons_s11'''<br />
<br />
Edit the '''wun_config.lua''' file to point to the icons or use default_weather_icons variable in a template<br />
<br />
{| class="wikitable"<br />
|+Icons already prepared by mrpeachy<br/>''Showing: 05.png''<br />
|-<br />
!Icon<br />
!File Name<br/>is the directory name<br />
!Link to author's site<br />
|-<br />
|[[file:icons_falldown_05.png|90px|thumb|center]]<br />
|[https://dl.dropboxusercontent.com/u/19008369/wun/icons_falldown.tar.gz icons_falldown.tar.gz]<br />
|[http://falldown-aka-chris.deviantart.com/gallery/ falldown]<br />
|-<br />
|[[file:icons_merlinthered_colorful_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_colorful.tar.gz|Icons_merlinthered_colorful.tar.gz]]<br />
|rowspan="6"|[http://merlinthered.deviantart.com/art/plain-weather-icons-157162192 merlinthered]<br />
|-<br />
|[[file:icons_merlinthered_dark_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_dark.tar.gz|Icons_merlinthered_dark.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_flat_black_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_flat_black.tar.gz|Icons_merlinthered_flat_black.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_flat_colorful_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_flat_colorful.tar.gz|Icons_merlinthered_flat_colorful.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_light_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_light.tar.gz|Icons_merlinthered_light.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_white_05.png|90px|thumb|center|It is here!]]<br />
|[[media:Icons_merlinthered_white.tar.gz|Icons_merlinthered_white.tar.gz]]<br />
|-<br />
|[[file:Icons_tick_05.png|90px|thumb|center]]<br />
|[[media:Icons_tick.tar.gz|Icons_tick.tar.gz]]<br/>Different: Need to check<br />
|[http://xiao4.deviantart.com/art/tick-weather-icons-96294478 tick]<br />
|-<br />
|[[file:icons_wun_05.png|90px|thumb|center]]<br />
|Included in Archive<br />
|/icons_wun<br />
|}<br />
<br />
That should be it. Any questions, ask in the Crunchbang thread: [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua)]</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=WUN_Weather_Icons_(en)WUN Weather Icons (en)2014-02-14T17:06:29Z<p>Sector11: </p>
<hr />
<div>__NOTITLE__<br />
=WUN Weather Icons=<br />
[[Category:English]]<br />
[[Category:Programs (en)]]<br />
[[Category:Tips and tricks (en)]]<br />
{{i18n|en|WUN Weather Icons}}<br />
Information taken from: Crunchbang Forums post dated: [http://crunchbang.org/forums/viewtopic.php?pid=360593#p360593 2014-02-06]<br />
<br />
It is quite easy to incorporate additional icon sets into the WUN lua script.<br />
If you have an icon set you want to use here is how to adapt it!<br />
<br />
*This file will create '''/icons_yours''' ([[media:icons_yours.tar.gz|icons_yours.tar.gz]]) extract it anywhere.<br />
**the folder is named "/icons_yours" but could be called anything you like<br />
**;'''''Suggestion'''''<br />
**:Rename icons_yours before continuing to something unique: ie: /icons_s11 then continue<br />
**in the folder "/icons_yours" there are 3 things<br />
***a folder called '''/icon''' - this is where the icons you want to use will be.<br />
***;''it is important that this folder is not renamed''<br />
***a shell script called: ''001_icon_symlink_basic.sh'', and <br />
***another shell script: ''001_icon_symlink_extended.sh''<br />
***:These scripts generate the symlinks from the icons in "/icons_yours/icon"<br />
***:They should be executable<br />
<br />
Looking in '''001_icon_symlink_basic.sh''' there are many lines that are all similar:<br />
ln -s -f ./icon/000 chanceflurries<br />
ln -s -f ./icon/000 nt_chanceflurries<br />
'''^''' these are the commands that create the symlinks<br />
ln -s -f<br />
'''^''' calls the program that creates the symlink<br />
./icon/000<br />
'''^''' is the name of the icon being used, ''this is the part that needs to be edited''<br />
chanceflurries<br />
'''^''' this is the name of the symlink that will be created<br />
*''it is important that none of the symlink names are altered''<br />
*in the examples above, night time icons are indicated by a preceding '''nt_'''<br />
Go through the script line by line, look at the description of the weather type in the symlink then pick the icon you want to be displayed and edit the line to point to that icon.<br />
<br />
''The only thing that should need to be changed is the '''000''' part of the icon name''<br />
<br />
'''For example:'''<br />
ln -s -f ./icon/000.png chanceflurries<br />
to<br />
ln -s -f ./icon/10.png chanceflurries<br />
*'''NOTES'''<br />
*;- you need to specify the icon name '''''and''''' extension.<br />
*:this method will work for any image file type; .png, .jpg, .gif, etc.<br />
*;- you could in fact have your original icons anywhere<br />
*:just edit the shell script to point to them<br />
<br />
If you have an extensive icon set you could also edit ''001_icon_symlink_extended.sh'' in a similar way:<br />
ln -s -f ./icon/000 01_l_drizzle<br />
ln -s -f ./icon/000 01_l_drizzle_nt<br />
ln -s -f ./icon/000 02_drizzle<br />
ln -s -f ./icon/000 02_drizzle_nt<br />
ln -s -f ./icon/000 03_h_drizzle<br />
ln -s -f ./icon/000 03_h_drizzle_nt<br />
<br />
in these examples the ''_l_'' stands for light, the ''_h_'' stands for heavy<br />
a following ''_nt'' signifies the night time icon<br />
<br />
When you have finished editing the shell scripts, run them to generate the symlinks<br />
open a terminal in the icons_yours folder, the location where the shell scripts are, and type<br />
001_icon_symlink_basic.sh<br />
or just double click and run<br />
<br />
Take a look through the symlinks to see if there were any mistakes<br />
if there are edit the files again and re-run them, they will overwrite the existing links.<br />
<br />
OK at this point everything looks good and the icons are all correct<br />
<br />
'''NOW:''' cut and paste /icons_yours to the wun/additional_files/weathericons/ directory.<br />
<br />
As per the example above I'd see: '''wun/additional_files/weathericons/icons_s11'''<br />
<br />
Edit the '''wun_config.lua''' file to point to the icons or use default_weather_icons variable in a template<br />
<br />
{| class="wikitable"<br />
|+Food complements<br />
|-<br />
|Orange<br />
|Apple<br />
|-<br />
|Bread<br />
|Pie<br />
|-<br />
|Butter<br />
|Ice cream <br />
|}<br />
<br />
{| class="wikitable"<br />
|+Icons already prepared by mrpeachy<br/>''Showing: 05.png''<br />
|-<br />
!Icon<br />
!File Name<br/>is the directory name<br />
!Link to author's site<br />
|-<br />
|[[file:icons_falldown_05.png|90px|thumb|center]]<br />
|[https://dl.dropboxusercontent.com/u/19008369/wun/icons_falldown.tar.gz icons_falldown.tar.gz]<br />
|[http://falldown-aka-chris.deviantart.com/gallery/ falldown]<br />
|-<br />
|[[file:icons_merlinthered_colorful_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_colorful.tar.gz|Icons_merlinthered_colorful.tar.gz]]<br />
|rowspan="6"|[http://merlinthered.deviantart.com/art/plain-weather-icons-157162192 merlinthered]<br />
|-<br />
|[[file:icons_merlinthered_dark_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_dark.tar.gz|Icons_merlinthered_dark.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_flat_black_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_flat_black.tar.gz|Icons_merlinthered_flat_black.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_flat_colorful_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_flat_colorful.tar.gz|Icons_merlinthered_flat_colorful.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_light_05.png|90px|thumb|center]]<br />
|[[media:Icons_merlinthered_light.tar.gz|Icons_merlinthered_light.tar.gz]]<br />
|-<br />
|[[file:Icons_merlinthered_white_05.png|90px|thumb|center|It is here!]]<br />
|[[media:Icons_merlinthered_white.tar.gz|Icons_merlinthered_white.tar.gz]]<br />
|-<br />
|[[file:Icons_tick_05.png|90px|thumb|center]]<br />
|[[media:Icons_tick.tar.gz|Icons_tick.tar.gz]]<br/>Different: Need to check<br />
|[http://xiao4.deviantart.com/art/tick-weather-icons-96294478 tick]<br />
|-<br />
|[[file:icons_wun_05.png|90px|thumb|center]]<br />
|Included in Archive<br />
|/icons_wun<br />
|}<br />
<br />
That should be it. Any questions, ask in the Crunchbang thread: [http://crunchbang.org/forums/viewtopic.php?id=31306 Wun Weather Script for Conky (Lua)]</div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Icons_tick_05.pngFile:Icons tick 05.png2014-02-14T17:02:02Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Icons_tick.tar.gzFile:Icons tick.tar.gz2014-02-14T16:59:09Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Icons_merlinthered_white_05.pngFile:Icons merlinthered white 05.png2014-02-14T16:56:28Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Icons_merlinthered_white.tar.gzFile:Icons merlinthered white.tar.gz2014-02-14T16:55:38Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Icons_merlinthered_light_05.pngFile:Icons merlinthered light 05.png2014-02-14T16:54:39Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Icons_merlinthered_light.tar.gzFile:Icons merlinthered light.tar.gz2014-02-14T16:53:35Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Icons_merlinthered_flat_colorful_05.pngFile:Icons merlinthered flat colorful 05.png2014-02-14T16:52:34Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Icons_merlinthered_flat_colorful.tar.gzFile:Icons merlinthered flat colorful.tar.gz2014-02-14T16:51:04Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Icons_merlinthered_flat_black_05.pngFile:Icons merlinthered flat black 05.png2014-02-14T16:50:17Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Icons_merlinthered_flat_black.tar.gzFile:Icons merlinthered flat black.tar.gz2014-02-14T16:47:36Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Icons_merlinthered_dark.tar.gzFile:Icons merlinthered dark.tar.gz2014-02-14T16:44:20Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Icons_merlinthered_dark_05.pngFile:Icons merlinthered dark 05.png2014-02-14T16:43:35Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Icons_merlinthered_colorful.tar.gzFile:Icons merlinthered colorful.tar.gz2014-02-14T16:32:29Z<p>Sector11: </p>
<hr />
<div></div>Sector11http://conky.pitstop.free.fr/wiki/index.php5?title=File:Icons_merlinthered_colorful_05.pngFile:Icons merlinthered colorful 05.png2014-02-14T16:28:14Z<p>Sector11: </p>
<hr />
<div></div>Sector11