SEARCH

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

You are not logged in.

#276 2012-01-23 15:17:21

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

Re: weather in conky (LUA scripts) updated 12/26/13!

mrpeachy wrote:

now that the script is running reliably, i can think about adding functionality
although any new additions will be just that, and will not affect the way the existing script function backwards compatibility!

so you can take your weather_display setup and plug it into the newest update and it will still work as you expect

also that is now all the information that intellicast has to offer
at least as much as i am going to process
they do have those short text westher summaries, but i dont find them very useful
they also have weather alerts which could be useful but is blank most of the time

i was thinking of putting in a modified version of the bg drawing code which can then be set up in the weather_display section

been playing with the idea and made this
screenshot-1306.png

im not sure how much value there is it, you could achieve a similar result by just calling multiple instances of ${lua draw_bg settings) below text in conkyrc and get a similar result
draw_bg cant draw outlines however

not sure if bg will make it to dropbox smile

Ummmm just a suggestion (not weather related): update "The Ultimate LUA Background Script: 'draw_bg.lua' to include the draw outline function.

I'd use it ... I actively push/advertise/recommend that script all the time!
It's the ONLY one I use!


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

Offline

Help fund CrunchBang, donate to the project!

#277 2012-01-23 18:37:55

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

Re: weather in conky (LUA scripts) updated 12/26/13!

Sector11 wrote:
mrpeachy wrote:

here are a couple of v9000 displays
nowplus8.jpg

Do you still have this layout available?

here is that setup as a seperate template
/home/benjamin/Dropbox/Public/nowplus8.lua.tar.gz

Ummmm just a suggestion (not weather related): update "The Ultimate LUA Background Script: 'draw_bg.lua' to include the draw outline function.

I'd use it ... I actively push/advertise/recommend that script all the time!
It's the ONLY one I use!

i could certainly do that
post it in a bit

and when i get some time ill work on adding some conversions  and add some more data options to the list

Last edited by mrpeachy (2012-01-23 18:40:26)

Offline

#278 2012-01-23 18:44:57

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

Re: weather in conky (LUA scripts) updated 12/26/13!

I'm on my way out ... but want to show that ... this is working!

It's a bitch to format for spacing ... first I use pure text with max values the same as I do with all conkys and then I add stuff.

mrprachy your idea of

abc= xxx
def= yy

blah blah,y=abc,blah, blah
blah blah,y=abc+def,blah, blah

is a just peachy!!

I'm using it to the fullest believe me....
In Progress II (slow typing + learning = speed{sloth})
d45068171309875.jpg


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

Offline

#279 2012-01-23 18:52:02

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

Re: weather in conky (LUA scripts) updated 12/26/13!

mrpeachy wrote:

here is that setup as a seperate template
/home/benjamin/Dropbox/Public/nowplus8.lua.tar.gz

.. but I don't have access to your HDD.  lol lol

part of the reason I was slow, I made a text file: HowTo_v9000_weather_in_Conky.txt.tar.gz


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

Offline

#280 2012-01-23 19:27:30

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

Re: weather in conky (LUA scripts) updated 12/26/13!

*cough* http://dl.dropbox.com/u/19008369/nowplus8.lua.tar.gz *cough*

the above might be a little more helpful big_smile

Offline

#281 2012-01-23 19:39:51

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

Re: weather in conky (LUA scripts) updated 12/26/13!

Sector11 wrote:

It's a bitch to format for spacing ... first I use pure text with max values the same as I do with all conkys and then I add stuff.

i am the first to acknowledge that this approach isnt as user friendly as typing stuff into conky

and that displaying text via lua has its limitations/complications when compared to the in-line way you can do it in the conkyrc

but once you get the hang of it, it isnt too bad and you get the increased flexibility that writing your own code can give you

you'll have to take a look at using the xout function next smile
it displays an output but also measures the length of the output and spits out the x value of the end of the output
you can then use this x value to place the next part of the line

Offline

#282 2012-01-23 22:39:35

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

Re: weather in conky (LUA scripts) updated 12/26/13!

mrpeachy wrote:

*cough* http://dl.dropbox.com/u/19008369/nowplus8.lua.tar.gz *cough*

the above might be a little more helpful big_smile

Yup, that certainly did it.  wink

mrpeachy wrote:
Sector11 wrote:

It's a bitch to format for spacing ... first I use pure text with max values the same as I do with all conkys and then I add stuff.

i am the first to acknowledge that this approach isnt as user friendly as typing stuff into conky

To quote a friend of mine:

Sector11 wrote:

For the first time since I have met LUA it's actually making "some sense" I'm a million miles away from writing one, but this venture with the template has cleared some of the dense fog.

... and another friend:

Sector11 wrote:

I'm on my way out ... but want to show that ... this is working!

It may not be as easy ... but for the first time since Sector11 met LUA things seem to be working.

Don't go popping my bubble!  I type slow, I'm in sloth-learn mode, I did the txt file, if I could type 45 words a minute without

STEP I - looking at the keyboard, monitor, keyboard, correct-spelling, monitor
STEP II - repeat until finished

and knew LUA, that t9002.conky would have been finished. 

I'm enjoying going slow ... for once. cool

mrpeachy wrote:

and that displaying text via lua has its limitations/complications when compared to the in-line way you can do it in the conkyrc

