SEARCH

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

You are not logged in.

#1 2011-11-16 17:37:44

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

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

Last edited by mrpeachy (2014-01-06 21:47:55)

Offline

Help fund CrunchBang, donate to the project!

#2 2011-11-16 17:50:12

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

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

this post will hold the translation tables for different languages

GERMAN:
con_short table

con_short={--start of table, put entries below in form eg: ["Thunderstorm"]="T.Strm",
["AM Clouds/PM Sun"]="vormittags bewölkt/nachmittags sonnig",
["AM Rain/Snow Showers"]="vormittags Regen-/Schneeschauer",
["AM Showers"]="vormittags Regenschauer",
["AM Snow Showers/Wind"]="vormittags Schneeschauer/windig",
["AM Fog/PM Sun"]="vormittags Nebel/nachmittags Sonne",
["AM Drizzle"]="vormittags Nieselregen",
["PM Light Rain"]="nachmittags leichter Regen",
-- ["PM Drizzle"]
-- ["Drizzle Late"]
-- ["Early Drizzle"]
["Broken Clouds"]="überwiegend bewölkt",
["Drizzle"]="Nieselregen",
["Few Clouds"]="leichte Bewölkung",
["Few Showers"]="wenig Regenschauer",
["Few Snow Showers"]="wenig Schneeschauer",
["Freezing Rain"]="überfrierender Regen",
["Freezing Drizzle"]="überfrierender Nieselregen",
["Partly Cloudy"]="teilweise bewölkt",
["Partly Cloudy/Wind"]="teilweise bewölkt/windig",
["Haze"]="schwül/neblig",
["Heavy Rain"]="starker Regen",
["Heavy Snow"]="starker Schneefall",
["Hot"]="sehr warm",
["Isolated Thunderstorms"]="vereinzelt Gewitter",
["Light Rain"]="leichter Regen",
["Light Rain Late"]="leichter Regen nachmittags",
["Light Rain/Wind"]="leichter Regen/windig",
["Light Snow"]="leichter Schneefall",
["Light Fog"]="leichter Nebel",
["Fog Late"]="dichter Nebel",
["Mixed Rain and Hail"]="verm. Regen und Hagel",
["Mixed Rain and Snow"]="verm. Regen und Schnee",
["Mixed Rain and Sleet"]="verm. Regen und Graupel",
["Mixed Precipitation"]="verschiedener Niederschlag",
["Moderate Fog"]="mäßig neblig",
["Moderate Rain"]="mäßiger Regen",
["Mostly Cloudy"]="meist bewölkt",
["Mostly Sunny"]="meist sonnig",
["Mostly Clear"]="meist klar",
["Rain/Snow"]="Schneeregen",
["Rain Showers"]="Regenschauer",
["Rain/Snow Showers"]="Regen-/Schneeschauer",
["Drifting Snow"]="Treibschnee",
["Scattered Thunderstorms"]="vereinzelt Gewitter",
["Scattered Clouds"]="gering bewölkt",
["Scattered Showers"]="vereinzelt leichter Regen",
["Snow Showers"]="Schneeschauer",
["Snow Showers Late"]="Schneeschauer nachmittags",
["Snow Flurries"]="Schneeaufwirbelung",
["Showers Early"]="leichter Regen",
["Clear"]="klar, heiter",
["Clear/Wind"]="klar/windig",
["Blustery"]="stürmisch",
["Cloudy"]="bewölkt",
["Overcast"]="zunehmend bedeckt",
["Showers"]="Schauer",
["Sprinkles"]="Sprühregen",
["Sunny"]="sonnig",
["Thunderstorm"]="Gewitter / Unwetter",
--["Thunderstorms/Wind"]="T.Storms/Wnd"
["Wind Early"]="früh oder am morgen windig",
["Wind"]="windig", 
}--this bracket closes the table

units

--NOTE ALSO EDIT THESE SETTINGS FOR TRANSLATION PURPOSES
local visibility_unit=" mi"
local wind_mph_unit=" mph"
local wind_km_unit=" km/h"
local wind_kts_unit=" kts"
local ceiling_unit=" ft"
local wind_degrees_unit="°"

other tables

