You are not logged in.

#851 2011-11-17 22:59:12

poiuyt23
Member
Registered: 2011-10-12
Posts: 75

Re: conky configs and screenshots!

This month's Conky config
conky.png
Rest of the desktop:
https://lh6.googleusercontent.com/-fh88 … shot9.jpeg

Offline

#852 2011-11-18 12:46:11

ichase
Member
Registered: 2011-02-10
Posts: 113

Re: conky configs and screenshots!

Absolutely amazing what you all do with these conkys.  I'm still quite a way (ok, a long way) from getting some of these more elaborate conkys.  This is the finished product of what I had posted a few days ago.  The info conky I pretty much wrote from scratch.  It's a basic set up, nothing you have not seen on a bunch of different conkys.  The weather and date as mentioned before I can't take credit for.  I just messed with the fonts and colors to make everything match plus added additional code to the conkyrc to give me the 5th day of weather.  The Arch Linux Logo in the center is actually a conky calling to one letter from the OpenLogos font.  Tint2 changed up also with the red border to match everything else.  Starting to get involved in the OpenBox menu.xml.  I have read that it is highly configurable.  Need to figure out how to make it Red and White as well.

Also to Sector11 - How did you raise your tint2 up from the bottom of the screen to display your conky?  Was thinking about adding one down there but figured it would overlap.  Not sure as to what I can display at this point but there is always SOMETHING.   LOL

0e686b160178265.jpg

All the best everyone and enjoy your weekend!!

Ian

Edit: Got menu closer to Red and White  smile

Last edited by ichase (2011-11-19 17:50:32)

Offline

#853 2011-11-18 16:20:43

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: conky configs and screenshots!

Looks great Ian :-)


"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website      Configs
Forum Admin: Bruno's All Things Linux   
securitybreach<a>archlinux.us

Offline

#854 2011-11-19 09:37:03

iTwenty
Member
From: India
Registered: 2010-10-24
Posts: 63
Website

Re: conky configs and screenshots!

Here's mine
tYmNuZw
config

background yes
use_xft yes
xftfont Dejavu Sans Mono:size=12
xftalpha 1
uppercase no
update_interval 1.0
total_run_times 0
own_window no
double_buffer yes
minimum_size 1366
maximum_width 1366
gap_y 2
alignment tl
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color c9c9c9
default_shade_color 555555
default_outline_color black
no_buffers yes
cpu_avg_samples 2
override_utf8_locale no
if_up_strictness address

##############################################
#  Output
##############################################
TEXT
${color 218eb1}${goto 20}SYS ${goto 180}BATT ${goto 430}NET ${goto 660}CPU ${goto 820}MEM ${goto 980}DISK ${goto 1140}MUSIC
${color c9c9c9}${font Dejavu Sans Mono:size=10}${goto 20}UP ${uptime} ${goto 180}${battery_bar 8,70 BAT0} ${goto 300}wlan0 ${goto 420}eth0 ${goto 540}usb0 ${goto 660}Core 0 ${cpubar 8,70 cpu0}${goto 820}RAM ${membar 8,70}${goto 980}root ${fs_bar 8,70 /}${goto 1140}${if_mpd_playing}${mpd_elapsed} ${mpd_bar 8,100} ${mpd_length}${else}Not Playing${endif}
${goto 20}Core 0  ${execi 10 /home/itwenty/bin/corezerotemp}${goto 180}${battery_short BAT0}${goto 300}${font Dejavu Sans Mono:size=8}${if_up wlan0}${addr wlan0}${else}N.A${endif} ${goto 420}${if_up eth0}${addr eth0}${else}N.A${endif}${goto 540}${if_up usb0}${addr usb0}${else}N.A${endif}${font Dejavu Sans Mono:size=10}${goto 660}Core 1 ${cpubar 8,70 cpu1}${goto 820}SWP ${swapbar 8,70}${goto 980}win7 ${fs_bar 8,70 /mnt/windows}${goto 1140}${if_mpd_playing}Title  ${scroll 18 1 $mpd_title}${endif}
${goto 20}Core 2  ${execi 10 /home/itwenty/bin/coretwotemp}${goto 180}${if_existing /sys/class/power_supply/ADP1/online 0}${battery_time BAT0}${endif}${goto 300}${font Dejavu Sans Mono:size=8}${if_up wlan0}IN      ${downspeedf wlan0}${endif}${goto 420}${if_up eth0}IN      ${downspeedf eth0}${endif}${goto 540}${if_up usb0}IN      ${downspeedf usb0}${endif}${font Dejavu Sans Mono:size=10}${goto 660}Core 2 ${cpubar 8,70 cpu2}${goto 820}BUF   ${buffers}${goto 980}boot ${fs_bar 8,70 /boot}${goto 1140}${if_mpd_playing}Album  ${scroll 18 1 $mpd_album}${endif}
${goto 20}GPU     ${execi 10 /home/itwenty/bin/gputemp}${goto 300}${font Dejavu Sans Mono:size=8}${if_up wlan0}OUT     ${upspeedf wlan0}${endif}${goto 420}${if_up eth0}OUT     ${upspeedf eth0}${endif}${goto 540}${if_up usb0}OUT     ${upspeedf usb0}${endif}${font Dejavu Sans Mono:size=10}${goto 660}Core 3 ${cpubar 8,70 cpu3}${goto 820}CCH   ${cached}${goto 1140}${if_mpd_playing}Artist ${scroll 18 1 $mpd_artist}${endif}

“Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover.” - Mark Twain

Offline

#855 2011-11-19 14:45:08

ichase
Member
Registered: 2011-02-10
Posts: 113

Re: conky configs and screenshots!

iTwenty - I really like the simplicity of your desktop.  You have kept is minimalistic but consitent through out.  NICE!!!! 

All the best,

Ian

Offline

#856 2011-11-20 21:21:52

imawolfrawr
Member
Registered: 2011-11-16
Posts: 3

Re: conky configs and screenshots!

So I discovered conky yesterday and have been hooked on it. I've browsed around this thread to get different ideas for what I want to do and everything is going awesome except one little thing I can't seem to fix. I've set the alignment to top_left but for some reason it wants to stay on the bottom_left. If anyone could help me out that would be boss.

screenshotat20111120160.th.png

config

double_buffer yes
background yes

use_xft yes
xftfont Bitstream Vera Sans Mono:size=9
xftalpha 0.8

update_interval 1.0

total_run_times 0

own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,sticky,skip_pager
no_buffers yes
minimum_size 200 5
maximum_width 500
draw_shades no
draw_outline no
draw_borders no
stippled_borders 0
alignment top__left
gap_x 10
gap_y 20
uppercase no

#use_spaces yes


color0 7d7d7d
color1 slategrey
color2 ffffff

TEXT
${alignc}${color1}------------${color2}Aleph${color1}-------------
${color2}${font Bitstream Vera Sans Mono:size=8}${alignc}${sysname} ${kernel} ${machine}
${color2}${font Bitstream Vera Sans Mono:size=10}Info ${color1}${hr 3}
${color0}${font Bitstream Vera Sans Mono:size=8}Time:${alignr}${time %H:%M:%S}
${color0}Date:${alignr}${time %B  %e, %G}
${color0}Uptime:${alignr}$uptime
${color0}Battery:${alignr}${battery BAT0}
${color2}${font Bitstream Vera Sans Mono:size=10}CPU ${color1}${hr 3}
${color0}${font Bitstream Vera Sans Mono:size=8}Temperature:${alignr}${acpitemp}C
${color0}Frequency:${alignr}${freq_g}GHz
${color0}Core 1:${alignr}${cpu cpu1}% ${alignr}${cpubar cpu1 7,120}
${color0}Core 2:${alignr}${cpu cpu2}% ${alignr}${cpubar cpu2 7,120}
${color2}${font Bitstream Vera Sans Mono:size=10}Filesystem ${color1}${hr 3}
${color0}${font Bitstream Vera Sans Mono:size=8}Hard Disk:${alignr}${fs_free /home}/${fs_size /home}
${color0}             ${fs_bar /home}
${color2}${font Bitstream Vera Sans Mono:size=10}Network ${color1}${hr 3}
${color0}${font Bitstream Vera Sans Mono:size=8}ESSID:${alignr}${wireless_essid wlan0}
${color0}IP:${alignr}${addr wlan0}
${color0}Download:${alignr}${downspeedf wlan0} kb/s
${color0}             ${downspeedgraph wlan0 25,150}
${color0}Upload:${alignr}${upspeedf wlan0} kb/s
${color0}             ${upspeedgraph wlan0 25,150}

Offline

#857 2011-11-21 20:21:23

ichase
Member
Registered: 2011-02-10
Posts: 113

Re: conky configs and screenshots!

imawolfawr - Ahhhhhh, Conky has claimed another victim.  smile  It is very addicting once you get started and there seems to be NO LIMIT to what you can produce with it.
In regards to your issue, I have seen conky do this on a few occasions.  Try killall conky in teminal and restart it.  If that does not work,try loggin out of your X window and logging back in and see if your conky moves to the Top_Left.  Sometimes it seems as if some settings get cached in.  I had half of my conky cut off once and could not figure out why.  Restarting X fixed the problem.

All the best,

Ian

Offline

#858 2011-11-21 21:10:29

jwb47
Member
Registered: 2011-02-21
Posts: 1

Re: conky configs and screenshots!

imawolfrawr:

I could be wrong, but it looks like you have 2 underscores between "top" and "left". I believe it should only be one. Perhaps this is the problem.

John

Offline

#859 2011-11-22 00:52:38

imawolfrawr
Member
Registered: 2011-11-16
Posts: 3

Re: conky configs and screenshots!

@jwb47 wow, you nailed it. Can't believe I missed something that simple, guess it's easy to let it slip past at 4am.

thanks!

and sorry for the total noob question there hmm

Last edited by imawolfrawr (2011-11-22 00:52:51)

Offline

#860 2011-11-22 08:49:39

KingX
Member
From: CA
Registered: 2010-03-24
Posts: 324

Re: conky configs and screenshots!

I am grateful to all you guys posting your conkyrc. Gave me great headstart. smile I spent the last couple of days messing around and tweaking conkyrc. Here is my conky.
conky.th.png