but once you get the hang of it, it isnt too bad and you get the increased flexibility that writing your own code can give you

There is one HUMONGOUS PLUS - everything is placed to the "pixel" with x-y co-ordinates.

The size of the font does not affect spacing, no use of ${voffset xx} or ${voffset -xx} to mess up the window size; that's a big Oops! with a regular conky.
146ef3171332916.jpg Like I said HUGE PLUS!

out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=14,x=10,y=datay+(dataadd*8),txt="Visibility:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=14,x=158,y=datay+(dataadd*8),txt=now["visibility"]})

out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=9,x=10,y=datay+(dataadd*9),txt="Visibility:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=9,x=158,y=datay+(dataadd*9),txt=now["visibility"]})

out({c=0xFAFAEC,a=1,f="Zekton",fs=18,x=10,y=datay+(dataadd*11),txt="Visibility:"})
   out({c=0x48D1CC,a=1,f="Zekton",fs=18,x=158,y=datay+(dataadd*11),txt=now["visibility"]})

Don't sell yourself short! (As my mentor told me just recently) With The v9000 HowTo and the HowTo use LUA in conky you are giving anyone that is paying attention a look at what they say conky v.2.0.0 might look like.  AND If I can understand it and edit it you are definitely walking right down the middle of a very narrow path. {my opinion}

mrpeachy wrote:

you'll have to take a look at using the xout function next smile
it displays an output but also measures the length of the output and spits out the x value of the end of the output
you can then use this x value to place the next part of the line

Oh I plan on it, in fact my next little experiment is to add a conky command to this t9002 package and see if it works.

re: xout - Too bad it can't be an "xin" and grab the beginning bit and output that, eliminating the rest ... great way to round off 1011.8 to "1011"  That's another story.  big_smile


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

Offline

#283 2012-01-24 02:11:13

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

Re: weather in conky (LUA scripts) updated 12/26/13!

i just realised that i have my moon fonts in the wrong order

im suing this table to convert the moon phase text to the character for the moon font
but it should be a new moon tonight and im getting the full moon symbol...also my waxing crescents are waning gibbouses!

expect a significant update in the near future smile

Last edited by mrpeachy (2012-01-24 02:12:09)

Offline

#284 2012-01-24 17:51:02

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

Re: weather in conky (LUA scripts) updated 12/26/13!

mrpeachy wrote:

expect a significant update in the near future smile

lol I hate you!!!! lol
Just when things go well for me.  {sigh}
Does this mean the

txt=moon_phase[1]

is wrong too?
It says NEW - and I fought the urge to howl last night.

Anyway this is it - FINISHED! but waiting for the update
YES!!!!  Rain wonderful cooling rain ...
05d8b3171443448.jpg

... short lived ... this morning, obviously someone is lying to me / us.
we are suppose to be having thunderstorms now, not SUNNY again!
e894c1171443454.jpg

~/Conky/t9000/t_9002.conky

## To use #! in a conky use: ${exec echo '#!'}
## killall conky && conky -c ~/Conky/t9000/t_9002.conky &
##
## The latest script is a lua only weather script. aka: v9000
## http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/
##
## the file:
## http://dl.dropbox.com/u/19008369/weatheragain9000.lua.tar.gz
##
## mrppeachys LUA Tutorial
## http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
##
##
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes

# 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

own_window_type normal
own_window_transparent yes #no
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_colour black
own_window_class v9000 t9002
own_window_title v9000 t9001

### 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
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 150

minimum_size 190 920     ## width, height
maximum_width 190       ## width, usually a good idea to equal minimum width

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

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

# 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 DAA520 #Goldenrod  FFFFF0 #Ivory
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 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 6000

# 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  ###########################################################
## Above and After TEXT - requires a composite manager or it blinks.
##
 lua_load ~/wea_conky/draw_bg.lua
## TEXT
## ${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}
##
##
## OR Both above TEXT (No composite manager required - no blinking!)
##
## lua_load ~/wea_conky/draw_bg.lua
## lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
## TEXT
##
#######################################################  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

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

lua_load ~/Conky/t9000/t9000.lua
lua_draw_hook_pre weather
lua_load ~/Conky/t9000/t9002_template.lua

TEXT
${lua conky_draw_bg 15 0 0 0 0 0x000000 0.7}

~/Conky/t9000/t9002_template.lua - this should work with the new updated v9000 right mrpeachy {pleading} ... I have two others under development - forizintal and once for my (thin vertical conky on the right)