--translate NESW text
neswtext={
S="S",
SSW="SSW",
SW="SW",
WSW="WSW",
W="W",
WNW="WNW",
NW="NW",
NNW="NNW",
N="N",
NNE="NNO",
NE="NO",
ENE="ONO",
E="O",
ESE="OSO",
SE="SO",
SSE="SSO",
}--end of  N E S W text table
--translate time suffix
tsuffix={
AM="AM",
PM="AM",
}--end of time suffix table
--enter translations for uv index text
uvindextext={
["Low"]="gering",
["Moderate"]="mittel",
["High"]="hoch",
["Very High"]="sehr hoch",--format is different because of the space in the text
["Extreme"]="extrem",
}--end of uv text table
--enter translations for moonpahse
moonphases={
["New"]="Neumond", -- Mond steht für uns unsichtbar am Taghimmel
["Waxing Crescent"]="zunehmende Sichel",  -- Mond ab Vormittag bis Abend zu sehen
["First Quarter"]="erstes Viertel (Halbmond)", -- Mond ist ab Mittags bis Mitternacht zu sehen
["Waxing Gibbous"]="zunehmender Mond", -- Mond ist ab Nachmittags bis nach Mitternacht zu sehen
["Full"]="Vollmond", -- Mond ist die ganze Nacht zu sehen
["Waning Gibbous"]="abnehmender Mond", -- Mond ist von vor Mitternacht bis zum Vormittag zu sehen
["Last Quarter"]="letztes Viertel (Halbmond)", -- Mond ist von Mitternacht bis zum Mittag zu sehen
["Waning Crescent"]="abnehmende Sichel", -- Mond ist vom Morgen bis Nachmittags zu sehen
}--end of moon phase table
--enter translations for FULL day names
daynames={
Monday="Montag",
Tuesday="Dienstag",
Wednesday="Mittwoch",
Thursday="Donnerstag",
Friday="Freitag",
Saturday="Samstag",
Sunday="Sonntag",
}--end day names table
--enter translations for SHORT day names
dayshort={
Monday="Mo",
Tuesday="Di",
Wednesday="Mi",
Thursday="Do",
Friday="Fr",
Saturday="Sa",
Sunday="So"
}--end short day names table
--enter translation for FULL month names
monthnames={
January="Januar",
February="Februar",
March="März",
April="April",
May="Mai",
June="Juni",
July="Juli",
August="August",
September="September",
October="Oktober",
November="November",
December="Dezember"
}--end of month name translations
--enter translations for SHORT month names
monthshort={
January="Jan",
February="Feb",
March="März",
April="April",
May="Mai",
June="Juni",
July="Juli",
August="Aug",
September="Sep",
October="Okt",
November="Nov",
December="Dez"
}--end of short month name translations
--enter some additional translations
additional={
NA="t_NA",
Unl="t_Unl"--for ceiling data option
}--end of additional translations
--END OF TRANSLATION TABLES

Last edited by mrpeachy (2012-10-20 19:22:44)

Offline

#3 2011-11-16 19:29:09

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

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

${lua weather day1.day}
Conditions: ${lua weather day1.con}${font ConkyWeather:size=30}${goto 170}${lua_parse weather font.day1}${font}
${voffset -30}High: ${lua weather day1.hih} F
Low: ${lua weather day1.low} F
${lua_parse weather image.day1 80 130 50 50}

Last edited by mrpeachy (2011-11-16 19:57:56)

Offline

#4 2011-11-16 19:47: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!

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

 ###  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 sticky,skip_pager
own_window_argb_visual yes
# own_window_argb_value 255
# own_window_colour brown
own_window_class Conky
own_window_title MrP's Thermometer v4

 # 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 640 500     ## width, height
maximum_width 640       ## width, usually a good idea to equal minimum width

gap_x 20       ### left &right
gap_y 0        ### up & down

### top_left, top_right, top_middle, bottom_left, bottom_right, bottom_middle
### middle_left, middle_middle, middle_right, or none
alignment middle_left
 ####################################################  End Window Settings  ###
 ###  Font Settings  ##########################################################
 # Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont dejavu sans mono: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 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 5
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 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  ###########################################################
lua_load ~/Conky/LUA/thermometer_v4.lua
 #######################################################  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 650 510 0x000000 0.5}
${lua conky_weather}${voffset 240}${goto 10}${font digitalk:size=18}${time %T}${font}

Offline

#5 2011-11-16 19:53:56

BoredOOMM
#! Junkie
From: 36.0718,-119.03519
Registered: 2011-06-19
Posts: 353

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