My conkyrc (I realize I have a lot {color} tags without any values.. i just don't want to change the color yet... so they are just a placeholder of sort smile )

# ~/.conkyrc

# Use double buffering (eliminates flickering)
double_buffer yes

# Boolean value, if true, Conky will be forked to background when started. 
background yes

# Subtract (file system) buffers from used memory
no_buffers yes

# Use Xft (anti-aliased font and stuff) 
use_xft yes
xftfont Bitstream Vera Sans Mono:size=10
xftalpha 0.8

# Update interval in seconds
update_interval 4.0
 
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Default color and border color
#default_color 

# Boolean, create own window to draw?
#own_window_color 1e2d40

own_window yes

# Needed for transparency
own_window_argb_visual yes

# Makes conky's window transparent
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,skip_taskbar,sticky,skip_pager

# Minimum size of the window
minimum_size 200 5

# Maximum width of the window
maximum_width 200

#text_buffer_size 2000

# Where to place the conky "window"
alignment top_right

# On dual screen setup conky draws the window on the second screen when using align right
# the following values adjust the conky window to be drawn on first screen (depending on 
# resolution of the 2nd screen ofcourse)
gap_x 1700
gap_y 10

draw_shades no
draw_outline no
draw_borders no

# Case for all the characters in conky
uppercase no

cpu_avg_samples 2
net_avg_samples 2

# While using a mono font prevents text from moving around
use_spacer left

TEXT

${color}host :${color white} ${nodename} 
${color}os   :${color white} ${sysname} ${kernel}

${color}uptime:${color white} $uptime 

${color}cpu: $cpu%  Hz: ${freq}Mhz 
${color #888888}${cpugraph 30,200 0000ff ff0000}
${color}core1: ${cpu cpu1}%  ${execi 60 sensors | grep 'Core 0' | cut -c 15-23}
${color #888888}${cpugraph cpu1 20,200 0000ff ff0000}
${color}core2: ${cpu cpu2}%  ${execi 60 sensors | grep 'Core 1' | cut -c 15-23}
${color #888888}${cpugraph cpu2 20,200 0000ff ff0000}
${color}ram:${color white} $memperc% $membar

${color}gpu  : ${execi 60 nvidia-settings -q gpus -t | grep 'GeForce' | cut -c 28-44} 
${color}temp :${nvidia temp}°C 
${color}clock: ${nvidia gpufreq}Mhz mem:${nvidia memfreq}Mhz 

${color}sda:${hddtemp}°C ${color}sdb:${hddtemp /dev/sdb}°C
${color}home  : ${color white}${fs_free /home} ${fs_bar /home}
${color}driveD: ${color white}${fs_free /media/driveD} ${fs_bar /media/driveD} 
${color}driveE: ${color white}${fs_free /media/driveE} ${fs_bar /media/driveE} 
${color}driveF: ${color white}${fs_free /media/driveF} ${fs_bar /media/driveF}

${color}down:${downspeed eth0}  up:${upspeed eth0}
${color #888888}${downspeedgraph eth0 30,95 ff0000 0000ff} ${color #888888}${upspeedgraph eth0 30,95 0000ff ff0000}
${color}Process           CPU
${color}${top name 1}${offset -50}      ${top cpu 1}
${color}${top name 2}${offset -50}      ${top cpu 2}
${color}${top name 3}${offset -50}      ${top cpu 3}
${color}${top name 4}${offset -50}      ${top cpu 4}

${color}Mem Usage         Mem
${color}${top_mem name 1}${offset -50}      ${top_mem mem 1}
${color}${top_mem name 2}${offset -50}      ${top_mem mem 2}
${color}${top_mem name 3}${offset -50}      ${top_mem mem 3}
${color}${top_mem name 4}${offset -50}      ${top_mem mem 4}

Offline

#861 2011-11-30 12:38:39

ichase
Member
Registered: 2011-02-10
Posts: 113

Re: conky configs and screenshots!

Looking really good KingX.  You will find that the "Tweeking" is never really done.  wink

Offline

#862 2011-12-01 19:10:20

Mr Pink57
Member
From: a van down by the river
Registered: 2009-05-30
Posts: 91

Re: conky configs and screenshots!

# conky config
# taskbar layout

background no
out_to_console yes
#out_to_x no
update_interval 2
total_run_times 0
use_spacer none
 
# [ ${loadavg 1}
# ${acpitemp}°  
# ${wireless_essid eth0}

TEXT
${alignr}${execi 2 ~/.scripts/cmus.sh} | ${freq 1}MHz ${cpu}% ${execi 8 sensors | grep -A 1 'temp1' | cut -c16-17 | sed '/^$/d'}C | ${memperc}% | ${if_existing /sys/class/power_supply/BAT0/present} ${battery_short}${else}AC${endif} | ${if_gw}${if_up eth0}WAN$endif${if_up eth1}LAN${endif}${else}N/A${endif} | ${time %b %d %I:%M%P

th_2b4c61a4-2.png
click to enlarge
Tough to see.

Last edited by Mr Pink57 (2011-12-01 19:16:26)


Even a broken clock is right twice a day.

Diplomacy without force is like music without instruments.

Offline

#863 2011-12-01 19:35:06

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

Mr Pink57 wrote:

I clicked to enlarge ... then got a magnifying glass to read it ... Do-be-do-be-do Brothers.

Offline

#864 2011-12-01 19:35:54

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

ichase wrote:

Looking really good KingX.  You will find that the "Tweeking" is never really done.  wink

Right ... tweaking is an addiction!

Offline

#865 2011-12-17 08:10:55

KingX
Member
From: CA
Registered: 2010-03-24
Posts: 324

Re: conky configs and screenshots!

Sector11 wrote:
ichase wrote:

Looking really good KingX.  You will find that the "Tweeking" is never really done.  wink

Right ... tweaking is an addiction!

lol I thought it was the other way around! But yeh no end to messing around with conky. I am fairly happy with it for now, planning on adding some rtorrent stuff to it soon. smile

Offline

#866 2011-12-20 03:08:24

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

KingX wrote:

lol I thought it was the other way around! But yeh no end to messing around with conky. I am fairly happy with it for now, planning on adding some rtorrent stuff to it soon. smile

wait a sec: happy with it for now + planning on adding some stuff soon = does not compute  big_smile

Offline

#867 2011-12-29 08:38:41

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: conky configs and screenshots!

To use the conkyforecast.py package by kaivalagi, do you have to pay money to a weather site? I looked at one & they wanted just shy of $20-/month!!!

Unless it is free, I can't experiment with this very attractive looking part of conky's capabilities.


[edit:]  OK, I found that I can use www.weather.com for free (100 hits a day) which is what I thought must be happening or there wouldn't be so many people using them.

So I've registered & got my magic key & all, but my login is not accepted! <doh!>

I've white listed them on NoScript, & accept their cookies?

Sooner or later I'll get there...

Last edited by handy (2011-12-29 12:19:27)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#868 2011-12-29 16:05:26

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

handy wrote:

Sooner or later I'll get there...

The problem with conkyForecast is it asks for the KEY and ID so there will be a problem there.

mrpeachy weather LUA in action on #! - OpenBox:
bd7181167027614.jpg
Don't get me wrong, I have samples of ALL of them in action, I endorse none in particular!
But have never seen another sample with mrpeachy's LUA script!

Last edited by Sector11 (2011-12-29 16:17:58)

Offline

#869 2011-12-29 16:15:10

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

Double post - please delete this post!

Last edited by Sector11 (2011-12-29 16:16:50)

Offline

#870 2011-12-29 19:44:10

solar impulse
Member
From: Out in space.
Registered: 2011-12-24
Posts: 22

Re: conky configs and screenshots!

Worked off of the default conky, and looked through this thread a bit; this is what I have come up with in a few hours.
Not bad, although I want to add integration with pianobar using a bash script.
lunapic_132518382574470_1.png

And the .conkyrc

# ~/.conkyrc
# tl tr tm bl br bm ml mm mr none
alignment tl
background no
border_width 1 # in pixels
cpu_avg_samples 2
default_color black
default_outline_color black
default_shade_color black
double_buffer yes
# Draw borders around text?
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
font 6x10
use_xft no
# Xft font when Xft is enabled.
#xftfont Anonymous Pro Mono:size=8
gap_x 5
gap_y 60
# Min. size of text area.
minimum_size 5 5
net_avg_samples 2
# Subtract (file system) buffers from used memory?
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window no
# Boolean, use ARGB visual? ARGB can be used for real transparency
own_window_argb_visual 1
# When ARGB visuals are enabled
# Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
own_window_argb_value 255
# Manually set the WM_CLASS name. Defaults to "Conky".
own_window_class Conky
# if own_window is yes, you may specify type normal, desktop, dock, panel
# or override (default: normal). Desktop windows are special windows that
# have no window decorations; are always visible on your desktop; do not
# appear in your pager or taskbar; and are sticky across all workspaces.
# Panel windows reserve space along a desktop edge, just like panels and
# taskbars, preventing maximized windows from overlapping them. The edge
# is chosen based on the alignment option. Override windows are not under
# the control of the window manager. Hints are ignored. This type of
# window can be useful for certain situations.
own_window_type desktop
# Boolean, set transparency? If ARGB is enabled, sets background opacity to 0%
own_window_transparent 1
update_interval 2.0
uppercase no # Boolean
# Adds spaces around certain objects to stop them from moving other things around.
# Arguments:left, right, and none (default).
# Note that this only helps if you are using a mono font.
use_spacer none
# Shows the maximum value in scaled graphs.
show_graph_scale no
# Shows the time range covered by a graph.
show_graph_range no
stippled_borders 2
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

TEXT
$alignc $sysname $kernel on $machine
${hr 2}
Uptime is $uptime $alignr $time

$alignc MEMORY
RAM @${#990000} $memperc% $alignr $mem/$memmax
${membar 6}
$color Swap @${#990000} $swapperc% $alignr $swap/$swapmax
${swapbar 6}
$color File Sys. @${#990000} $fs_used_perc% $alignr ${#990000}${fs_used /}/${fs_size /}
${fs_bar /}

$color $alignc NETWORKING
$alignc IP Local @${#990000} ${addr eth0}$color
Up @${#990000} ${upspeed eth0}$alignr$color Down @${#990000} ${downspeed eth0}
$color
$alignc ${#990000}$processes $color PROCESSES & CPU @ ${#990000} $cpu%
$color    NAME               PID   CPU%   MEM%
1.  ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
2.  ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
3.  ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
4.  ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
5.  ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}
6.  ${top name 6} ${top pid 6} ${top cpu 6} ${top mem 6}
7.  ${top name 7} ${top pid 7} ${top cpu 7} ${top mem 7}

Arch | Xmonad

Offline

#871 2011-12-30 00:18:12

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: conky configs and screenshots!

Sector11 wrote:
handy wrote:

Sooner or later I'll get there...

The problem with conkyForecast is it asks for the KEY and ID so there will be a problem there.

mrpeachy weather LUA in action on #! - OpenBox:
http://thumbnails66.imagebam.com/16703/bd7181167027614.jpg
Don't get me wrong, I have samples of ALL of them in action, I endorse none in particular!
But have never seen another sample with mrpeachy's LUA script!

@Sector11: Thanks for your great reply. smile

I've just shut down weather.com re. cookies & denied them again with NoScript. I don't need them. wink

I'll look into the options that you have suggested, they sound great.

I've seen some of mrpeachy's work over at Conky Pitstop. Great wiki, my thanks to all concerned.

Hopefully I can copy mr.P's  conky, LUA script, & any fonts onto my machine & it will just work. After which I can make a few simple modifications to suit my needs. As I surely do like what he has done.

I'm sure I'll post back here with the results (however far I manage to get with it). smile


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#872 2011-12-30 01:58:50

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

handy wrote:

Hopefully I can copy mr.P's  conky, LUA script, & any fonts onto my machine & it will just work. After which I can make a few simple modifications to suit my needs. As I surely do like what he has done.

I'm sure I'll post back here with the results (however far I manage to get with it). smile

Well, if you like my version of mrpeachys LUA weather here it is (my screen is 1280x1024):

The Anonymous Pro font.

The conky:

# killall conky && conky -c ~/Conky/Forecast_v6-2.conky &
# To use #! in a conky use: ${exec echo '#!'}

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal #override
own_window_transparent yes
own_window_hints below,sticky,skip_taskbar,skip_pager
# # own_window_argb_visual yes
#own_window_colour black
own_window_class Forecast Conky
own_window_title Forecast 6-2 by MrP

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### 'own_window_type override'
# # own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
## own_window_argb_value 0

minimum_size 180 0     ## width, height
maximum_width 180       ## width, usually a good idea to equal minimum width

gap_x 10        ### left &right
gap_y 10        ### up & down

alignment top_right
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Anonymous Pro:size=8.5

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
# Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
default_shade_color grey
default_outline_color black

default_color DCDCDC #Gainsboro
color0 FFFFF0 #Ivory
color1 778899 #LightSlateGrey
color2 7095BB #Light Blue
color3 C6FF8E #Light Green
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 10
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders no
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################

# Boolean value, if true, Conky will be forked to background when started.
background no

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
 lua_load ~/Conky/LUA/draw_bg.lua

## ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
#######################################################  End LUA Settings  ###

# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1
top_name_width 7

lua_load ~/Conky/LUA/forecast_6.lua
lua_draw_hook_pre weatherdata #starts the lua weather data gathering function, call once at top of conkyrc


TEXT
${lua conky_draw_bg 0 0 0 0 0 0x000000 0.5}${color7}Now:${color} ${lua weather now.tmp}°  ${color7}FL:${color} ${lua weather now.flk}°
${lua weather now.con}\
${lua weather image.now 51 71 75 75}
${goto 100}${color7}Wind Chill:${color} ${lua weather now.wch}°
${goto 100}${color7}Heat Index:${color} ${lua weather now.hid}°
${goto 100}${color7}Humumidity:${color} ${lua weather now.hum}%
${goto 100}    ${color7}Dew Pt:${color} ${lua weather now.dpt}°
${goto 100}   ${color7}Ceiling:${color} ${lua weather now.cel}
${goto 100}${color7}Visibility:${color} ${lua weather now.vis}
${goto 100}${color7}Barometer:${color} ${lua weather now.prs}
${color7}Wind:${color} ${lua weather now.wsp} mph ${color7}@${color} ${lua weather now.wdg}° (${lua weather now.wdi})
${color1}CPU: ${cpu}%${color}
${hr}
${color7}${lua weather day1.day}${color} H: ${lua weather day1.hih}°  L: ${lua weather day1.low}°\
${lua weather image.day1 30 190 35 35}
${lua weather day1.con}
${goto 55}Rain?: ${lua weather day1.ppt}% Cloud: ${lua weather day1.cld}%
${goto 55}UVI: ${lua weather day1.uvn} (${lua weather day1.uvt})
${goto 55} Sun: ${lua weather day1.sri} ${lua weather day1.sst}
${goto 55}Moon: ${lua weather day1.mri} ${lua weather day1.mst}
Phase: ${lua weather day1.mph}
${hr}
${lua weather day2.day} H: ${lua weather day2.hih}°  L: ${lua weather day2.low}°\
${lua weather image.day2 30 270 35 35}
${lua weather day2.con}
${goto 55}Rain?: ${lua weather day2.ppt}% Cloud: ${lua weather day2.cld}%
${goto 55}UVI: ${lua weather day2.uvn} (${lua weather day2.uvt})
${goto 55} Sun: ${lua weather day2.sri} ${lua weather day2.sst}
${goto 55}Moon: ${lua weather day2.mri} ${lua weather day2.mst}
Phase: ${lua weather day2.mph}
${hr}
${lua weather day3.day} H: ${lua weather day3.hih}°  L: ${lua weather day3.low}°\
${lua weather image.day3 30 365 35 35}
${lua weather day3.con}
${goto 55}Rain?: ${lua weather day3.ppt}% Cloud: ${lua weather day3.cld}%
${goto 55}UVI: ${lua weather day3.uvn} (${lua weather day3.uvt})
${goto 55} Sun: ${lua weather day3.sri} ${lua weather day3.sst}
${goto 55}Moon: ${lua weather day3.mri} ${lua weather day3.mst}
Phase: ${lua weather day3.mph}
${hr}
${lua weather day4.day} H: ${lua weather day4.hih}°  L: ${lua weather day4.low}°\
${lua weather image.day4 30 455 35 35}
${lua weather day4.con}
${goto 55}Rain?: ${lua weather day4.ppt}% Cloud: ${lua weather day4.cld}%
${goto 55}UVI: ${lua weather day4.uvn} (${lua weather day4.uvt})
${goto 55} Sun: ${lua weather day4.sri} ${lua weather day4.sst}
${goto 55}Moon: ${lua weather day4.mri} ${lua weather day4.mst}
Phase: ${lua weather day4.mph}
${hr}
${lua weather day5.day} H: ${lua weather day5.hih}°  L: ${lua weather day5.low}°\
${lua weather image.day5 30 540 35 35}
${lua weather day5.con}
${goto 55}Rain?: ${lua weather day5.ppt}% Cloud: ${lua weather day5.cld}%
${goto 55}UVI: ${lua weather day5.uvn} (${lua weather day5.uvt})
${goto 55} Sun: ${lua weather day5.sri} ${lua weather day5.sst}
${goto 55}Moon: ${lua weather day5.mri} ${lua weather day5.mst}
Phase: ${lua weather day5.mph}
${hr}
${lua weather day6.day} H: ${lua weather day6.hih}°  L: ${lua weather day6.low}°\
${lua weather image.day6 30 625 35 35}
${lua weather day6.con}
${goto 55}Rain?: ${lua weather day6.ppt}% Cloud: ${lua weather day6.cld}%
${goto 55}UVI: ${lua weather day6.uvn} (${lua weather day6.uvt})
${goto 55} Sun: ${lua weather day6.sri} ${lua weather day6.sst}
${goto 55}Moon: ${lua weather day6.mri} ${lua weather day6.mst}
Phase: ${lua weather day6.mph}
${hr}
${lua weather day7.day} H: ${lua weather day7.hih}°  L: ${lua weather day7.low}°\
${lua weather image.day7 30 713 35 35}
${lua weather day7.con}
${goto 55}Rain?: ${lua weather day7.ppt}% Cloud: ${lua weather day7.cld}%
${goto 55}UVI: ${lua weather day7.uvn} (${lua weather day7.uvt})
${goto 55} Sun: ${lua weather day7.sri} ${lua weather day7.sst}
${goto 55}Moon: ${lua weather day7.mri} ${lua weather day7.mst}
Phase: ${lua weather day7.mph}
${hr}
${lua weather day8.day}H: ${lua weather day8.hih}°  L: ${lua weather day8.low}°\
${lua weather image.day8 30 802 35 35}
${lua weather day8.con}
${goto 55}Rain?: ${lua weather day8.ppt}% Cloud: ${lua weather day8.cld}%
${goto 55}UVI: ${lua weather day8.uvn} (${lua weather day8.uvt})
${goto 55} Sun: ${lua weather day8.sri} ${lua weather day8.sst}
${goto 55}Moon: ${lua weather day8.mri} ${lua weather day8.mst}
Phase: ${lua weather day8.mph}
${hr}
${lua weather day9.day} H: ${lua weather day9.hih}°  L: ${lua weather day9.low}°\
${lua weather image.day9 30 890 35 35}
${lua weather day9.con}
${goto 55}Rain?: ${lua weather day9.ppt}% Cloud: ${lua weather day9.cld}%
${goto 55}UVI: ${lua weather day9.uvn} (${lua weather day9.uvt})
${goto 55} Sun: ${lua weather day9.sri} ${lua weather day9.sst}
${goto 55}Moon: ${lua weather day9.mri} ${lua weather day9.mst}
Phase: ${lua weather day9.mph}

The weather LUA script - NOTE the settings section at the top.  The location code I use is the same one from ConkyForcast - what LUCK!

~/Conky/LUA/forecast_6.lua

--[[weather display by mrpeachy nov 2011
version 6
call data via conkyrc
ability to display weather images
]]
--#########################################################################################################
--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP
secs=1800--set update interval
web="http://www.intellicast.com/Local/Forecast.aspx?unit=C&location=ARBA0009"--insert unit=C& after? for C
--get web address by going to the intellicast site and entering your location in the box
--for version 3 you must get click on "Extended Forecast" to get the necessary address
units="C"
--set location where weather data txt will be saved
location="/home/sector11/Conky/intelli-weather.txt"
--set location of weather images
weathericons="/home/sector11/Conky/images/weathericons/"
--location of intellicast icons #not currently supported
-- intellicast_icons="/home/sector11/Conky/images/weathericons/intelli"
--#########################################################################################################
require 'imlib2'
require 'cairo'
------------------------------------------------------------------------------
function string:split(delimiter)
local result = { }
local from  = 1
local delim_from, delim_to = string.find( self, delimiter, from  )
while delim_from do
table.insert( result, string.sub( self, from , delim_from-1 ) )
from  = delim_to + 1
delim_from, delim_to = string.find( self, delimiter, from  )
end
table.insert( result, string.sub( self, from  ) )
return result
end
--------------------------------------------------------------------------------
--###################################
function conky_weatherdata()--#######
--###################################
--table to convert intellicast images to icons and fonts
wimage={
wx_65="32,a",
wx_66="30,c",
wx_67="26,f",
wx_68="32,a",
wx_69="28,d",
wx_70="20,0",
wx_71="32,a",
wx_72="21,9",
wx_73="36,5",
wx_74="14,p",
wx_75="28,d",
wx_76="18,w",
wx_77="14,p",
wx_78="23,6",
wx_79="05,x",
wx_80="15,8",
wx_81="15,8",
wx_82="11,h",
wx_83="16,q",
wx_84="00,m",
wx_85="32,a",
wx_86="25,-",
wx_87="09,h",
wx_88="05,x",
wx_89="18,w",
wx_90="18,w",
wx_91="39,g",
wx_92="39,g",
wx_93="39,g",
wx_94="39,g",
wx_95="37,k",
wx_96="37,k",
wx_97="31,A",
wx_98="29,C",
wx_99="27,D",
wx_100="47,K",
wx_101="47,K",
wx_102="33,B",
wx_103="26,f",
wx_104="20,0",
wx_105="45,G",
wx_106="45,G",
wx_107="11,h",--or 40 if heavy?
wx_108="46,O",
wx_109="46,O",
wx_110="06,x",
wx_111="18,w",
wx_112="06,x",
wx_113="46,O",
wx_114="46,O",
wx_115="31,A",
wx_116="47,K",
}--end table
--table to convert wind direction to font and images
windfontt={S="9",SSW=":",SW=";",WSW="<",W="=",WNW=">",NW="?",NNW="@",N="1",NNE="2",NE="3",ENE="4",E="5",ESE="6",SE="7",SSE="8"}
windicont={S="1",SSW="2",SW="3",WSW="4",W="5",WNW="6",NW="7",NNW="8",N="9",NNE=":",NE=";",ENE="<",E="=",ESE=">",SE="?",SSE="@"}
--table to convert moonphase to font and image
moonfontt={New="=",Full="@",FirstQuarter="G",LastQuarter="T",WaningGibbous="R",WaningCrescent="V",WaxingCrescent="E",WaxingGibbous="I"}
moonicont={New="=",Full="@",FirstQuarter="G",LastQuarter="T",WaningGibbous="R",WaningCrescent="V",WaxingCrescent="E",WaxingGibbous="I"}

--##################################################
--######data gatering and initial processing########
--##################################################
local updates=tonumber(conky_parse('${updates}'))
local timer=(updates %secs)+1
if timer==1 or updates==0 then
--gets current data
local f=io.popen("curl '"..web.."' | grep -A62 'As of ' | gawk -F'>' -v RS='</' 'RT{print $NF}' | sed -e 's/^[ \t]*//' -e '/^$/d' -e 's/&deg;//g' -e 's/%//g' -e 's/  / /g' -e 's/Thunderstorms/T.Storms/g'")
data1=f:read("*a")
f:close()
local data2=string.split(data1,"\n")
data={}
for i,v in pairs(data2) do
if string.find(v,"[%a%d]")~=nil then
table.insert(data,data2[i])
end
end
--gets forecast data
local f=io.popen("curl '"..web.."' | grep -A554 'View the Calendar Forecast' | gawk -F'>' -v RS='<' 'RT{print $NF}' | sed -e 's/^[ \t]*//' -e 's/&deg;//g' -e 's/  / /g' -e 's/%//g' -e 's/&deg//g' -e 's/Thunderstorms/T.Storms/g'")
local fdata1=f:read("*a")
f:close()
local fdata=string.split(fdata1,"\n")
fdata2={}
for i,v in pairs(fdata) do
if string.find(v,"[%a%d]")~=nil then
table.insert(fdata2,fdata[i])
end
end
--gets weather image codes
local f=io.popen("curl '"..web.."' | gawk -F'App_Images' -v RS='.png' 'RT{print $NF}'")
icondata1=f:read("*a")
f:close()
local icondata=string.split(icondata1,"\n")
icondata2={}
for i,v in pairs(icondata) do
if string.find(v,"32_white")==nil then
table.insert(icondata2,icondata[i])
end
end
--##################################################
--######data processing#############################
--##################################################
--current conditions
local cdn=string.split(data[2],"/")
if cdn[2]==nil then cd2=""
else
cd2="/"..string.gsub(cdn[2],"[\r\n]","")
end
local wdr=string.split(data[25]," ")
now={con=string.gsub(cdn[1],"[\r\n]",""),tmp=string.gsub(data[4],units,""),flk=string.gsub(data[5],"Feels Like: ",""),wch=data[7],cel=data[10],hid=data[12],vis=string.gsub(data[15],"[ %a]",""),dpt=data[17],wsp=string.gsub(data[20],"[ %a]",""),wdg=(wdr[1]),wdi=string.gsub(wdr[2],"[%(%)\n\r]",""),wgs=string.gsub(data[30]," mph",""),hum=data[22],prs=string.gsub(data[27],"\"",""),cd2=cd2}
--forecast days
local cdn=string.split(fdata2[3],"/")
if cdn[2]==nil then cd2=""
else
cd2="/"..cdn[2]
end
local dyt=string.split(fdata2[2],",")
local uvi=string.split(fdata2[20]," ")
local wsp=string.split(fdata2[32]," ")
local wdr=string.split(fdata2[34]," ")
day1={day=dyt[1],dat=string.gsub(dyt[2],"^.",""),con=cdn[1],hih=fdata2[4],low=fdata2[5],sri=fdata2[8],sst=fdata2[10],mri=fdata2[12],mst=fdata2[14],uvn=uvi[1],uvt=string.gsub(uvi[2],"[%(%)]",""),hum=fdata2[22],ppt=fdata2[24],snw=fdata2[26],cld=fdata2[28],mph=fdata2[30],wmh=string.gsub(wsp[1],"[%a]",""),wkm=string.gsub(wsp[2],"[%a%(,]",""),wkt=string.gsub(wsp[3],"[%a%)]",""),wdg=wdr[1],wdi=string.gsub(wdr[2],"[%(%)\n\r]",""),cd2=cd2}
--day2
local cdn=string.split(fdata2[36],"/")
if cdn[2]==nil then cd2=""
else
cd2="/"..cdn[2]
end
local dyt=string.split(fdata2[35],",")
local uvi=string.split(fdata2[53]," ")
local wsp=string.split(fdata2[65]," ")
local wdr=string.split(fdata2[67]," ")
day2={day=dyt[1],dat=string.gsub(dyt[2],"^.",""),con=cdn[1],hih=fdata2[37],low=fdata2[38],sri=fdata2[41],sst=fdata2[43],mri=fdata2[45],mst=fdata2[47],uvn=uvi[1],uvt=string.gsub(uvi[2],"[%(%)]",""),hum=fdata2[55],ppt=fdata2[57],snw=fdata2[59],cld=fdata2[61],mph=fdata2[63],wmh=string.gsub(wsp[1],"[%a]",""),wkm=string.gsub(wsp[2],"[%a%(,]",""),wkt=string.gsub(wsp[3],"[%a%)]",""),wdg=wdr[1],wdi=string.gsub(wdr[2],"[%(%)\n\r]",""),cd2=cd2}
--day3
local start=68
local cdn=string.split(fdata2[start+1],"/")
if cdn[2]==nil then cd2=""
else
cd2="/"..cdn[2]
end
local dyt=string.split(fdata2[start],",")
local uvi=string.split(fdata2[start+14]," ")
local wsp=string.split(fdata2[start+26]," ")
local wdr=string.split(fdata2[start+28]," ")
day3={day=dyt[1],dat=string.gsub(dyt[2],"^.",""),con=cdn[1],hih=fdata2[start+2],low=fdata2[start+3],sri=fdata2[start+5],sst=fdata2[start+7],mri=fdata2[start+9],mst=fdata2[start+11],uvn=uvi[1],uvt=string.gsub(uvi[2],"[%(%)]",""),hum=fdata2[start+16],ppt=fdata2[start+18],snw=fdata2[start+20],cld=fdata2[start+22],mph=fdata2[start+24],wmh=string.gsub(wsp[1],"[%a]",""),wkm=string.gsub(wsp[2],"[%a%(,]",""),wkt=string.gsub(wsp[3],"[%a%)]",""),wdg=wdr[1],wdi=string.gsub(wdr[2],"[%(%)\n\r]",""),cd2=cd2}
--day4
local start=start+29
local cdn=string.split(fdata2[start+1],"/")
if cdn[2]==nil then cd2=""
else
cd2="/"..cdn[2]
end
local dyt=string.split(fdata2[start],",")
local uvi=string.split(fdata2[start+14]," ")
local wsp=string.split(fdata2[start+26]," ")
local wdr=string.split(fdata2[start+28]," ")
day4={day=dyt[1],dat=string.gsub(dyt[2],"^.",""),con=cdn[1],hih=fdata2[start+2],low=fdata2[start+3],sri=fdata2[start+5],sst=fdata2[start+7],mri=fdata2[start+9],mst=fdata2[start+11],uvn=uvi[1],uvt=string.gsub(uvi[2],"[%(%)]",""),hum=fdata2[start+16],ppt=fdata2[start+18],snw=fdata2[start+20],cld=fdata2[start+22],mph=fdata2[start+24],wmh=string.gsub(wsp[1],"[%a]",""),wkm=string.gsub(wsp[2],"[%a%(,]",""),wkt=string.gsub(wsp[3],"[%a%)]",""),wdg=wdr[1],wdi=string.gsub(wdr[2],"[%(%)\n\r]",""),cd2=cd2}
--day5
local start=start+29
local cdn=string.split(fdata2[start+1],"/")
if cdn[2]==nil then cd2=""
else
cd2="/"..cdn[2]
end
local dyt=string.split(fdata2[start],",")
local uvi=string.split(fdata2[start+14]," ")
local wsp=string.split(fdata2[start+26]," ")
local wdr=string.split(fdata2[start+28]," ")
day5={day=dyt[1],dat=string.gsub(dyt[2],"^.",""),con=cdn[1],hih=fdata2[start+2],low=fdata2[start+3],sri=fdata2[start+5],sst=fdata2[start+7],mri=fdata2[start+9],mst=fdata2[start+11],uvn=uvi[1],uvt=string.gsub(uvi[2],"[%(%)]",""),hum=fdata2[start+16],ppt=fdata2[start+18],snw=fdata2[start+20],cld=fdata2[start+22],mph=fdata2[start+24],wmh=string.gsub(wsp[1],"[%a]",""),wkm=string.gsub(wsp[2],"[%a%(,]",""),wkt=string.gsub(wsp[3],"[%a%)]",""),wdg=wdr[1],wdi=string.gsub(wdr[2],"[%(%)\n\r]",""),cd2=cd2}
--day6
local start=start+29
local cdn=string.split(fdata2[start+1],"/")
if cdn[2]==nil then cd2=""
else
cd2="/"..cdn[2]
end
local dyt=string.split(fdata2[start],",")
local uvi=string.split(fdata2[start+14]," ")
local wsp=string.split(fdata2[start+26]," ")
local wdr=string.split(fdata2[start+28]," ")
day6={day=dyt[1],dat=string.gsub(dyt[2],"^.",""),con=cdn[1],hih=fdata2[start+2],low=fdata2[start+3],sri=fdata2[start+5],sst=fdata2[start+7],mri=fdata2[start+9],mst=fdata2[start+11],uvn=uvi[1],uvt=string.gsub(uvi[2],"[%(%)]",""),hum=fdata2[start+16],ppt=fdata2[start+18],snw=fdata2[start+20],cld=fdata2[start+22],mph=fdata2[start+24],wmh=string.gsub(wsp[1],"[%a]",""),wkm=string.gsub(wsp[2],"[%a%(,]",""),wkt=string.gsub(wsp[3],"[%a%)]",""),wdg=wdr[1],wdi=string.gsub(wdr[2],"[%(%)\n\r]",""),cd2=cd2}
--day7
local start=start+29
local cdn=string.split(fdata2[start+1],"/")
if cdn[2]==nil then cd2=""
else
cd2="/"..cdn[2]
end
local dyt=string.split(fdata2[start],",")
local uvi=string.split(fdata2[start+14]," ")
local wsp=string.split(fdata2[start+26]," ")
local wdr=string.split(fdata2[start+28]," ")
day7={day=dyt[1],dat=string.gsub(dyt[2],"^.",""),con=cdn[1],hih=fdata2[start+2],low=fdata2[start+3],sri=fdata2[start+5],sst=fdata2[start+7],mri=fdata2[start+9],mst=fdata2[start+11],uvn=uvi[1],uvt=string.gsub(uvi[2],"[%(%)]",""),hum=fdata2[start+16],ppt=fdata2[start+18],snw=fdata2[start+20],cld=fdata2[start+22],mph=fdata2[start+24],wmh=string.gsub(wsp[1],"[%a]",""),wkm=string.gsub(wsp[2],"[%a%(,]",""),wkt=string.gsub(wsp[3],"[%a%)]",""),wdg=wdr[1],wdi=string.gsub(wdr[2],"[%(%)\n\r]",""),cd2=cd2}
--day8
local start=start+29
local cdn=string.split(fdata2[start+1],"/")
if cdn[2]==nil then cd2=""
else
cd2="/"..cdn[2]
end
local dyt=string.split(fdata2[start],",")
local uvi=string.split(fdata2[start+14]," ")
local wsp=string.split(fdata2[start+26]," ")
local wdr=string.split(fdata2[start+28]," ")
day8={day=dyt[1],dat=string.gsub(dyt[2],"^.",""),con=cdn[1],hih=fdata2[start+2],low=fdata2[start+3],sri=fdata2[start+5],sst=fdata2[start+7],mri=fdata2[start+9],mst=fdata2[start+11],uvn=uvi[1],uvt=string.gsub(uvi[2],"[%(%)]",""),hum=fdata2[start+16],ppt=fdata2[start+18],snw=fdata2[start+20],cld=fdata2[start+22],mph=fdata2[start+24],wmh=string.gsub(wsp[1],"[%a]",""),wkm=string.gsub(wsp[2],"[%a%(,]",""),wkt=string.gsub(wsp[3],"[%a%)]",""),wdg=wdr[1],wdi=string.gsub(wdr[2],"[%(%)\n\r]",""),cd2=cd2}
--day9
local start=start+29
local cdn=string.split(fdata2[start+1],"/")
if cdn[2]==nil then cd2=""
else
cd2="/"..cdn[2]
end
local dyt=string.split(fdata2[start],",")
local uvi=string.split(fdata2[start+14]," ")
local wsp=string.split(fdata2[start+26]," ")
local wdr=string.split(fdata2[start+28]," ")
day9={day=dyt[1],dat=string.gsub(dyt[2],"^.",""),con=cdn[1],hih=fdata2[start+2],low=fdata2[start+3],sri=fdata2[start+5],sst=fdata2[start+7],mri=fdata2[start+9],mst=fdata2[start+11],uvn=uvi[1],uvt=string.gsub(uvi[2],"[%(%)]",""),hum=fdata2[start+16],ppt=fdata2[start+18],snw=fdata2[start+20],cld=fdata2[start+22],mph=fdata2[start+24],wmh=string.gsub(wsp[1],"[%a]",""),wkm=string.gsub(wsp[2],"[%a%(,]",""),wkt=string.gsub(wsp[3],"[%a%)]",""),wdg=wdr[1],wdi=string.gsub(wdr[2],"[%(%)\n\r]",""),cd2=cd2}
--day10
local start=start+29
local cdn=string.split(fdata2[start+1],"/")
if cdn[2]==nil then cd2=""
else
cd2="/"..cdn[2]
end
local dyt=string.split(fdata2[start],",")
local uvi=string.split(fdata2[start+14]," ")
local wsp=string.split(fdata2[start+26]," ")
local wdr=string.split(fdata2[start+28]," ")
day10={day=dyt[1],dat=string.gsub(dyt[2],"^.",""),con=cdn[1],hih=fdata2[start+2],low=fdata2[start+3],sri=fdata2[start+5],sst=fdata2[start+7],mri=fdata2[start+9],mst=fdata2[start+11],uvn=uvi[1],uvt=string.gsub(uvi[2],"[%(%)]",""),hum=fdata2[start+16],ppt=fdata2[start+18],snw=fdata2[start+20],cld=fdata2[start+22],mph=fdata2[start+24],wmh=string.gsub(wsp[1],"[%a]",""),wkm=string.gsub(wsp[2],"[%a%(,]",""),wkt=string.gsub(wsp[3],"[%a%)]",""),wdg=wdr[1],wdi=string.gsub(wdr[2],"[%(%)\n\r]",""),cd2=cd2}
--##################################################
--######font and image processing###################
--##################################################
nowif=string.split((loadstring("return ".."wimage."..string.gsub(icondata2[1],"/40_white/",""))()),",")
day1if=string.split((loadstring("return ".."wimage."..string.gsub(icondata2[2],"/40_white/",""))()),",")
day2if=string.split((loadstring("return ".."wimage."..string.gsub(icondata2[3],"/40_white/",""))()),",")
day3if=string.split((loadstring("return ".."wimage."..string.gsub(icondata2[4],"/40_white/",""))()),",")
day4if=string.split((loadstring("return ".."wimage."..string.gsub(icondata2[5],"/40_white/",""))()),",")
day5if=string.split((loadstring("return ".."wimage."..string.gsub(icondata2[6],"/40_white/",""))()),",")
day6if=string.split((loadstring("return ".."wimage."..string.gsub(icondata2[7],"/40_white/",""))()),",")
day7if=string.split((loadstring("return ".."wimage."..string.gsub(icondata2[8],"/40_white/",""))()),",")
day8if=string.split((loadstring("return ".."wimage."..string.gsub(icondata2[9],"/40_white/",""))()),",")
day9if=string.split((loadstring("return ".."wimage."..string.gsub(icondata2[10],"/40_white/",""))()),",")
day10if=string.split((loadstring("return ".."wimage."..string.gsub(icondata2[11],"/40_white/",""))()),",")
---------------------------------------------------
image={now=nowif[1],day1=day1if[1],day2=day2if[1],day3=day3if[1],day4=day4if[1],day5=day5if[1],day6=day6if[1],day7=day7if[1],day8=day8if[1],day9=day9if[1],day10=day10if[1]}
font={now=nowif[2],day1=day1if[2],day2=day2if[2],day3=day3if[2],day4=day4if[2],day5=day5if[2],day6=day6if[2],day7=day7if[2],day8=day8if[2],day9=day9if[2],day10=day10if[2]}
--wind font-----------------------------------------
print ((loadstring("return ".."windfontt."..day1.wdi)()))
windfont={
now=(loadstring("return ".."windfontt."..now.wdi)()),
day1=(loadstring("return ".."windfontt."..day1.wdi)()),
day2=(loadstring("return ".."windfontt."..day2.wdi)()),
day3=(loadstring("return ".."windfontt."..day3.wdi)()),
day4=(loadstring("return ".."windfontt."..day4.wdi)()),
day5=(loadstring("return ".."windfontt."..day5.wdi)()),
day6=(loadstring("return ".."windfontt."..day6.wdi)()),
day7=(loadstring("return ".."windfontt."..day7.wdi)()),
day8=(loadstring("return ".."windfontt."..day8.wdi)()),
day9=(loadstring("return ".."windfontt."..day9.wdi)()),
day10=(loadstring("return ".."windfontt."..day10.wdi)()),
}
--wind image----------------------------------------
windicon={
now=(loadstring("return ".."windicont."..now.wdi)()),
day1=(loadstring("return ".."windicont."..day1.wdi)()),
day2=(loadstring("return ".."windicont."..day2.wdi)()),
day3=(loadstring("return ".."windicont."..day3.wdi)()),
day4=(loadstring("return ".."windicont."..day4.wdi)()),
day5=(loadstring("return ".."windicont."..day5.wdi)()),
day6=(loadstring("return ".."windicont."..day6.wdi)()),
day7=(loadstring("return ".."windicont."..day7.wdi)()),
day8=(loadstring("return ".."windicont."..day8.wdi)()),
day9=(loadstring("return ".."windicont."..day9.wdi)()),
day10=(loadstring("return ".."windicont."..day10.wdi)()),
}
--moon font-----------------------------------------
--print (day1.mph,(loadstring("return ".."moonfontt."..string.gsub(day1.mph," ",""))()))
moonfont={
day1=(loadstring("return ".."moonfontt."..string.gsub(day1.mph," ",""))()),
day2=(loadstring("return ".."moonfontt."..string.gsub(day2.mph," ",""))()),
day3=(loadstring("return ".."moonfontt."..string.gsub(day3.mph," ",""))()),
day4=(loadstring("return ".."moonfontt."..string.gsub(day4.mph," ",""))()),
day5=(loadstring("return ".."moonfontt."..string.gsub(day5.mph," ",""))()),
day6=(loadstring("return ".."moonfontt."..string.gsub(day6.mph," ",""))()),
day7=(loadstring("return ".."moonfontt."..string.gsub(day7.mph," ",""))()),
day8=(loadstring("return ".."moonfontt."..string.gsub(day8.mph," ",""))()),
day9=(loadstring("return ".."moonfontt."..string.gsub(day9.mph," ",""))()),
day10=(loadstring("return ".."moonfontt."..string.gsub(day10.mph," ",""))()),
}
--moon icon-----------------------------------------
moonicon={
day1=(loadstring("return ".."moonicont."..string.gsub(day1.mph," ",""))()),
day2=(loadstring("return ".."moonicont."..string.gsub(day2.mph," ",""))()),
day3=(loadstring("return ".."moonicont."..string.gsub(day3.mph," ",""))()),
day4=(loadstring("return ".."moonicont."..string.gsub(day4.mph," ",""))()),
day5=(loadstring("return ".."moonicont."..string.gsub(day5.mph," ",""))()),
day6=(loadstring("return ".."moonicont."..string.gsub(day6.mph," ",""))()),
day7=(loadstring("return ".."moonicont."..string.gsub(day7.mph," ",""))()),
day8=(loadstring("return ".."moonicont."..string.gsub(day8.mph," ",""))()),
day9=(loadstring("return ".."moonicont."..string.gsub(day9.mph," ",""))()),
day10=(loadstring("return ".."moonicont."..string.gsub(day10.mph," ",""))()),
}
--##################################################
--##writing data to file for conkyrc restart########
--##################################################
local file = io.open(location, "w")
local datastringnow=now.con.."|"..now.tmp.."|"..now.flk.."|"..now.wch.."|"..now.cel.."|"..now.hid.."|"..now.vis.."|"..now.dpt.."|"..now.wsp.."|"..now.wdg.."|"..now.wdi.."|"..now.wgs.."|"..now.hum.."|"..now.prs.."|"..now.cd2
local datastringday1=day1.day.."|"..day1.dat.."|"..day1.con.."|"..day1.hih.."|"..day1.low.."|"..day1.sri.."|"..day1.sst.."|"..day1.mri.."|"..day1.mst.."|"..day1.uvn.."|"..day1.uvt.."|"..day1.hum.."|"..day1.ppt.."|"..day1.snw.."|"..day1.cld.."|"..day1.mph.."|"..day1.wmh.."|"..day1.wkm.."|"..day1.wkt.."|"..day1.wdg.."|"..day1.wdi.."|"..day1.cd2
local datastringday2=day2.day.."|"..day2.dat.."|"..day2.con.."|"..day2.hih.."|"..day2.low.."|"..day2.sri.."|"..day2.sst.."|"..day2.mri.."|"..day2.mst.."|"..day2.uvn.."|"..day2.uvt.."|"..day2.hum.."|"..day2.ppt.."|"..day2.snw.."|"..day2.cld.."|"..day2.mph.."|"..day2.wmh.."|"..day2.wkm.."|"..day2.wkt.."|"..day2.wdg.."|"..day2.wdi.."|"..day2.cd2
local datastringday3=day3.day.."|"..day3.dat.."|"..day3.con.."|"..day3.hih.."|"..day3.low.."|"..day3.sri.."|"..day3.sst.."|"..day3.mri.."|"..day3.mst.."|"..day3.uvn.."|"..day3.uvt.."|"..day3.hum.."|"..day3.ppt.."|"..day3.snw.."|"..day3.cld.."|"..day3.mph.."|"..day3.wmh.."|"..day3.wkm.."|"..day3.wkt.."|"..day3.wdg.."|"..day3.wdi.."|"..day3.cd2
local datastringday4=day4.day.."|"..day4.dat.."|"..day4.con.."|"..day4.hih.."|"..day4.low.."|"..day4.sri.."|"..day4.sst.."|"..day4.mri.."|"..day4.mst.."|"..day4.uvn.."|"..day4.uvt.."|"..day4.hum.."|"..day4.ppt.."|"..day4.snw.."|"..day4.cld.."|"..day4.mph.."|"..day4.wmh.."|"..day4.wkm.."|"..day4.wkt.."|"..day4.wdg.."|"..day4.wdi.."|"..day4.cd2
local datastringday5=day5.day.."|"..day5.dat.."|"..day5.con.."|"..day5.hih.."|"..day5.low.."|"..day5.sri.."|"..day5.sst.."|"..day5.mri.."|"..day5.mst.."|"..day5.uvn.."|"..day5.uvt.."|"..day5.hum.."|"..day5.ppt.."|"..day5.snw.."|"..day5.cld.."|"..day5.mph.."|"..day5.wmh.."|"..day5.wkm.."|"..day5.wkt.."|"..day5.wdg.."|"..day5.wdi.."|"..day5.cd2
local datastringday6=day6.day.."|"..day6.dat.."|"..day6.con.."|"..day6.hih.."|"..day6.low.."|"..day6.sri.."|"..day6.sst.."|"..day6.mri.."|"..day6.mst.."|"..day6.uvn.."|"..day6.uvt.."|"..day6.hum.."|"..day6.ppt.."|"..day6.snw.."|"..day6.cld.."|"..day6.mph.."|"..day6.wmh.."|"..day6.wkm.."|"..day6.wkt.."|"..day6.wdg.."|"..day6.wdi.."|"..day6.cd2
local datastringday7=day7.day.."|"..day7.dat.."|"..day7.con.."|"..day7.hih.."|"..day7.low.."|"..day7.sri.."|"..day7.sst.."|"..day7.mri.."|"..day7.mst.."|"..day7.uvn.."|"..day7.uvt.."|"..day7.hum.."|"..day7.ppt.."|"..day7.snw.."|"..day7.cld.."|"..day7.mph.."|"..day7.wmh.."|"..day7.wkm.."|"..day7.wkt.."|"..day7.wdg.."|"..day7.wdi.."|"..day7.cd2
local datastringday8=day8.day.."|"..day8.dat.."|"..day8.con.."|"..day8.hih.."|"..day8.low.."|"..day8.sri.."|"..day8.sst.."|"..day8.mri.."|"..day8.mst.."|"..day8.uvn.."|"..day8.uvt.."|"..day8.hum.."|"..day8.ppt.."|"..day8.snw.."|"..day8.cld.."|"..day8.mph.."|"..day8.wmh.."|"..day8.wkm.."|"..day8.wkt.."|"..day8.wdg.."|"..day8.wdi.."|"..day8.cd2
local datastringday9=day9.day.."|"..day9.dat.."|"..day9.con.."|"..day9.hih.."|"..day9.low.."|"..day9.sri.."|"..day9.sst.."|"..day9.mri.."|"..day9.mst.."|"..day9.uvn.."|"..day9.uvt.."|"..day9.hum.."|"..day9.ppt.."|"..day9.snw.."|"..day9.cld.."|"..day9.mph.."|"..day9.wmh.."|"..day9.wkm.."|"..day9.wkt.."|"..day9.wdg.."|"..day9.wdi.."|"..day9.cd2
local datastringday10=day10.day.."|"..day10.dat.."|"..day10.con.."|"..day10.hih.."|"..day10.low.."|"..day10.sri.."|"..day10.sst.."|"..day10.mri.."|"..day10.mst.."|"..day10.uvn.."|"..day10.uvt.."|"..day10.hum.."|"..day10.ppt.."|"..day10.snw.."|"..day10.cld.."|"..day10.mph.."|"..day10.wmh.."|"..day10.wkm.."|"..day10.wkt.."|"..day10.wdg.."|"..day10.wdi.."|"..day10.cd2
local datastringfont=font.now.."|"..font.day1.."|"..font.day2.."|"..font.day3.."|"..font.day4.."|"..font.day5.."|"..font.day6.."|"..font.day7.."|"..font.day8.."|"..font.day9.."|"..font.day10
local datastringimage=image.now.."|"..image.day1.."|"..image.day2.."|"..image.day3.."|"..image.day4.."|"..image.day5.."|"..image.day6.."|"..image.day7.."|"..image.day8.."|"..image.day9.."|"..image.day10
local datastringwindfont=windfont.now.."|"..windfont.day1.."|"..windfont.day2.."|"..windfont.day3.."|"..windfont.day4.."|"..windfont.day5.."|"..windfont.day6.."|"..windfont.day7.."|"..windfont.day8.."|"..windfont.day9.."|"..windfont.day10
local datastringwindicon=windicon.now.."|"..windicon.day1.."|"..windicon.day2.."|"..windicon.day3.."|"..windicon.day4.."|"..windicon.day5.."|"..windicon.day6.."|"..windicon.day7.."|"..windicon.day8.."|"..windicon.day9.."|"..windicon.day10
local datastringmoonfont=moonfont.day1.."|"..moonfont.day2.."|"..moonfont.day3.."|"..moonfont.day4.."|"..moonfont.day5.."|"..moonfont.day6.."|"..moonfont.day7.."|"..moonfont.day8.."|"..moonfont.day9.."|"..moonfont.day10
local datastringmoonicon=moonicon.day1.."|"..moonicon.day2.."|"..moonicon.day3.."|"..moonicon.day4.."|"..moonicon.day5.."|"..moonicon.day6.."|"..moonicon.day7.."|"..moonicon.day8.."|"..moonicon.day9.."|"..moonicon.day10
file:write(datastringnow.."<>"..datastringday1.."<>"..datastringday2.."<>"..datastringday3.."<>"..datastringday4.."<>:"..datastringday5.."<>"..datastringday6.."<>"..datastringday7.."<>"..datastringday8.."<>"..datastringday9.."<>"..datastringday10.."<>"..datastringfont.."<>"..datastringimage.."<>"..datastringwindfont.."<>"..datastringwindicon.."<>"..datastringmoonfont.."<>"..datastringmoonicon)
file:close()
end--timed section
--##################################################
--#read written data and process for conyrc restart#
--##################################################
if data1==nil then
local f=io.popen("cat '"..location.."'")
local alldata=f:read("*a")
f:close()
daydata=string.split(alldata,"<>")
now=string.split(daydata[1],"|")
day1=string.split(daydata[2],"|")
day2=string.split(daydata[3],"|")
day3=string.split(daydata[4],"|")
day4=string.split(daydata[5],"|")
day5=string.split(daydata[6],"|")
day6=string.split(daydata[7],"|")
day7=string.split(daydata[8],"|")
day8=string.split(daydata[9],"|")
day9=string.split(daydata[10],"|")
day10=string.split(daydata[11],"|")
font=string.split(daydata[12],"|")
image=string.split(daydata[13],"|")
windfont=string.split(daydata[14],"|")
windicon=string.split(daydata[15],"|")
moonfont=string.split(daydata[16],"|")
moonicon=string.split(daydata[17],"|")

--set individual data points
now={con=now[1],tmp=now[2],flk=now[3],wch=now[4],cel=now[5],hid=now[6],vis=now[7],dpt=now[8],wsp=now[9],wdg=now[10],wdi=now[11],wgs=now[12],hum=now[13],prs=now[14],cd2=now[15]}
day1={day=day1[1],dat=day1[2],con=day1[3],hih=day1[4],low=day1[5],sri=day1[6],sst=day1[7],mri=day1[8],mst=day1[9],uvn=day1[10],uvt=day1[11],hum=day1[12],ppt=day1[13],snw=day1[14],cld=day1[15],mph=day1[16],wmh=day1[17],wkm=day1[18],wkt=day1[19],wdg=day1[20],wdi=day1[21],cd2=day1[22]}
day2={day=day2[1],dat=day2[2],con=day2[3],hih=day2[4],low=day2[5],sri=day2[6],sst=day2[7],mri=day2[8],mst=day2[9],uvn=day2[10],uvt=day2[11],hum=day2[12],ppt=day2[13],snw=day2[14],cld=day2[15],mph=day2[16],wmh=day2[17],wkm=day2[18],wkt=day2[19],wdg=day2[20],wdi=day2[21],cd2=day2[22]}
day3={day=day3[1],dat=day3[2],con=day3[3],hih=day3[4],low=day3[5],sri=day3[6],sst=day3[7],mri=day3[8],mst=day3[9],uvn=day3[10],uvt=day3[11],hum=day3[12],ppt=day3[13],snw=day3[14],cld=day3[15],mph=day3[16],wmh=day3[17],wkm=day3[18],wkt=day3[19],wdg=day3[20],wdi=day3[21],cd2=day3[22]}
day4={day=day4[1],dat=day4[2],con=day4[3],hih=day4[4],low=day4[5],sri=day4[6],sst=day4[7],mri=day4[8],mst=day4[9],uvn=day4[10],uvt=day4[11],hum=day4[12],ppt=day4[13],snw=day4[14],cld=day4[15],mph=day4[16],wmh=day4[17],wkm=day4[18],wkt=day4[19],wdg=day4[20],wdi=day4[21],cd2=day4[22]}
day5={day=day5[1],dat=day5[2],con=day5[3],hih=day5[4],low=day5[5],sri=day5[6],sst=day5[7],mri=day5[8],mst=day5[9],uvn=day5[10],uvt=day5[11],hum=day5[12],ppt=day5[13],snw=day5[14],cld=day5[15],mph=day5[16],wmh=day5[17],wkm=day5[18],wkt=day5[19],wdg=day5[20],wdi=day5[21],cd2=day5[22]}
day6={day=day6[1],dat=day6[2],con=day6[3],hih=day6[4],low=day6[5],sri=day6[6],sst=day6[7],mri=day6[8],mst=day6[9],uvn=day6[10],uvt=day6[11],hum=day6[12],ppt=day6[13],snw=day6[14],cld=day6[15],mph=day6[16],wmh=day6[17],wkm=day6[18],wkt=day6[19],wdg=day6[20],wdi=day6[21],cd2=day6[22]}
day7={day=day7[1],dat=day7[2],con=day7[3],hih=day7[4],low=day7[5],sri=day7[6],sst=day7[7],mri=day7[8],mst=day7[9],uvn=day7[10],uvt=day7[11],hum=day7[12],ppt=day7[13],snw=day7[14],cld=day7[15],mph=day7[16],wmh=day7[17],wkm=day7[18],wkt=day7[19],wdg=day7[20],wdi=day7[21],cd2=day7[22]}
day8={day=day8[1],dat=day8[2],con=day8[3],hih=day8[4],low=day8[5],sri=day8[6],sst=day8[7],mri=day8[8],mst=day8[9],uvn=day8[10],uvt=day8[11],hum=day8[12],ppt=day8[13],snw=day8[14],cld=day8[15],mph=day8[16],wmh=day8[17],wkm=day8[18],wkt=day8[19],wdg=day8[20],wdi=day8[21],cd2=day8[22]}
day9={day=day9[1],dat=day9[2],con=day9[3],hih=day9[4],low=day9[5],sri=day9[6],sst=day9[7],mri=day9[8],mst=day9[9],uvn=day9[10],uvt=day9[11],hum=day9[12],ppt=day9[13],snw=day9[14],cld=day9[15],mph=day9[16],wmh=day9[17],wkm=day9[18],wkt=day9[19],wdg=day9[20],wdi=day9[21],cd2=day9[22]}
day10={day=day10[1],dat=day10[2],con=day10[3],hih=day10[4],low=day10[5],sri=day10[6],sst=day10[7],mri=day10[8],mst=day10[9],uvn=day10[10],uvt=day10[11],hum=day10[12],ppt=day10[13],snw=day10[14],cld=day10[15],mph=day10[16],wmh=day10[17],wkm=day10[18],wkt=day10[19],wdg=day10[20],wdi=day10[21],cd2=day10[22]}
font={now=font[1],day1=font[2],day2=font[3],day3=font[4],day4=font[5],day5=font[6],day6=font[7],day7=font[8],day8=font[9],day9=font[10],day10=font[11]}
image={now=image[1],day1=image[2],day2=image[3],day3=image[4],day4=image[5],day5=image[6],day6=image[7],day7=image[8],day8=image[9],day9=image[10],day10=image[11]}
windfont={now=windfont[1],day1=windfont[2],day2=windfont[3],day3=windfont[4],day4=windfont[5],day5=windfont[6],day6=windfont[7],day7=windfont[8],day8=windfont[9],day9=windfont[10],day10=windfont[11]}
windicon={now=windicon[1],day1=windicon[2],day2=windicon[3],day3=windicon[4],day4=windicon[5],day5=windicon[6],day6=windicon[7],day7=windicon[8],day8=windicon[9],day9=windicon[10],day10=windicon[11]}
moonfont={day1=moonfont[1],day2=moonfont[2],day3=moonfont[3],day4=moonfont[4],day5=moonfont[5],day6=moonfont[6],day7=moonfont[7],day8=moonfont[8],day9=moonfont[9],day10=moonfont[10]}
moonicon={day1=moonicon[1],day2=moonicon[2],day3=moonicon[3],day4=moonicon[4],day5=moonicon[5],day6=moonicon[6],day7=moonicon[7],day8=moonicon[8],day9=moonicon[9],day10=moonicon[10]}
end--if data1==nil
return ""
--#########################################
end--weather data gathering function#######
--#########################################

--#############################################################
function conky_weather(conkydata,xpos,ypos,scale1,scale2)--####
--#############################################################
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
if xpos==nil then xpos=0 end
if ypos==nil then ypos=0 end
if scale1==nil then scale1=0 end
if scale2==nil then scale2=0 end

--[[data available
--current info.. use now.option
--options
con=conditions summary
cd2=conditions secondary
tmp=temperature
flk=Feels Like
wch=wind chill
cel=ceiling
hid=heat index
vis=visibility
dpt=dew point
wsp=wind speed (in mph)
wdg=wind direction in degrees
wdi=wind direction NSEW
wgs=wind gusts
hum=humidity
prs=pressure

--forecast information, 10 day
--use like this  dayX.option (where X=day number (1=today,2=tomorrow))
--options
day=forecast day
dat=forecast date
con=conditions summary
cd2=conditions secondary
hih=high temp
low=low temp
sri=sunrise
sst=sunset
mri=moon rise
mst=moon set
uvi=ultraviolet index
hum=humidity
ppt=chance of precipitation
snw=chance of snow
cld=cloud cover
mph=moon phase
wmh=wind speed in mph
wkm=wind speed in km/h
wkt=wind speed in knots
wdg=wind direction in degrees
wdi=wind direction in nesw

for weather images/icons

${lua weather image.now x y scalex scaley) for current
${lua weather image.dayX x y scalex scaley) where X = 1 to 10

for weather font

${lua weather font.now x y fontsize color) for current
${lua weather font.dayX x y fontsize color) where X = 1 to 10

for wind direction font

${lua weather windfont.now x y fontsize scaley) for current
${lua weather windfont.dayX x y fontsize color) where X = 1 to 10

for moon phase font

no moon phase for current conditions
${lua weather moonfont.dayX x y fontsize color) where X = 1 to 10
]]
---------------------------------------------
--moon font
if string.find(conkydata,"moonfont")~=nil then
local function rgb_to_r_g_b(color)
return ((color/0x10000) % 0x100)/255,((color/0x100) % 0x100)/255,(color % 0x100)/255,1
end
wfont="Moon Phases"
fsize=scale1
text=(loadstring("return "..conkydata)())
cairo_select_font_face (cr, wfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fsize)
cairo_set_source_rgba (cr ,rgb_to_r_g_b(scale2))
cairo_move_to (cr,xpos,ypos)
cairo_show_text (cr,text)
conkydata=""
end--moon font
--wind font
if string.find(conkydata,"windfont")~=nil then
local function rgb_to_r_g_b(color)
return ((color/0x10000) % 0x100)/255,((color/0x100) % 0x100)/255,(color % 0x100)/255,1
end
wfont="ConkyWindNESW"
fsize=scale1
text=(loadstring("return "..conkydata)())
cairo_select_font_face (cr, wfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fsize)
cairo_set_source_rgba (cr ,rgb_to_r_g_b(scale2))
cairo_move_to (cr,xpos,ypos)
cairo_show_text (cr,text)
conkydata=""
end--wind font
--weather font comes last as will match windfont and moonfont
if string.find(conkydata,"font")~=nil then
local function rgb_to_r_g_b(color)
return ((color/0x10000) % 0x100)/255,((color/0x100) % 0x100)/255,(color % 0x100)/255,1
end
wfont="ConkyWeather"
fsize=scale1
text=(loadstring("return "..conkydata)())
cairo_select_font_face (cr, wfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fsize)
cairo_set_source_rgba (cr ,rgb_to_r_g_b(scale2))
cairo_move_to (cr,xpos,ypos)
cairo_show_text (cr,text)
conkydata=""
end--weather font
--weather image
if string.find(conkydata,"image")~=nil then
file=weathericons..(loadstring("return "..conkydata)())..".png"
imageshow(file,xpos,ypos,scale1,scale2)
conkydata=""
end--weather image
---------------------------------------------
if (loadstring("return " .. conkydata)())~=nil then
output=(loadstring("return " .. conkydata)())
else
output=""
end
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return output
end--main function

function imageshow(file,center_x,center_y,w,h)
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(w)==0 then
width=imlib_image_get_width()
else
width=tonumber(w)
end
if tonumber(h)==0 then
height=imlib_image_get_height()
else
height=tonumber(h)
end
local iacross=center_x-(width/2)
local idown=center_y-(height/2)
imlib_context_set_image(show)
local scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
imlib_free_image()
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(iacross, idown)
imlib_free_image()
show=nil
end

and the background LUA script
~/Conky/LUA/draw_bg.lua

--[[Background originally by londonali1010 (2009)
    ability to set any size for background mrpeachy 2011
    ability to set variables for bg in conkyrc dk75

  the change is that if you set width and/or height to 0
  then it assumes the width and/or height of the conky window

so:

lua_load ~/Conky/LUA/draw_bg.lua
TEXT
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}


${lua conky_draw_bg corner_radius x_position y_position width height color alpha}

covers the whole window and will change if you change the minimum_size setting

20             corner_radius
 0             x_position
 0             y_position
 0             width
 0             height
 0x000000      color
 0.4           alpha

]]

require 'cairo'
local    cs, cr = nil
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end

If you have questions just ask.

Last edited by Sector11 (2011-12-30 02:01:56)

Offline

#873 2011-12-30 05:33:17

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: conky configs and screenshots!

@Sector11: Thanks for your stuff. big_smile

I have installed fonts, & the rest, got all the paths right, had to make a correction due ~/Conky & ~/conky somewhere in there.

Put my intellicast location in the lua, select units=C, bumped up the size of the window & the fonts so I can see it (I sit about 5ft away from a 24" monitor).

There is this path:

weathericons="/home/handy/Conky/images/weathericons/"

I don't know where to get them, there are plenty on the web, I looked at over two dozen (not all free) & I didn't recognise the same ones that you were using in your screenshot.

Anyway, I can get it to open up, but it ain't quite there yet.

These are the error messages, the "Conky: unknown variable lua" goes on & on:

handy ~  $  
Conky: desktop window (131) is root window
Conky: window type - normal
Conky: drawing to created window (0x1800001)
Conky: drawing to double buffer
Conky: 'Forecast_v6-2.conky' modified, reloading...
Conky: Forecast_v6-2.conky: 110: no such configuration: 'lua_load'
Conky: Forecast_v6-2.conky: 121: no such configuration: 'lua_load'
Conky: Forecast_v6-2.conky: 122: no such configuration: 'lua_draw_hook_pre'
Conky: unknown variable lua
Conky: unknown variable lua
Conky: unknown variable lua

There is a screenshot (of part of the display window) here on my site:

http://www.users.on.net/~thehands/windowshot.html

Thanks very much for your help. smile

Last edited by handy (2011-12-30 05:34:25)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#874 2011-12-30 13:04:45

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

handy wrote:

@Sector11:

${grumble grumble} 24" monitor ${grumble grumble} 5' away ${grumble grumble} my old eyes would love that.
OK now that that's out of the way let's continue.

The images!! I though the script grabbed those.  Hmmmmm OK you can get them here. They will extract to: /weathericons so if you want; extract them to ~/conky/weathericons and bypass the /images/ directory, it's just that I have other images from other conkys in there.

Also you will need to play with the images (size and position) since you have a large monitor and large text.  But I'm sure you knew that part. The LUA script positions the images from the centre while the conky image command works from the top-left corner of the image.

LUA scripts need to be executable, did you do that to both?  Sorry for not mentioning that.

Still here if you need more - now I gotta go look at your site!

S11

Offline

#875 2011-12-30 23:00:35

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: conky configs and screenshots!

Sector11 wrote:
handy wrote:

@Sector11:

${grumble grumble} 24" monitor ${grumble grumble} 5' away ${grumble grumble} my old eyes would love that.
OK now that that's out of the way let's continue.

My eyes are very likely older than yours, (I'm closer to 60 than 50). I increase the font size of everything to make it comfortable, & the 5ft is where I can get my back comfortable in the only chair in the world that it seems to be possible! smile

Sector11 wrote:

The images!! I though the script grabbed those.  Hmmmmm OK you can get them here. They will extract to: /weathericons so if you want; extract them to ~/conky/weathericons and bypass the /images/ directory, it's just that I have other images from other conkys in there.

Thanks, they are in place on the drive.

Sector11 wrote:

Also you will need to play with the images (size and position) since you have a large monitor and large text.  But I'm sure you knew that part. The LUA script positions the images from the centre while the conky image command works from the top-left corner of the image.

I'll learn about that I can see.

Don't be sure about anything regarding knowledge & me!

Sector11 wrote:

LUA scripts need to be executable, did you do that to both?  Sorry for not mentioning that.

Yes.

I tried calling them from the terminal but got errors posted below:

handy ~  $  Conky/LUA/forecast.lua: line 1: --[[weather: command not found
Conky/LUA/forecast.lua: line 2: version: command not found
Conky/LUA/forecast.lua: line 3: call: command not found
Conky/LUA/forecast.lua: line 4: ability: command not found
Conky/LUA/forecast.lua: line 5: syntax error near unexpected token `]]'
Conky/LUA/forecast.lua: line 5: `]]'
handy ~  $  Conky/LUA/draw_bg.lua
Conky/LUA/draw_bg.lua: line 2: lua_load: command not found
Conky/LUA/draw_bg.lua: line 3: TEXT: command not found
Conky/LUA/draw_bg.lua: line 4: ${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}: bad substitution
Conky/LUA/draw_bg.lua: line 7: ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}: bad substitution
Conky/LUA/draw_bg.lua: line 9: covers: command not found
Conky/LUA/draw_bg.lua: line 11: 20: command not found
Conky/LUA/draw_bg.lua: line 12: 0: command not found
Conky/LUA/draw_bg.lua: line 13: 0: command not found
Conky/LUA/draw_bg.lua: line 14: 0: command not found
Conky/LUA/draw_bg.lua: line 15: 0: command not found
Conky/LUA/draw_bg.lua: line 16: 0x000000: command not found
Conky/LUA/draw_bg.lua: line 17: 0.4: command not found
Conky/LUA/draw_bg.lua: line 19: syntax error near unexpected token `]]'
Conky/LUA/draw_bg.lua: line 19: `]]'

I just called the forecast conky again & got the following in the terminal:

handy ~  $  conky -d -c forecast.conky
Conky: forecast.conky: 110: no such configuration: 'lua_load'
Conky: forecast.conky: 121: no such configuration: 'lua_load'
Conky: forecast.conky: 122: no such configuration: 'lua_draw_hook_pre'
Conky: unknown variable lua
Conky: unknown variable lua
Conky: unknown variable lua

<----- snip  over a hundred of them ----->

Conky: unknown variable lua
Conky: forked to background, pid is 32051
handy ~  $  
Conky: desktop window (131) is root window
Conky: window type - normal
Conky: drawing to created window (0x1800001)
Conky: drawing to double buffer

So it looks to me like it is all lua trouble at this point.

Does ~/Conky/LUA need to be on the search path for the computer? I'll add those directories & see if that helps.

[edit:] Adding PATHS to ~/.bash_profile made no difference. sad  /edit

Sector11 wrote:

Still here if you need more - now I gotta go look at your site!

S11

Thanks for your persistence. smile

I don't think you will find the site all that interesting unless you are into building a slot car track, & even then it is a click together not routed job anyway. wink

Last edited by handy (2011-12-30 23:15:51)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

Board footer

Powered by FluxBB