--[[
 The latest script is a lua only weather script. aka: v9000
 http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/

 the file:
 http://dl.dropbox.com/u/19008369/weatheragain9000.lua.tar.gz

 mrppeachys LUA Tutorial
 http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="Anonymous Pro:bold"--font must be in quotes
default_font_size=11
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
out({c=0x00BFFF,a=1,f="Anonymous Pro:bold",fs=11,x=10,y=15,txt=now["date"].." "..now["month_short"].." "..now["year"]..": Fetched @ "..now["time"]})
image({x=20,y=20,h=40,w=40,file=now["weather_icon"]})
-- Temp / FeelsLike & CONDITIONS TEXT
out({c=0x48D1CC,a=1,f="Digital-7",fs=50,x=80,y=60,txt=now["temp"]})
out({c=0x00BFFF,a=1,f="Digital-7",fs=50,x=140,y=60,txt=now["feels_like"]})
out({c=0xA4FFA4,a=1,f="Anonymous Pro:bold",fs=11,x=81,y=72,txt="Temp          WC · HI"})

out({c=0x48D1CC,a=1,f="Zekton",fs=18,x=10,y=94,txt=now["conditions"]})

-- data titles
--    data output 
datay=110   -- y=datay or
dataadd=15   -- y=datay+(dataadd*1) use 1 or more

out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=10,y=datay,txt="Wind Chill:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=70,y=datay,txt=now["wind_chill"].."°"})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=100,y=datay,txt="Heat Index:"})
   out({c=0xFF8C00,a=1,f="Anonymous Pro:bold",fs=11,x=165,y=datay,txt=now["heat_index"].."°"})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=10,y=datay+(dataadd*1),txt="Today's Hi·Lo:"})
   out({c=0xFF8C00,a=1,f="Anonymous Pro:bold",fs=11,x=100,y=datay+(dataadd*1),txt=high_temp[1].."°"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=140,y=datay+(dataadd*1),txt=low_temp[1].."°"})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=10,y=datay+(dataadd*2),txt="Wind:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=60,y=datay+(dataadd*2),txt=now["wind_mph"]})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=110,y=datay+(dataadd*2),txt=now["wind_nesw"]})
   out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=140,y=datay+(dataadd*2),txt="@"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=165,y=datay+(dataadd*2),txt=now["wind_deg"].."°"})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=10,y=datay+(dataadd*3),txt="Hum:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=60,y=datay+(dataadd*3),txt=now["humidity"].."°"})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=100,y=datay+(dataadd*3),txt="Dew Point:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=165,y=datay+(dataadd*3),txt=now["dew_point"].."°"})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=10,y=datay+(dataadd*4),txt="Bar:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=60,y=datay+(dataadd*4),txt=now["pressure"]})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=10,y=datay+(dataadd*5),txt="Ceil:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=60,y=datay+(dataadd*5),txt=now["ceiling"]})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=110,y=datay+(dataadd*5),txt="Vis:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=145,y=datay+(dataadd*5),txt=now["visibility"]})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=10,y=datay+(dataadd*6),txt="Precip:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=60,y=datay+(dataadd*6),txt=precipitation[1].."%"})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=110,y=datay+(dataadd*6),txt="Cloud:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=150,y=datay+(dataadd*6),txt=cloud_cover[1].."%"})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=10,y=datay+(dataadd*7),txt="UV:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=60,y=datay+(dataadd*7),txt=uv_index_num[1]})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=110,y=datay+(dataadd*7),txt=uv_index_txt[1]})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=18,y=datay+(dataadd*8),txt="Sun  Rise:"})
   out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=80,y=datay+(dataadd*8),txt=sun_rise_time[1]})
out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=115,y=datay+(dataadd*8),txt="Set:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=145,y=datay+(dataadd*8),txt=sun_set_time[1]})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=10,y=datay+(dataadd*9),txt="Moon  Rise:"})
   out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=80,y=datay+(dataadd*9),txt=moon_rise_time[1]})
out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=115,y=datay+(dataadd*9),txt="Set:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=145,y=datay+(dataadd*9),txt=moon_set_time[1]})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=10,y=datay+(dataadd*10),txt="Phase:"})
   out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=55,y=datay+(dataadd*10),txt=moon_phase[1]})

-- 3 hour output
out({c=0x00BFFF,a=1,f="Anonymous Pro:bold",fs=12,x=15,y=280,txt="Next 3 Hours"})
-- 1st hour
out({c=0xA4FFA4,x=20,y=295,txt=now["fc_hour1_time"].."  "..now["fc_hour1_ampm"]})
image({w=30,h=30,x=20,y=300,file=now["fc_hour1_wicon"]}) -- good
out({x=25,y=345,txt=now["fc_hour1_temp"] .."°"})
-- 2nd hour
out({c=0xA4FFA4,x=80,y=295,txt=now["fc_hour2_time"].."  "..now["fc_hour2_ampm"]})
image({w=30,h=30,x=80,y=300,file=now["fc_hour2_wicon"]}) -- good
out({x=85,y=345,txt=now["fc_hour2_temp"] .."°"})
-- 3rd hour
out({c=0xA4FFA4,x=140,y=295,txt=now["fc_hour3_time"].."  "..now["fc_hour3_ampm"]})
image({w=30,h=30,x=140,y=300,file=now["fc_hour3_wicon"]}) -- good
out({x=145,y=345,txt=now["fc_hour3_temp"] .."°"})

--start or weather forecast table section
--set start forecast day
start_day=1
--set total forecast days you want to display
number_of_days=10
topy=370
gapy=115 -- topy+(gapy*1)
--set coordinates for top lef corners for each repeat
top_left_x_coordinate[1],top_left_y_coordinate[1]=15,topy
   top_left_x_coordinate[2],top_left_y_coordinate[2]=120,topy
top_left_x_coordinate[3],top_left_y_coordinate[3]=15,topy+(gapy*1)
   top_left_x_coordinate[4],top_left_y_coordinate[4]=120,topy+(gapy*1)
top_left_x_coordinate[5],top_left_y_coordinate[5]=15,topy+(gapy*2)
   top_left_x_coordinate[6],top_left_y_coordinate[6]=120,topy+(gapy*2)