${lua weather day1.day}
Conditions: ${lua weather day1.con}${font ConkyWeather:size=30}${goto 170}${lua_parse weather font.day1}${font}
${voffset -30}High: ${lua weather day1.hih} F
Low: ${lua weather day1.low} F
${lua_parse weather image.day1 80 130 50 50}

Congratulations, you've figured out the sound of one hand clapping...

Offline

#6 2011-11-16 19:56:53

BoredOOMM
#! Junkie
From: 36.0718,-119.03519
Registered: 2011-06-19
Posts: 353

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


Congratulations, you've figured out the sound of one hand clapping...

Offline

#7 2011-11-16 20:02:05

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

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

Last edited by mrpeachy (2011-11-16 20:15:44)

Offline

#8 2011-11-16 20:16:09

BoredOOMM
#! Junkie
From: 36.0718,-119.03519
Registered: 2011-06-19
Posts: 353

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

Last edited by BoredOOMM (2011-11-16 20:16:46)


Congratulations, you've figured out the sound of one hand clapping...

Offline

#9 2011-11-16 20:54:56

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!

Conky: llua_do_call: function conky_weather execution failed: /home/sector11/Conky/LUA/thermometer_v4.lua:1013: error in function 'cairo_set_source_rgba'.
     argument #2 is 'nil'; 'number' expected.

Conky: llua_do_call: function conky_weather execution failed: /home/sector11/Conky/LUA/thermometer_v4.lua:1013: error in function 'cairo_set_source_rgba'.
     argument #2 is 'nil'; 'number' expected.

Offline

#10 2011-11-16 20:56:53

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!

Last edited by Sector11 (2011-11-16 23:32:53)

Offline

#11 2011-11-16 22:48:05

psyco430404
#! Die Hard
From: Las Vegas, Nevada
Registered: 2011-07-04
Posts: 804

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

dang these are some really nice scripts, very impressive smile good job


"'If fighting is to result in victory, then you must fight'...Sun Tzu said that and id say he knows a little more about fighting then you do pal."

- TF2 Soldier

Offline

#12 2011-11-16 23:41: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!

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

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

TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}blah blah blah

Offline

#13 2011-11-17 00:10:17

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

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

UV index: ${lua weather day1.uvn} (${lua weather day1.uvt})

Last edited by mrpeachy (2011-11-17 00:16:44)

Offline

#14 2011-11-17 00:49:26

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!

UV index: ${lua weather day1.uvn} (${lua weather day1.uvt})

Offline

#15 2011-11-17 01:16:39

BoredOOMM
#! Junkie
From: 36.0718,-119.03519
Registered: 2011-06-19
Posts: 353

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

@ Sector11

No Fog in your cities found.
Your conky has no images.

@ Mr Peachy

New error in 1307 script this PM


Conky: llua_do_call: function conky_weather execution failed: /home/bkberger/lua/forecast.lua:588: attempt to concatenate a nil value

-- line 588

Conky: Lua script '/home/bkberger/lua/forecast.lua' reloaded
Conky: Unable to load image '/home/bkberger/conky_intellicast/images/weathericons/32.png'

No 32.png and should be 85.png per website


New error


Congratulations, you've figured out the sound of one hand clapping...

Offline

#16 2011-11-17 01:52:06

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

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

those darn images are giving me a headache smile

im working on getting that aspect more dependable
will post some updated code soon

here is how i am getting on with naming the intellicast icons

wx_65=32--clear/sunny--mostly sunny
wx_66=30--partly cloudy
wx_67=26--cloudy
wx_68=32--clear/sunny
wx_69=28--mostly cloudy
wx_70=20--fog
wx_71=
wx_72=
wx_73=
wx_74=few/scattered snow showers
wx_75=
wx_76=
wx_77=
wx_78=windy day
wx_79=rain/snow showers, snow showers
wx_80=
wx_81=blowing snow
wx_82=rain, rain/wind
wx_83=
wx_84=thunderstorms
wx_85=sunny/clear day
wx_86=
wx_87=few showers/showers
wx_88=
wx_89=
wx_90=
wx_91=
wx_92=
wx_93=
wx_94=
wx_95=isolated thunderstorms day
wx_96=scattered thunderstorms day
wx_97=clear night
wx_98=partly cloudy night/broken clouds night/haze night
wx_99=early clouds=mostly cloudy 27night,28day
wx_100=
wx_101=
wx_102=
wx_103=overcast night
wx_104=
wx_105=
wx_106=
wx_107=heavy rain
wx_108=light snow night
wx_109=
wx_110=
wx_111=
wx_112=
wx_113=
wx_114=snow showers, night
wx_115=

