Pokud chces mit pocasi v Conky, tak to musis udelat krapet jinak. Projed tuhle diskusi poradne. Musi si vytvorit adresar ".conky" v domovskem adresari a tam zadat 2 scripty:
weather.template
${wString weather} $hr
${alignr 3}${font bauhaus:pixelsize=8}$wLocation
${wString as_of}: $wSuplTime, $wSuplDate ${alignr 3}${wString update}: $wUpdateTime
${wConditions}
${voffset -5}${goto 20}${Font weather:size=65}$wConditionsSymbol
${voffset -70}${goto 13}${Font bauhaus:pixelsize=25}$wTemperature$wUnitTemperature
${voffset -20}${font weather:size=25}${alignr 20}$wMoonSymbol${font bauhaus:pixelsize=9}${voffset -107}
${wString pressure }: ${wBarTendencySymbol} $wPressure$wUnitPressure
${wString wind }: ${wWindSpeed }$wUnitSpeed $wWindDirection ($wWindAzimuth˚)
${wString humidity }: ${wHumidity } %
${wString visibility}: ${wVisibility }$wUnitDistance
${wString sunrise }: ${wSunrise }
${wString sunset }: ${wSunset }
${wString moon }: ${wMoon }$font
${voffset -10}${wString forecast} $stippled_hr
${goto 11}${ wDayName_Short 1 }${goto 61}${wDayName_Short 2 }${goto 111}${wDayName_Short 3}${goto 161}${wDayName_Short 4}${goto 211}${wDayName_Short 5}
${font weather:size=25}${goto 8}${wDayPartConditionsSymbol 1 0}${goto 58}${wDayPartConditionsSymbol 2 0}${goto 108}${wDayPartConditionsSymbol 3 0}${goto 158}${wDayPartConditionsSymbol 4 0}${goto 208}${wDayPartConditionsSymbol 5 0}
${voffset -20}${font bauhaus:pixelsize=9}${goto 5}${wDayHighestTemperature 1}/${wDayLowestTemperature 1}$wUnitTemperature${goto 55}${wDayHighestTemperature 2}/${wDayLowestTemperature 2}$wUnitTemperature${goto 105}${wDayHighestTemperature 3}/${wDayLowestTemperature 3}$wUnitTemperature${goto 155}${wDayHighestTemperature 4}/${wDayLowestTemperature 4}$wUnitTemperature${goto 205}${wDayHighestTemperature 5}/${wDayLowestTemperature 5}$wUnitTemperature
a
weather.pl
#!/usr/bin/perl
=help
CONKY WEATHER SCRIPT v2.0
USAGE:
perl weather.pl code language units template output
PARAMETERS:
code
The weather.com city code.
See http://xoap.weather.com/search/search?where=%s where %s stands for your location.
The codes for most of the Czech and Slovak locations are available at the end of this file.
For these locations, you can use even the name as written in the first column.
language
"EN" for English, "CZ" for Czech, "SK" for Slovak. (The parameter is case-insensitive.)
units
System of units: "s" for standard aka imperial, "m" for metric. (The parameter is case-insensitive.)
template
A textfile with the template. The format is identical with the Conky format, but these new variables
are available:
__________________________________________________________________________________________________
Variables without arguments
wBarTendency, wBarTendencySymbol, wCode, wConditions, wConditionsSymbol, wCountry,
wDewPoint,wWindSpeed, wFlik, wHumidity, wLatitude, wLocation, wLongitude, wMoon,
wMoonSymbol, wObservation, wObservationCountry, wPressure, wSunrise, wSunset, wSuplDate,
wSuplTime, wTemperature, wUnitDistance, wUnitLatitude, wUnitLongitude, wUnitPressure,
wUnitSpeed, wUnitTemperature, wUpdateTime, wUVIndex, wUVLevel, wVisibility, wWindAzimuth,
wWindDirection, wZone
EXAMPLE: $wCode or ${wCode }
__________________________________________________________________________________________________
Variables with one numeric argument standing for the number of the day starting with "0" for today
wDayDate, wDayHighestTemperature, wDayLowestTemperature, wDayMonth, wDayName_Short,
wDayName, wDaySunrise, wDaySunset
EXAMPLE: ${wDayHighestTemperature 8}
__________________________________________________________________________________________________
Variables with two numeric arguments, the first standing for the number of the day starting with "0"
for today and the latter for the day part, "0" for day and "1" for night.
wDayPartConditions, wDayPartConditions_Long, wDayPartConditions_Short, wDayPartHumidity,
wDayPartPrecipitation, wDayPartConditionsSymbol, wDayPartWindAzimuth, wDayPartWindDirection,
wDayPartWindSpeed
EXAMPLE: ${wDayPartWindSpeed 3 0}
__________________________________________________________________________________________________
Variable "wString" with one string argument. It returns the translation of this string as given
in the string table at the line 443 of this file. You can add your own strings, but the string
in the table should be lower-case. Use "_" instead of spaces.
This variable is usable for multilingual templates.
EXAMPLE: ${ wString Humidity }
All the variables and arguments are case-insensitive.
The variable wDayConditions_Long is always in English, the variable wDayPartConditions_Short is partly
translated.
The variables wConditionsSymbol, wMoonSymbol and wDayPartConditionsSymbol return the character corresponding
to the symbol in the weather font.
output
A file where the output of the script is stored. To make the script lightweight, the file is updated
if and only if new data are successfully downloaded, thus don't use /tmp/ to store this file - it could
be deleted by the system.
The script tries to download new data if and only if the current data are not for the current hour.
USAGE IN CONKY:
To not to disturb Conky, it is preferable to run this script in a separate thread using the command
$texeci. You can display the output file in Conky using the $execi or $execpi command and "cat".
You have to use the $execpi variant whenever there are some Conky variables in the template.
EXAMPLE:
${texeci 300 perl ~/.conky/weather.pl EZXX0012 CZ M ~/.conky/weather.template ~/.conky/weather.conky}
${execpi 240 cat ~/.conky/weather.conky}
=cut
use XML::Simple;
$xmlfile = "$ENV{HOME}/.conky/weather.xml";
$tempfile = "$ENV{HOME}/.conky/weather.tmp";
$code = $ARGV[0];
$language = $ARGV[1];
$unit = $ARGV[2];
$templatefile = $ARGV[3];
$outputfile = $ARGV[4];
$language =~ tr/EN/en/;
$unit =~ tr/MS/ms/;
########################################################################################################
if(-e $xmlfile){
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
($xmon, $xday, $xyear, $xhour) = lsup($xmlfile);
$update = !($xmon == $mon + 1 && $xday == $mday && $xyear == $year - 100 && $xhour == $hour);
}
else {$update = TRUE};
if ($update) {
open (THISFILE, $0);
while (<THISFILE>) {
if (m/^#\s/) {
my @line = split /\s*#\s*|\s*\n/;
shift @line;
my $key = shift @line;
$dictionary->{$key} = [@line];
}
}
close (THISFILE);
$code = &translate($code, 0);
`wget -O $tempfile "http://xoap.weather.com/weather/local/$code?unit=$unit&dayf=10&dayd=10&cc=*"`;
if (-s "$tempfile" > 0) {
my ($tmon, $tday, $tyear, $thour) = lsup($tempfile);
unless ($tmon == $xmon && $tday == $xday && $tyear == $xyear && $thour == $xhour) {
`mv -f $tempfile $xmlfile`;
&parse_template
}
}
}
########################################################################################################
sub lsup {
open (XMLFILE, $_[0]);
while (<XMLFILE>) {
if (my ($xmon, $xday, $xyear, $xhour, $xdaypart) = m/^\s*\<lsup\>(\d*)\/(\d*)\/(\d*)\s(\d*):\d*\s([A|P])/) {
if ($xhour == 12 ) {$xhour = 0 };
if ($xdaypart eq "P") {$xhour += 12};
return ($xmon, $xday, $xyear, $xhour);
last
}
};
close (XMLFILE);
}
sub parse_template{
my $temp = $/;
undef $/;
open (TEMPLATEFILE, $templatefile) || die "Can't open template.";
$template = <TEMPLATEFILE>;
close (TEMPLATEFILE);
$/ = $temp;
if ($language eq "en") {$language_index = 0; $time = sub {$_[0]}; $date = sub {$_[0]."/" .$_[1]. "/20".$_[2]}}
elsif ($language eq "cz") {$language_index = 1; $time = \&time_en_24; $date = sub {$_[1].". ".$_[0].". 20".$_[2]}}
elsif ($language eq "sk") {$language_index = 2; $time = \&time_en_24; $date = sub {$_[1].". ".$_[0].". 20".$_[2]}}
$symbol_index = 3;
$xml = new XML::Simple;
$weather = $xml->XMLin($xmlfile);
$template =~ s/\$\{\s*wString\s*(\w*)\s*\}/&translate($1, $language_index)/ieg;
foreach $conky_key (wCode, wLatitude, wLongitude, wZone, wTemperature, wFlik, wPressure, wVisibility, wHumidity, wDewPoint,wWindSpeed,
wWindAzimuth, wSunset, wSunrise, wConditionsSymbol, wConditions, wMoonSymbol, wMoon, wWindDirection, wBarTendencySymbol, wBarTendency,
wUnitSpeed, wUnitDistance, wUnitTemperature, wUnitPressure, wUnitLatitude, wUnitLongitude, wObservationCountry, wObservation,
wLocation, wCountry, wSuplTime, wSuplDate, wUpdateTime, wUVIndex, wUVLevel){
if ($template =~ m/\$\{\s*$conky_key\s*\}|\$$conky_key/i) {
$template =~ s/\$\{\s*$conky_key\s*\}|\$$conky_key/&conky_value($conky_key)/ieg;
}
}
for ($day = 0; $day < 10; $day++) {
foreach $conky_key (wDayHighestTemperature, wDayLowestTemperature, wDayName_Short,wDayName, wDaySunset, wDaySunrise, wDayMonth, wDayDate) {
if ($template =~ m/\$\{\s*$conky_key\s*$day\s*\}/i) {
$template =~ s/\$\{\s*$conky_key\s*$day\s*\}/&conky_day($conky_key, $day)/ieg;
};
};
for ($day_part = 0; $day_part < 2; $day_part++) {
foreach $conky_key (wDayPartWindSpeed, wDayPartWindAzimuth, wDayPartWindDirection, wDayPartPrecipitation, wDayPartHumidity,
wDayPartConditionsSymbol, wDayPartConditions_Short, wDayPartConditions_Long, wDayPartConditions) {
if ($template =~ m/\$\{\s*$conky_key\s*$day\s*$day_part\s*\}/i) {
$template =~ s/\$\{\s*$conky_key\s*$day\s*$day_part\s*\}/&conky_day_part($conky_key, $day, $day_part)/eig;
}
}
}
};
open (OUT, ">$outputfile") || die "Can't open output file";
print OUT $template;
close (OUT);
}
sub conky_day { # $_[0] key, $_[] day
my $r = \$conky->{Day}[$_[1]]->{$_[0]};
unless ($$r) {
my $w = \$weather->{dayf}->{day}[$_[1]];
if ($_[0] eq "wDayHighestTemperature") {$$r = $$w->{hi}}
elsif ($_[0] eq "wDayLowestTemperature") {$$r = $$w->{low}}
elsif ($_[0] eq "wDayName_Short") {$$r = &translate(substr($$w->{t},0,3), $language_index)}
elsif ($_[0] eq "wDayName") {$$r = &translate($$w->{t}, $language_index)}
elsif ($_[0] eq "wDaySunset") {$$r = &$time($$w->{suns})}
elsif ($_[0] eq "wDaySunrise") {$$r = &$time($$w->{sunr})}
elsif ($_[0] eq "wDayMonth" || $_[0] eq "wDayDate") {
my @temp = split " ", $weather->{dayf}->{day}[$_[1]]->{dt};
$conky->{Day}[$_[1]]->{wDayMonth} = &translate($temp[0], $language_index);
$conky->{Day}[$_[1]]->{wDayDate} = $temp[1];
}
}
return $$r
}
sub conky_day_part { # $_[0] key, $_[1] day, $_[2] day part
my $r = \$conky->{Day}[$_[1]]->{Part}[$_[2]]->{$_[0]};
unless ($$r) {
my $w = \$weather->{dayf}->{day}[$_[1]]->{part}[$_[2]];
if ($_[0] eq "wDayPartWindSpeed") {$$r = $$w->{wind}->{s}}
elsif ($_[0] eq "wDayPartWindAzimuth") {$$r = $$w->{wind}->{d}}
elsif ($_[0] eq "wDayPartPrecipitation") {$$r = $$w->{ppcp}}
elsif ($_[0] eq "wDayPartHumidity") {$$r = $$w->{hmid}}
elsif ($_[0] eq "wDayPartWindDirection") {$$r = &translate($$w->{wind}->{t}, $language_index)}
elsif ($_[0] eq "wDayPartConditionsSymbol") {$$r = &translate($$w->{icon}, 1)}
elsif ($_[0] eq "wDayPartConditions") {$$w->{t} =~ tr/A-Z/a-z/;
$$r = &translate($$w->{t}, $language_index)}
elsif ($_[0] eq "wDayPartConditions_Short") {$$w->{bt} =~ tr/A-Z/a-z/;
$$r = &translate($$w->{bt}, $language_index)}
elsif ($_[0] eq "wDayPartConditions_Long") {
$w = \$weather->{dayd}->{day}[$_[1]]->{part};
if (ref($$w) eq "ARRAY") {
$$r = $weather->{dayd}->{day}[$_[1]]->{part}[$_[2]]->{t};
}
elsif (($weather->{dayd}->{day}[$_[1]]->{part}->{p} eq "d" && $_[2] == 0)
|| ($weather->{dayd}->{day}[$_[1]]->{part}->{p} eq "n" && $_[2] == 1)) {
$$r = $weather->{dayd}->{day}[$_[1]]->{part}->{t}
}
else { $$r = ""};
}
}
return $$r
}
sub conky_value { # $_[0] key
my $r = \$conky->{$_[0]};
unless ($$r) {
if ($_[0] eq "wCode") {$$r = $code}
elsif ($_[0] eq "wLatitude") {$$r = $weather->{loc}->{lat}}
elsif ($_[0] eq "wLongitude") {$$r = $weather->{loc}->{lon}}
elsif ($_[0] eq "wZone") {$$r = $weather->{loc}->{zone}}
elsif ($_[0] eq "wTemperature") {$$r = $weather->{cc}->{tmp}}
elsif ($_[0] eq "wFlik") {$$r = $weather->{cc}->{flik}}
elsif ($_[0] eq "wPressure") {$$r = $weather->{cc}->{bar}->{r}}
elsif ($_[0] eq "wVisibility") {$$r = $weather->{cc}->{vis}}
elsif ($_[0] eq "wHumidity") {$$r = $weather->{cc}->{hmid}}
elsif ($_[0] eq "wDewPoint") {$$r = $weather->{cc}->{dewp}}
elsif ($_[0] eq "wWindSpeed") {$$r = $weather->{cc}->{wind}->{s}}
elsif ($_[0] eq "wWindAzimuth") {$$r = $weather->{cc}->{wind}->{d}}
elsif ($_[0] eq "wUVIndex") {$$r = $weather->{cc}->{uv}->{i}}
elsif ($_[0] eq "wWindAzimuth") {$$r = $weather->{cc}->{wind}->{d}}
elsif ($_[0] eq "wUpdateTime") {$$r = &$time($weather->{loc}->{tm})}
elsif ($_[0] eq "wSunset") {$$r = &$time($weather->{loc}->{suns})}
elsif ($_[0] eq "wSunrise") {$$r = &$time($weather->{loc}->{sunr})}
elsif ($_[0] eq "wConditionsSymbol") {$$r = &translate($weather->{cc}->{icon}, 1)}
elsif ($_[0] eq "wUVLevel") {$$r = &translate($weather->{cc}->{uv}->{t}, $language_index)}
elsif ($_[0] eq "wMoon") {$$r = &translate($weather->{cc}->{moon}->{t}, $language_index)}
elsif ($_[0] eq "wMoonSymbol") {$$r = &translate($weather->{cc}->{moon}->{t}, $symbol_index)}
elsif ($_[0] eq "wWindDirection") {$$r = &translate($weather->{cc}->{wind}->{t}, $language_index)}
elsif ($_[0] eq "wBarTendency") {$$r = &translate($weather->{cc}->{bar}->{d}, $language_index)}
elsif ($_[0] eq "wBarTendencySymbol") {$$r = &translate($weather->{cc}->{bar}->{d}, $symbol_index)}
elsif ($_[0] eq "wUnitSpeed") {$$r = &translate($weather->{head}->{us}, $language_index)}
elsif ($_[0] eq "wUnitDistance") {$$r = &translate($weather->{head}->{ud}, $language_index)}
elsif ($_[0] eq "wUnitTemperature") {$$r = &translate($weather->{head}->{ut}, $language_index)}
elsif ($_[0] eq "wUnitPressure") {$$r = &translate($weather->{head}->{up}, $language_index)}
elsif ($_[0] eq "wUnitLatitude") {$$r = &translate("unit_latitude", $language_index)}
elsif ($_[0] eq "wUnitLongitude") {$$r = &translate("unit_longitude", $language_index)}
elsif ($_[0] eq "wConditions") {$weather->{cc}->{t} =~ tr/A-Z/a-z/;
$$r = &translate($weather->{cc}->{t}, $language_index)}
elsif ($_[0] eq "wObservation" || $_[0] eq "wObservationCountry") {
my @temp = split ", ", $weather->{cc}->{obst};
$conky->{wObservation} = &translate($temp[0], 1);
$conky->{wObservationCountry} = &translate($temp[1], $language_index);
}
elsif ($_[0] eq "wLocation" || $_[0] eq "wCountry") {
my @temp = split ", ", $weather->{loc}->{dnam};
$conky->{wLocation} = &translate($temp[0], 1);
$conky->{wCountry} = &translate($temp[1], $language_index);
}
elsif ($_[0] eq "wSuplTime" || $_[0] eq "wSuplDate") {
my @temp = split /\s|\//, $weather->{cc}->{lsup};
$conky->{wSuplTime} = &$time($temp[3]." ".$temp[4]);
$conky->{wSuplDate} = &$date($temp[0],$temp[1],$temp[2]);
}
}
return $$r
}
sub translate {
if ($dictionary->{$_[0]}) {return $dictionary->{$_[0]}[$_[1]]}
else {return $_[0]}
}
sub time_en_24 {
my @temp = split /\:|\s/, $_[0];
if ($temp[0] == 12) {$temp[0] = 0};
if ($temp[2] eq "PM") {$temp[0] += 12};
return "$temp[0]".":"."$temp[1]";
}
########################################################################################################
## TRANSLATION TABLES
##
########################################################################################################
########################################################################################################
## COUNTRY
## value # en
########################################################################################################
# Czech Republic # Czech Republic
# Germany # Germany
# Hungary # Hungary
# Poland # Poland
# Slovakia # Slovakia
########################################################################################################
## DAY
## value # en
########################################################################################################
# Monday # Monday
# Tuesday # Tuesday
# Wednesday # Wednesday
# Thursday # Thursday
# Friday # Friday
# Saturday # Saturday
# Sunday # Sunday
########################################################################################################
## DAY_SHORT
## value # en
########################################################################################################
# Mon # Mon
# Tue # Tue
# Wed # Wed
# Thu # Thu
# Fri # Fri
# Sat # Sat
# Sun # Sun
########################################################################################################
## Month
## value # en # symbol
########################################################################################################
# Jan # January # 1
# Feb # February # 2
# Mar # March # 3
# Apr # April # 4
# May # May # 5
# Jun # June # 6
# Jul # July # 7
# Aug # August # 8
# Sep # September # 9
# Oct # October # 10
# Nov # November # 11
# Dec # December # 12
########################################################################################################
## WIND
## value # en
########################################################################################################
# N # N
# E # E
# S # S
# W # W
# NE # NE
# SE # SE
# SW # SW
# NW # NW
# NNE # NNE
# ENE # ENE
# ENE # ENE
# SSE # SSE
# NNW # NNW
# WNW # WNW
# WSW # WSW
# SSW # SSW
# VAR # variable
########################################################################################################
## UNIT
## space-separated units start with a hard space
## value # en
#########################################################################################################
# C # °C
# km # km
# km/h # km/h
# mb # mb
# mm # mm
# F # °F
# mi # mi
# mph # mph
# in # in
# unit_latitude # N
# unit_longitude # E
########################################################################################################
## PREASURE
## value # en # symbol
#######################################################################################################
# rising # rising # ↑
# falling # falling # ↓
# steady # steady # =
########################################################################################################
## LUNAR PHASE
## value # en # symbol
########################################################################################################
# New # New # 9
# Waxing Crescent # Waxing Crescent # 7
# First Quarter # First Quarter # 0
# Waxing Gibbous # Waxing Gibbous # 3
# Full # Full # 1
# Waning Gibbous # Waning Gibbous # 3 # (left <-> right)
# Last Quarter # Last Quarter # 0 # (left <-> right)
# Third Quarter # Third Quarter # 0 # (left <-> right)
# Waning Crescent # Waning Crescent # 7 # (left <-> right)
########################################################################################################
## UV Index
## value # en # symbol
########################################################################################################
# Extreme # extrem
# Very high # very high
# High # high
# Moderate # moderate
# Low # low
########################################################################################################
## STRING
## value # en # symbol
########################################################################################################
# weather # Weather
# forecast # Forecast
# as_of # as of
# update # Update
# pressure # Pressure
# wind # Wind
# dew_point # Dew point
# visibility # Visibility
# sunrise # Sunrise
# sunset # Sunset
# moon # Moon
# humidity # Humidity
# uv # UV index
########################################################################################################
## CONDITIONS
## value # en # symbol
########################################################################################################
# blowing dust # Blowing dust
# blowing dust and windy # Blowing dust and windy
# blowing snow # Blowing snow
# blowing snow and windy # Blowing snow and windy
# clear # Clear
# clear and windy # Clear and windy
# cloudy # Cloudy
# cloudy and windy # Cloudy and windy
# drifting snow # Drifting snow
# drizzle # Drizzle
# fair # Fair
# fair and windy # Fair and windy
# fog # Fog
# fog and windy # Fog and windy
# haze # Haze
# haze and windy # Haze and windy
# heavy drizzle # Heavy drizzle
# heavy rain # Heavy rain
# heavy rain and windy # Heavy rain and windy
# heavy rain shower # Heavy rain shower
# heavy rain shower and windy # Heavy rain shower and windy
# heavy snow # Heavy snow
# heavy snow and windy # Heavy snow and windy
# heavy snow shower # Heavy snow shower
# heavy t-storm # Heavy t-storm
# heavy t-storm and windy # Heavy t-storm and windy
# light drizzle # Light drizzle
# light drizzle and windy # Light drizzle and windy
# light freezing drizzle # Light freezing drizzle
# light freezing drizzle and fog# Light freezing drizzle and fog
# light freezing rain # Light freezing rain
# light rain # Light rain
# light rain shower # Light rain shower
# light rain shower and windy # Light rain shower and windy
# light rain and fog # Light rain and fog
# light rain and freezing rain # Light rain and freezing rain
# light rain with thunder # Light rain with thunder
# light rain and windy # Light rain and windy
# light snow # Light snow
# light snow grains # Light snow grains
# light snow shower # Light snow shower
# light snow shower and windy # Light snow shower and windy
# light snow and sleet # Light snow and sleet
# light snow and windy # Light snow and windy
# mist # Mist
# mostly cloudy # Mostly cloudy
# mostly cloudy and windy # Mostly cloudy and windy
# partial fog # Partial fog
# partly cloudy # Partly cloudy
# partly cloudy and windy # Partly cloudy and windy
# patches of fog # Patches of fog
# rain # Rain
# rain and sleet # Rain and sleet
# rain and snow # Rain and snow
# rain shower # Rain shower
# rain shower and windy # Rain shower and windy
# rain and fog # Rain and fog
# rain and freezing rain # Rain and freezing rain
# rain and windy # Rain and windy
# sand # Sand
# sand and windy # Sand and windy
# shallow fog # Shallow fog
# showers in the vicinity # Showers in the vicinity
# sleet # Sleet
# smoke # Smoke
# snow # Snow
# snow and fog # Snow and fog
# snow and freezing rain # Snow and freezing rain
# snow grains # Snow grains
# snow showers # Snow showers
# snow and windy and fog # Snow and windy and fog
# squalls # Squalls
# squalls and windy # Squalls and windy
# sunny # Sunny
# sunny and windy # Sunny and windy
# t-storm # T-Storm
# t-storm and windy # T-Storm and windy
# thunder # Thunder
# thunder and wintry mix # Thunder and wintry mix
# thunder in the vicinity # Thunder in the vicinity
# unknown precip # Unknown precip
# widespread dust # Widespread dust
# widespread dust and windy # Widespread dust and windy
# wintry mix # Wintry mix
########################################################################################################
## ICONS
## Nr. # Yahoo description # symbol
########################################################################################################
# 0 # tornado # i
# 1 # tropical storm # h
# 2 # hurricane # h
# 3 # severe thunderstorms # i
# 4 # thunderstorms # i
# 5 # mixed rain and snow # k
# 6 # mixed rain and sleet # h
# 7 # mixed snow and sleet # k
# 8 # freezing drizzle # g
# 9 # drizzle # g
# 10 # freezing rain # h
# 11 # showers # g
# 12 # showers # h
# 13 # snow flurries # j
# 14 # light snow showers # k
# 15 # blowing snow # j
# 16 # snow # k
# 17 # hail # i
# 18 # sleet # h
# 19 # dust # v
# 20 # foggy # v
# 21 # haze # v
# 22 # smoky # v
# 23 # blustery # w
# 24 # windy # w
# 25 # cold # j
# 26 # cloudy # d
# 27 # mostly cloudy (night) # d
# 28 # mostly cloudy (day) # c
# 29 # partly cloudy (night) # b
# 30 # partly cloudy (day) # b
# 31 # clear (night) # 1
# 32 # sunny # a
# 33 # fair (night) # 1
# 34 # fair (day) # b
# 35 # mixed rain and hail # i
# 36 # hot # l
# 37 # isolated thunderstorms # f
# 38 # scattered thunderstorms # f
# 39 # scattered thunderstorms # h
# 40 # scattered showers # h
# 41 # heavy snow # k
# 42 # scattered snow showers # k
# 43 # heavy snow # k
# 44 # partly cloudy # b
# 45 # thundershowers # h
# 46 # snow showers # k
# 47 # isolated thundershowers # g
# na # not available # ~
########################################################################################################
## United Kingdom
## loc dnam # UKXX0092 # Manchester
Do samotneho scriptu ".conkyrc" pak staci pridat tyhle lajny..
${texeci 360 perl ~/.conky/weather.pl UKXX0092 en m ~/.conky/weather.template ~/.conky/weather.conky}
${execpi 247 cat ~/.conky/weather.conky}
Nevim, zda mas nainstalovane fonty, v tom pripade hledej dale ve vlakne.
Moje scripty jsou pouze pro anglictinu, takze si je radsi okopiruj od wera a samozrejme si zmen lokalitu...