top_left_x_coordinate[7],top_left_y_coordinate[7]=15,topy+(gapy*3)
   top_left_x_coordinate[8],top_left_y_coordinate[8]=120,topy+(gapy*3)
top_left_x_coordinate[9],top_left_y_coordinate[9]=15,topy+(gapy*4)
   top_left_x_coordinate[10],top_left_y_coordinate[10]=120,topy+(gapy*4)
--########################################################################################
for i=start_day,number_of_days-(start_day-1) do --start of day repeat, do not edit #######
tlx=top_left_x_coordinate[i] --sets top left x position for each repeat ##################
tly=top_left_y_coordinate[i] --sets top left y position for each repeat ##################
--########################################################################################
out({c=0xA4FFA4,a=1,f="Anonymous Pro:bold",fs=11,x=tlx,y=tly,txt=forecast_day_short[i].."  "..forecast_date[i].."  "..forecast_month_short[i]})
image({x=tlx,y=tly+5,h=30,w=30,file=weather_icon[i]})
out({c=0xFF8C00,a=1,f="Anonymous Pro:bold",fs=11,x=tlx+35,y=tly+15,txt=high_temp[i].."°"})
out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=tlx+35,y=tly+30,txt=low_temp[i].."°"})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=tlx,y=tly+50,txt=conditions_short[i]})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=tlx,y=tly+65,txt="P: "..precipitation[i].."%"})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=tlx,y=tly+80,txt="H: "..humidity[i].."%"})
out({c=0xFAFAEC,a=1,f="Anonymous Pro:bold",fs=11,x=tlx,y=tly+95,txt="S: "..sun_rise_time[i]})
out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=11,x=tlx+50,y=tly+95,txt=sun_set_time[i]})
--########################################################################################
end--of forecast repeat section ##########################################################
--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################

Last edited by Sector11 (2012-01-24 23:54:54)


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

Offline

#285 2012-01-24 19:07:38

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

Re: weather in conky (LUA scripts) updated 12/26/13!

@ sector 11
yes i can guarantee compatibility of all current templates with the update!

only the moon font is wrong, the phase type is direct from the site
i just have the wrong characters encoded for each phase

so im going to fix the moon fonts

there will be some additional data options (the conversions as mentioned in posts above)

and the implementation of the translate features controlled by a setting whether you want translations or not

Offline

#286 2012-01-24 22:30:58

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

Re: weather in conky (LUA scripts) updated 12/26/13!

mrpeachy wrote:

@ sector 11
yes i can guarantee compatibility of all current templates with the update!

Music to my ears these words from a master!


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

Offline

#287 2012-01-24 22:38:29

gmonti
#! CrunchBanger
From: Caracas, Venezuela
Registered: 2011-12-07
Posts: 108

Re: weather in conky (LUA scripts) updated 12/26/13!

Sector11 wrote:
mrpeachy wrote:

here is that setup as a seperate template
/home/benjamin/Dropbox/Public/nowplus8.lua.tar.gz

.. but I don't have access to your HDD.  lol lol

part of the reason I was slow, I made a text file: HowTo_v9000_weather_in_Conky.txt.tar.gz

Guaoooo!!! Sector11 that's a manual


Giuliano Monti Avellino
Debian/Squeeze
Gnome

Offline

#288 2012-01-24 22:38:44

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

Re: weather in conky (LUA scripts) updated 12/26/13!

http://dl.dropbox.com/u/19008369/v9000.tar.gz
so here is the link

additional data options for current weather

now["time_num"] --> weather update time only
now["time_ampm"] --> weather update AM or PM
now["time_ampm_lc"] --> weather update am or pm
now["wind_gusts_km"] --> number followed by wind_km_unit eg 5 mph
now["wind_gusts_km_caps"] --> number followed by wind_kn_unit eg 5 MPH
now["wind_gusts_kts"] --> number followed by wind_kts_unit eg 5 kts
now["wind_gusts_kts_caps"] --> number followed by wind_kts_unit eg 5 KTS
now["wind_km"] --> number followed by wind_km_unit eg 5 mph
now["wind_km_caps"] --> number followed by wind_km_unit eg 5 MPH
now["wind_kts"] --> number followed by wind_kts_unit eg 5 kts
now["wind_kts_caps"] --> number followed by wind_kts_unit eg 5 KTS
now["pressure_mb"] --> pressure in millibars/hectoPascals, number only

changes in data options

now["wind_deg"] has its following unit set in the settings in case of NA

changes in settings

--do you want the script to use translation tables?
--set 1 if you want to translate, 0 if not.
--the translation tables are located at the bottom of the script in  function called "translate_tables"
--these tables are in addition to the con_short table which can be used to translate weather conditions and data options units settings 
local translate=0

also units_gap has been removed, as has wind_gusts_unit
instead:

--some weather data options need to come with their own units attached as they can be NA on occasion
--set here what you want to have for units, or set "" for nothing
--include preceeding spaces if any for formatting
local visibility_unit=" mi"
local wind_mph_unit=" mph"
local wind_km_unit=" kmh"
local wind_kts_unit=" kts"
local ceiling_unit=" ft"
local wind_degrees_unit="°"

also added a setting for decimals for conversions