Last edited by mrpeachy (2011-11-17 02:05:11)

Offline

#17 2011-11-17 02:32:10

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!

Offline

#18 2011-11-17 04:02:07

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

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

Offline

#19 2011-11-17 06:08:42

BoredOOMM
#! Junkie
From: 36.0718,-119.03519
Registered: 2011-06-19
Posts: 353

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

Last edited by BoredOOMM (2011-11-17 06:23:45)


Congratulations, you've figured out the sound of one hand clapping...

Offline

#20 2011-11-17 07:43:53

dlm955
#! CrunchBanger
From: Mansfield,Ohio USA
Registered: 2011-07-23
Posts: 128

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

Last edited by dlm955 (2011-11-17 18:10:46)


Give a man a truth and he will think for a day.
Teach a man to reason and he will think for a lifetime!

Offline

#21 2011-11-17 07:55: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!

thanks for the feedback!

i have completed my intellicast image to conkyforecast image translation
hopefully i got them right, or at least close... with some of those intellicast images it was difficult (without having seen them up on the site) to work out what they were smile

thanks to BoredOOMM for getting me the intellicast icons

@Sector11, what kind of cpu drain are you getting when you have the 10 day forecast up in conky?

@dlm955, hopefully when i get a couple of bugs figured out and post some new code, the problems that have been associated with images and weather font should go away!

hopefully when i'm done intellicast wont decide to redesign their website!

Last edited by mrpeachy (2011-11-17 07:58:09)

Offline

#22 2011-11-17 12:47:53

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!

Last edited by Sector11 (2011-11-17 12:48:35)

Offline

#23 2011-11-17 17:14:59

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 downloaded forecast.lua v5 and applied it to my 10 day forecast conky.  I notice a huge jump in CPU usage. Sitting idle is does not drop below 7% (from 1/2%) and have seen it climb to 25+ just doing simple things - right now - typing in IceWeasel I see 17-19%

Oh oh ... after typing that I did nothing - just watched --- 11/13% - will leave it run for a bit and see what happens.

WOW!!!  Jumped to 72% just saving the message.  sad

Terminal:

  13:33:07 ~
         $ conky -c ~/Conky/Forecast_v5.conky &
[1] 22281

  13:33:09 ~
         $ Conky: desktop window (1ff) is root window
Conky: window type - normal
Conky: drawing to created window (0x2400002)
Conky: drawing to double buffer
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 67478  100 67478    0     0  68178      0 --:--:-- --:--:-- --:--:--   98k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 67478  100 67478    0     0   101k      0 --:--:-- --:--:-- --:--:--  135k
Conky: llua_do_call: function conky_weatherdata execution failed: /home/sector11/Conky/LUA/forecast_5.lua:172: attempt to index local 'file' (a nil value)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 67478  100 67478    0     0  80899      0 --:--:-- --:--:-- --:--:--  100k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 67478  100 67478    0     0  84383      0 --:--:-- --:--:-- --:--:--  103k
Conky: llua_do_call: function conky_weatherdata execution failed: /home/sector11/Conky/LUA/forecast_5.lua:172: attempt to index local 'file' (a nil value)
         $ XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 17986 requests (17984 known processed) with 0 events remaining.

[1]+  Exit 1                  conky -c ~/Conky/Forecast_v5.conky

  13:34:43 ~
         $ conky -c ~/Conky/Forecast_v5.conky &
[1] 22333

  13:34:46 ~
         $ Conky: desktop window (1ff) is root window
Conky: window type - normal
Conky: drawing to created window (0x2400002)
Conky: drawing to double buffer
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 67478  100 67478    0     0  99417      0 --:--:-- --:--:-- --:--:--  128k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 67478  100 67478    0     0  84313      0 --:--:-- --:--:-- --:--:--  104k
Conky: llua_do_call: function conky_weatherdata execution failed: /home/sector11/Conky/LUA/forecast_5.lua:172: attempt to index local 'file' (a nil value)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 67478  100 67478    0     0  82963      0 --:--:-- --:--:-- --:--:--  101k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 67478  100 67478    0     0    97k      0 --:--:-- --:--:-- --:--:--  135k
Conky: llua_do_call: function conky_weatherdata execution failed: /home/sector11/Conky/LUA/forecast_5.lua:172: attempt to index local 'file' (a nil value)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 67478  100 67478    0     0  66690      0  0:00:01  0:00:01 --:--:-- 99525
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 67478  100 67478    0     0  80729      0 --:--:-- --:--:-- --:--:--   98k
Conky: llua_do_call: function conky_weatherdata execution failed: /home/sector11/Conky/LUA/forecast_5.lua:172: attempt to index local 'file' (a nil value)

Last edited by Sector11 (2011-11-17 17:17:34)

Offline

#24 2011-11-17 18:26:27

BoredOOMM
#! Junkie
From: 36.0718,-119.03519
Registered: 2011-06-19
Posts: 353

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


Congratulations, you've figured out the sound of one hand clapping...

Offline

Be excellent to each other!

#25 2011-11-17 20:04:22

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

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

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

TEXT
${font Mono:size=10}Current Conditions (cpu: ${cpu cpu0}%)

${goto 70}${voffset -16}${lua weather now.con}${lua weather now.cd2}
${goto 70}${font Mono:size=14}${lua weather now.tmp}°F${goto 100}${voffset -3}${font ConkyWeather:size=22}   ${lua_parse weather font.now}${font}
${goto 70}${voffset -6}Feels Like: ${lua weather now.flk}°F
${voffset 5}
Wind Chill: ${lua weather now.wch}°F  ${goto 120}Ceiling:    ${lua weather now.cel}
Heat Index: ${lua weather now.hid}°F  ${goto 120}Visibility: ${lua weather now.vis} miles
Dew Point:  ${lua weather now.dpt}°F  ${goto 120}Wind:       ${lua weather now.wsp} mph
Humidity:   ${lua weather now.hum}%   ${goto 120}Direction:  ${lua weather now.wdg}° (${lua weather now.wdi})
Pressure:   ${lua weather now.prs}"   ${goto 120}Gusts:      ${lua weather now.wgs}${lua_parse weather image.now 5 18 50 50}

${font Mono:size=10}${lua weather day1.day} ${lua weather day1.dat}
${goto 70}${lua weather day1.con}${lua weather day1.cd2}
${goto 70}${font Mono:size=10}HI ${lua weather day1.hih}°F${goto 150}${font ConkyWeather:size=30}${lua_parse weather font.day1}${font}
${goto 70}${voffset -24}${font Mono:size=10}LO ${lua weather day1.low}°F${font}

Sun Rise:   ${lua weather day1.sri}   ${goto 140}Sun Set:    ${lua weather day1.sst}
Moon Rise:  ${lua weather day1.mri}   ${goto 140}Moon Set:   ${lua weather day1.mst}
Rain?:      ${lua weather day1.ppt}%  ${goto 140}UV Index:   ${lua weather day1.uvn} (${lua weather day1.uvt})
Snow?:      ${lua weather day1.snw}%  ${goto 140}Humidity:   ${lua weather day1.hum}%
Clouds:     ${lua weather day1.cld}%  ${goto 140}Wind:       ${lua weather day1.wmh} mph, ${lua weather day1.wdg} (${lua weather day1.wdi})
${lua_parse weather image.day1 5 190 50 50}
${font Mono:size=10}${lua weather day2.day} ${lua weather day2.dat}
${goto 70}${lua weather day2.con}${lua weather day2.cd2}
${goto 70}${font Mono:size=10}HI ${lua weather day2.hih}°F${goto 150}${font ConkyWeather:size=30}${lua_parse weather font.day1}${font}
${goto 70}${voffset -24}${font Mono:size=10}LO ${lua weather day2.low}°F${font}

Sun Rise:   ${lua weather day2.sri}   ${goto 140}Sun Set:    ${lua weather day2.sst}
Moon Rise:  ${lua weather day2.mri}   ${goto 140}Moon Set:   ${lua weather day2.mst}
Rain?:      ${lua weather day2.ppt}%  ${goto 140}UV Index:   ${lua weather day2.uvn} (${lua weather day2.uvt})
Snow?:      ${lua weather day2.snw}%  ${goto 140}Humidity:   ${lua weather day2.hum}%
Clouds:     ${lua weather day2.cld}%  ${goto 140}Wind:       ${lua weather day2.wmh} mph, ${lua weather day2.wdg} (${lua weather day2.wdi})
${lua_parse weather image.day2 5 347 50 50}

Last edited by mrpeachy (2011-11-17 20:06:14)

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

Debian Logo