--the script is capable of converting between several unit types
--set how many decimal places you want the conversions to show
default_decimal_places=1--dont localize

Last edited by mrpeachy (2012-01-25 00:29:54)

Offline

#289 2012-01-24 22:43:53

gmonti
#! CrunchBanger
From: Caracas, Venezuela
Registered: 2011-12-07
Posts: 108

Re: weather in conky (LUA scripts) updated 12/26/13!

Ahhhhh....
Definitely i got lost in this thread. Too intensive for me.

Giuliano


Giuliano Monti Avellino
Debian/Squeeze
Gnome

Offline

#290 2012-01-24 22:44:34

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

Re: weather in conky (LUA scripts) updated 12/26/13!

@ sector11
i was going to grab your 9002 template so i could test it
but you posted your conkyrc twice!

Offline

#291 2012-01-24 23:47:58

gmonti
#! CrunchBanger
From: Caracas, Venezuela
Registered: 2011-12-07
Posts: 108

Re: weather in conky (LUA scripts) updated 12/26/13!

Sector11 wrote:
mrpeachy wrote:

expect a significant update in the near future smile

lol I hate you!!!! lol
Just when things go well for me.  {sigh}
Does this mean the

txt=moon_phase[1]

is wrong too?
It says NEW - and I fought the urge to howl last night.

Anyway this is it - FINISHED! but waiting for the update
YES!!!!  Rain wonderful cooling rain ...
05d8b3171443448.jpg

... short lived ... this morning, obviously someone is lying to me / us.
we are suppose to be having thunderstorms now, not SUNNY again!
e894c1171443454.jpg

~/Conky/t9000/t_9002.conky

## To use #! in a conky use: ${exec echo '#!'}
## killall conky && conky -c ~/Conky/t9000/t_9002.conky &
##
## The latest script is a lua only weather script. aka: v9000
## http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/
##
## the file:
## http://dl.dropbox.com/u/19008369/weatheragain9000.lua.tar.gz
##
## mrppeachys LUA Tutorial
## http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
##
##
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes

# 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

own_window_type normal
own_window_transparent yes #no
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_colour black
own_window_class v9000 t9002
own_window_title v9000 t9001

### 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
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 150

minimum_size 190 920     ## width, height
maximum_width 190       ## width, usually a good idea to equal minimum width

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

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

# 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 DAA520 #Goldenrod  FFFFF0 #Ivory
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 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 6000

# 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  ###########################################################
## Above and After TEXT - requires a composite manager or it blinks.
##
 lua_load ~/wea_conky/draw_bg.lua
## TEXT
## ${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}
##
##
## OR Both above TEXT (No composite manager required - no blinking!)
##
## lua_load ~/wea_conky/draw_bg.lua
## lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
## TEXT
##
#######################################################  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

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

lua_load ~/Conky/t9000/t9000.lua
lua_draw_hook_pre weather
lua_load ~/Conky/t9000/t9002_template.lua

TEXT
${lua conky_draw_bg 15 0 0 0 0 0x000000 0.7}

~/Conky/t9000/t9002_template.lua - this should work with the new updated v9000 right mrpeachy {pleading} ... I have two others under development - forizintal and once for my (thin vertical conky on the right)

## To use #! in a conky use: ${exec echo '#!'}
## killall conky && conky -c ~/Conky/t9000/t_9002.conky &
##
## The latest script is a lua only weather script. aka: v9000
## http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/
##
## the file:
## http://dl.dropbox.com/u/19008369/weatheragain9000.lua.tar.gz
##
## mrppeachys LUA Tutorial
## http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
##
##
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes

# 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

own_window_type normal
own_window_transparent yes #no
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_colour black
own_window_class v9000 t9002
own_window_title v9000 t9001

### 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
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 150

minimum_size 190 920     ## width, height
maximum_width 190       ## width, usually a good idea to equal minimum width

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

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

# 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 DAA520 #Goldenrod  FFFFF0 #Ivory
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 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 6000

# 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  ###########################################################
## Above and After TEXT - requires a composite manager or it blinks.
##
 lua_load ~/wea_conky/draw_bg.lua
## TEXT
## ${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}
##
##
## OR Both above TEXT (No composite manager required - no blinking!)
##
## lua_load ~/wea_conky/draw_bg.lua
## lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
## TEXT
##
#######################################################  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

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

lua_load ~/Conky/t9000/t9000.lua
lua_draw_hook_pre weather
lua_load ~/Conky/t9000/t9002_template.lua

TEXT
${lua conky_draw_bg 15 0 0 0 0 0x000000 0.7}

Sector11 I think there is something wrong here. What it is the difference with the two scripts???


Giuliano Monti Avellino
Debian/Squeeze
Gnome

Offline

#292 2012-01-24 23:49:19

gmonti
#! CrunchBanger
From: Caracas, Venezuela
Registered: 2011-12-07
Posts: 108

Re: weather in conky (LUA scripts) updated 12/26/13!

Sorry Mrpeachy I didn't notice your post....


Giuliano Monti Avellino
Debian/Squeeze
Gnome

Offline

#293 2012-01-24 23:49:49

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

Re: weather in conky (LUA scripts) updated 12/26/13!

gmonti wrote:
Sector11 wrote:
mrpeachy wrote:

here is that setup as a seperate template
/home/benjamin/Dropbox/Public/nowplus8.lua.tar.gz

.. but I don't have access to your HDD.  lol lol

part of the reason I was slow, I made a text file: HowTo_v9000_weather_in_Conky.txt.tar.gz

Guaoooo!!! Sector11 that's a manual

That is mrpeachys posts as a text file, NOT my work ... other then putting it in a txt file.


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

Offline

#294 2012-01-24 23:53:11

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

Re: weather in conky (LUA scripts) updated 12/26/13!

mrpeachy wrote:

@ sector11
i was going to grab your 9002 template so i could test it
but you posted your conkyrc twice!

DOH!!!!!!!!!  facepalm .... my turn for Oopsie!

Will correct in a sec.

Conky and template now available here!  BLUSH!

Last edited by Sector11 (2012-01-24 23:57:07)


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

Offline

#295 2012-01-24 23:58:05

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

Re: weather in conky (LUA scripts) updated 12/26/13!

gmonti wrote:

Sector11 I think there is something wrong here. What it is the difference with the two scripts???

Nothing - they are the same --- see one post above ... corrected.


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

Offline

#296 2012-01-25 00:26:08

gmonti
#! CrunchBanger
From: Caracas, Venezuela
Registered: 2011-12-07
Posts: 108

Re: weather in conky (LUA scripts) updated 12/26/13!

MrPeachy and every body, if you will use the translation from v9000translate.lua (which is fine), in this last script you posted, you will need to change where say: (line 90/91
--enter translations for uv index text
uvtext={

to

--enter translations for uv index text
uvindextext={

otherwise you will get this error:
Conky: llua_do_call: function conky_weather execution failed: /home/youruser/.conky/v9000/v9000.lua:457: attempt to index global 'uvindextext' (a nil value)

Last edited by gmonti (2012-01-25 00:26:45)


Giuliano Monti Avellino
Debian/Squeeze
Gnome

Offline

#297 2012-01-25 00:26:30

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

Re: weather in conky (LUA scripts) updated 12/26/13!

@ Sector11, just ran your template with the new update and apart from running off the bottom of my scrren, everything was running fine, no errors

one thing
if you have already got yor hands on the update from my post above, check in v9000.lua to make sure
the setting testing is set to 0
should be around line 54

local testing=0--this setting is for script testing, if not in testing set to 0

ive set it to 0 and re-compressed the archive in the link

Offline

#298 2012-01-25 00:35:44

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

Re: weather in conky (LUA scripts) updated 12/26/13!

@ gmonti

good spotting smile

i would direct anyone who wants to try v9000, including those who want to use the translation features, to the new archive

http://dl.dropbox.com/u/19008369/v9000.tar.gz

the main script has all of the translation features of v9000translate.lua
and should give no errors when using the translations

the additional translation tables are at the bottom of the script in their own function, otherwise the setup portion of the script was getting too big

see above about the setting to turn translations on and off

i wont be "maintaining" or updating the v9000translate.lua script, only the files in the v9000 archive

if youve already setup your tables in v9000translate then you can just copy the table contents over , the info required is the same

Offline

#299 2012-01-25 03:13:49

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

Re: weather in conky (LUA scripts) updated 12/26/13!

Just grabbed the new v9000 and the v9000_transtlate, will look at them in a bit.

Meantime here's my second conky using v9000:
82479b171505954.jpg
That's it on the right ...

~/Conky/OB_V_right

# To use #! in a conky use: ${exec echo '#!'}
# killall conky && conky -c ~/Conky/OB_V_right &
# WARNING: Change name and passwords on e-mail code if posting!!

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override #normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# own_window_colour brown
own_window_class Conky
own_window_title Vert_Right

# 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 200

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

gap_x 7 # 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

# 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 9ACD32 #YellowGreen
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 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 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders no #yes
default_graph_size 15 40
#####################################################  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 1028

# 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  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
 lua_load ~/Conky/LUA/draw_bg.lua
#TEXT
#${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}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
#lua_load ~/Conky/LUA/draw_bg.lua
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
#
## Calling the weather script
#
lua_load ~/Conky/LUA/t9000.lua
lua_draw_hook_pre weather
lua_load ~/Conky/LUA/t9003_V_template.lua
#
#starts the lua weather data gathering function, call once at top of conkyrc
##
#######################################################  End LUA Settings  ###
# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU usage go UP!
update_interval 1

TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}${color0}Desk ${color7}${desktop}${color}
${color3}${hr}${color}
${color0}Email${color}
C ${color7}${if_match ${execi 180 conkyEmail --servername=XXXXX --servertype=POP --port=XXXXX --username=XXXXX --password=XXXXX}>99}${execi 180 conkyEmail --servername=XXXXX --servertype=POP --port=XXXXX --username=XXXXX --password=XXXXX}${else}\
${if_match ${execi 180 conkyEmail --servername=XXXXX --servertype=POP --port=XXXXX --username=XXXXX --password=XXXXX}>9}0${execi 180 conkyEmail --servername=XXXXX --servertype=POP --port=XXXXX --username=XXXXX --password=XXXXX}${else}\
${if_match ${execi 180 conkyEmail --servername=XXXXX --servertype=POP --port=XXXXX --username=XXXXX --password=XXXXX}>0}00${execi 180 conkyEmail --servername=XXXXX --servertype=POP --port=XXXXX --username=XXXXX --password=XXXXX}${else}\
${if_match ${execi 180 conkyEmail --servername=XXXXX --servertype=POP --port=XXXXX --username=XXXXX --password=XXXXX}==0}000\
${endif}${endif}${endif}${endif}${color}
S ${color7}${if_match ${execi 180 conkyEmail --servername=XXXXX --servertype=POP --port=XXXXX --username=XXXXX --password=XXXXX}>99}${execi 180 conkyEmail --servername=XXXXX --servertype=POP --port=XXXXX --username=XXXXX --password=XXXXX}${else}\
${if_match ${execi 180 conkyEmail --servername=XXXXX --servertype=POP --port=XXXXX --username=XXXXX --password=XXXXX}>9}0${execi 180 conkyEmail --servername=XXXXX --servertype=POP --port=XXXXX --username=XXXXX --password=XXXXX}${else}\
${if_match ${execi 180 conkyEmail --servername=XXXXX --servertype=POP --port=XXXXX --username=XXXXX --password=XXXXX}>0}00${execi 180 conkyEmail --servername=XXXXX --servertype=POP --port=XXXXX --username=XXXXX --password=XXXXX}${else}\
${if_match ${execi 180 conkyEmail --servername=XXXXX --servertype=POP --port=XXXXX --username=XXXXX --password=XXXXX}==0}000\
${endif}${endif}${endif}${endif}${color}
${color3}${hr}${color}
${color0}Bs As${color}


































${color3}${hr}${color}
${color0}HDD %
Usage${color}
/Root
 ${color7}${if_match ${fs_used_perc /} < 10}00${fs_used_perc /}\
${else}${if_match ${fs_used_perc /} < 100}0${fs_used_perc /}${color}\
${else}${color9}${fs_used_perc /}\
${endif}${endif}${color}
/S11
 ${color7}${if_match ${fs_used_perc /home} < 10}00${fs_used_perc /home}\
${else}${if_match ${fs_used_perc /home} < 100}0${fs_used_perc /home}\
${else}${color9}${fs_used_perc /home}\
${endif}${endif}${color}
M/5
 ${color7}${if_match ${fs_used_perc /media/5} < 10}00${fs_used_perc /media/5}\
${else}${if_match ${fs_used_perc /media/5} < 100}0${fs_used_perc /media/5}\
${else}${color9}${fs_used_perc /media/5}${color}\
${endif}${endif}${color}
M/6
 ${color7}${if_match ${fs_used_perc /media/6} < 10}00${fs_used_perc /media/6}\
${else}${if_match ${fs_used_perc /media/6} < 100}0${fs_used_perc /media/6}\
${else}${color9}${fs_used_perc /media/6}\
${endif}${endif}${color}
${color3}${hr}${color}
${color0}I-Net${color}
UpSpd
${color7}${upspeedf eth0}${color}
${upspeedgraph eth0 FF0000 FFFF00}
Total
${color7}${totalup eth0}${color}
DnSpd
${color7}${downspeedf eth0}${color}
${downspeedgraph eth0 FFFF00 FF0000}
Total
${color7}${totaldown eth0}${color}
${color3}${hr}${color}
${color0}Temps${color}
CPU
 ${color7}${hwmon 1 temp 1}${color}°C
Mobo
 ${color7}${hwmon 2 temp 1}${color}°C
SDA
 ${color7}${execpi 15 hddtemp -n /dev/sda}${color}°C
GPU
 ${if_match ${nvidia temp} < 50}${color7}${nvidia temp}\
${else}${if_match ${nvidia temp} < 55}${color8}${nvidia temp}\
${else}${color9}${nvidia temp}\
${endif}${endif}${color}°C
${color3}${hr}${color}
${color0}Usage${color}
CPU %
 ${color7}${if_match ${cpu cpu0} < 10}00${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100}0${cpu cpu0}\
${else}${color9}${cpu cpu0}\
${endif}${endif}${color}
MEM %
 ${color7}${if_match ${memperc} < 10}00${memperc}\
${else}${if_match ${memperc} < 100}0${memperc}\
${else}${color9}${memperc}\
${endif}${endif}${color}
${color3}${hr}${color}

and t9003_V_template.lua

--[[
 The latest script is a lua only weather script. aka: v9000
 http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/

 the file:
 http://dl.dropbox.com/u/19008369/weatheragain9000.lua.tar.gz

 mrppeachys LUA Tutorial
 http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="Anonymous Pro"--font must be in quotes
default_font_size=11
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=20
default_image_height=20
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
datay=93
yplus=13 --datay+(yplus*1)
imgy=163
imgyy=39 -- imgy+(imgyy*1)

image({x=25,y=85,file=now["weather_icon"]})
out({c=0x9ACD32,a=1,x=5,y=datay,txt=now["temp"]})
out({c=0x00BFFF,a=1,x=5,y=datay+(yplus*1),txt=now["feels_like"]})
out({c=0xFAFAEC,a=1,x=5,y=datay+(yplus*2),txt="B"})
out({c=0x48D1CC,a=1,x=15,y=datay+(yplus*2),txt=now["pressure"]})
out({c=0xFAFAEC,a=1,x=5,y=datay+(yplus*3),txt="UV:"})
out({c=0x48D1CC,a=1,x=25,y=datay+(yplus*3),txt=uv_index_num[1]})
out({c=0x48D1CC,a=1,x=5,y=datay+(yplus*4),txt=uv_index_txt[1]})

out({c=0x9ACD32,a=1,x=5,y=datay+(yplus*5),txt=forecast_day_short[1]})
out({c=0x9ACD32,a=1,x=30,y=datay+(yplus*5),txt=forecast_date[1]})
image({x=25,y=imgy,file=weather_icon[1]})
out({c=0xFF8C00,a=1,x=5,y=datay+(yplus*6),txt=high_temp[1]})
out({c=0x00BFFF,a=1,x=5,y=datay+(yplus*7),txt=low_temp[1]})

out({c=0x9ACD32,a=1,x=5,y=datay+(yplus*8),txt=forecast_day_short[2]})
out({c=0x9ACD32,a=1,x=30,y=datay+(yplus*8),txt=forecast_date[2]})
image({x=25,y=imgy+(imgyy*1),file=weather_icon[2]})
out({c=0xFF8C00,a=1,x=5,y=datay+(yplus*9),txt=high_temp[2]})
out({c=0x00BFFF,a=1,x=5,y=datay+(yplus*10),txt=low_temp[2]})

out({c=0x9ACD32,a=1,x=5,y=datay+(yplus*11),txt=forecast_day_short[3]})
out({c=0x9ACD32,a=1,x=30,y=datay+(yplus*11),txt=forecast_date[3]})
image({x=25,y=imgy+(imgyy*2),file=weather_icon[3]})
out({c=0xFF8C00,a=1,x=5,y=datay+(yplus*12),txt=high_temp[3]})
out({c=0x00BFFF,a=1,x=5,y=datay+(yplus*13),txt=low_temp[3]})

out({c=0x9ACD32,a=1,x=5,y=datay+(yplus*14),txt=forecast_day_short[4]})
out({c=0x9ACD32,a=1,x=30,y=datay+(yplus*14),txt=forecast_date[4]})
image({x=25,y=imgy+(imgyy*3),file=weather_icon[4]})
out({c=0xFF8C00,a=1,x=5,y=datay+(yplus*15),txt=high_temp[4]})
out({c=0x00BFFF,a=1,x=5,y=datay+(yplus*16),txt=low_temp[4]})

out({c=0x9ACD32,a=1,x=5,y=datay+(yplus*17),txt=forecast_day_short[5]})
out({c=0x9ACD32,a=1,x=30,y=datay+(yplus*17),txt=forecast_date[5]})
image({x=25,y=imgy+(imgyy*4),file=weather_icon[5]})
out({c=0xFF8C00,a=1,x=5,y=datay+(yplus*18),txt=high_temp[5]})
out({c=0x00BFFF,a=1,x=5,y=datay+(yplus*19),txt=low_temp[5]})

out({c=0x9ACD32,a=1,x=5,y=datay+(yplus*20),txt=forecast_day_short[6]})
out({c=0x9ACD32,a=1,x=30,y=datay+(yplus*20),txt=forecast_date[6]})
image({x=25,y=imgy+(imgyy*5),file=weather_icon[6]})
out({c=0xFF8C00,a=1,x=5,y=datay+(yplus*21),txt=high_temp[6]})
out({c=0x00BFFF,a=1,x=5,y=datay+(yplus*22),txt=low_temp[6]})

out({c=0x9ACD32,a=1,x=5,y=datay+(yplus*23),txt=forecast_day_short[7]})
out({c=0x9ACD32,a=1,x=30,y=datay+(yplus*23),txt=forecast_date[7]})
image({x=25,y=imgy+(imgyy*6),file=weather_icon[7]})
out({c=0xFF8C00,a=1,x=5,y=datay+(yplus*24),txt=high_temp[7]})
out({c=0x00BFFF,a=1,x=5,y=datay+(yplus*25),txt=low_temp[7]})

out({c=0x9ACD32,a=1,x=5,y=datay+(yplus*26),txt=forecast_day_short[8]})
out({c=0x9ACD32,a=1,x=30,y=datay+(yplus*26),txt=forecast_date[8]})
image({x=25,y=imgy+(imgyy*7),file=weather_icon[8]})
out({c=0xFF8C00,a=1,x=5,y=datay+(yplus*27),txt=high_temp[8]})
out({c=0x00BFFF,a=1,x=5,y=datay+(yplus*28),txt=low_temp[8]})

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

Lets hope I got it right this time.

NOTE TO mrpeachy: I haven't got that "repeat" part down yet, but when I do this will change.  Next a horizontal conky!  How wide is your screen?  I'm 1280


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

Offline

Be excellent to each other!

#300 2012-01-25 03:20:31

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

Re: weather in conky (LUA scripts) updated 12/26/13!

mrpeachy wrote:

@ Sector11, just ran your template with the new update and apart from running off the bottom of my scrren, everything was running fine, no errors

one thing
if you have already got yor hands on the update from my post above, check in v9000.lua to make sure
the setting testing is set to 0
should be around line 54

local testing=0--this setting is for script testing, if not in testing set to 0

ive set it to 0 and re-compressed the archive in the link

I just grabbed it so it's at 0 - I'll have to add my info to it and change it to "template mode" - silly me, I had not read enough at the time to realize its a switch.  big_smile


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

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo