pabloferz's avatar

Flat-Weather for Conky

By pabloferz
128 Favourites
212 Comments
44K Views
This is a Conky package to display the current weather conditions (not forecasts). Depends on bc and imagemagick, so make sure you have them both installed. You can now use it as a theme for the Conky Manager or as a standalone Conky instance.

Please read the README and CONFIGURATION files for more information and feel free to ask if you have any doubt.

Weather icons: plain weather icons by MerlinTheRed

CHANGELOG (02/17/2014)
* New icon theme.
* Right alignment support added.
* Adapted to work either as a standalone Conky instance or with Conky Manager.
* Added new option to move the text horizontally.

CHANGELOG (03/28/2013)
* Fixes issues due to the weather.com site changes.
* Support for more than 20 languages.
* There is no more need of ping to check internet connection status.

CHANGELOG (02/15/2012)
* There is no need to have a Weather Channel account anymore.
* Spanish and French support added.
* A few customization options were added.
* Some icons were modified.

CHANGELOG (05/04/2012)
* Script and conkyrc files modified to work in all conky versions from 1.8.0 to 1.9.0
Published:
Comments212
anonymous's avatar
Join the community to add your comment. Already a deviant? Log In
efest's avatar
I had to reinstall ubuntu!
Now I can not go back to it to work, the flat-weather conky!
When I write in conky terminal there is no picture over time.
www.youtube.com/watch?v=2-SRfR…
Did you could help me!
arturoj60's avatar
Hola, soy Rodrigo y son nuevo en esto

Estoy usando tu conky pero tengo un problema, no esta actualizando el iconito, la primera vez que lo puse tomo ese iconito y ya no cambio, ¿alguna sugerencia?
arturoj60's avatar
Hola, ya ya funciono, muchas gracias, gran conky =)
gaetanomastellone's avatar
Good evening I've this problem with Flat-Weather

ninonbnino:~$ conky -c ~/.conky/GMsx/Flat-Weather/meteo
Conky: desktop window (2800006) is subwindow of root window (81)
Conky: window type - normal
Conky: drawing to created window (0x4400002)
Conky: drawing to double buffer
--2014-07-09 17:57:33--  uk.weather.com/weather/today-I…
Resolving uk.weather.com (uk.weather.com)... 96.8.82.140
Connecting to uk.weather.com (uk.weather.com)|96.8.82.140|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: '/tmp/weather-ITCM1546'

    [    <=>                                ] 79,516       128KB/s   in 0.6s  

2014-07-09 17:57:34 (128 KB/s) - '/tmp/weather-ITCM1546' saved [79516]

convert.im6: unable to open image `/home/nino/.conky/GMsx/Flat-Weather/Flat/.png': File o directory non esistente @ error/blob.c/OpenBlob/2638.
convert.im6: no decode delegate for this image format `/home/nino/.conky/GMsx/Flat-Weather/Flat/.png' @ error/constitute.c/ReadImage/544.
convert.im6: no images defined `/tmp/ITCM1546-icon.png' @ error/convert.c/ConvertImageCommand/3044.
Conky: Unable to load image '/tmp/ITCM1546-icon.png'

how can I solve this problem?
pabloferz's avatar
I believe you do not have the latest version of this Conky. Try by downloading the package again.
ljmarin's avatar
El script funciona de 10, todo muy prolijo,

lo único en mi humilde opinión le falta es la opción de "Humedad", con la configuración que tengo de conky no tengo la opción de "sensación térmica", con este no tengo la de "humedad" xD

si a futuro pudieras agregarla sería muy bueno,
saludos, muy buen trabajo :)
pabloferz's avatar
¡Gracias por tu comentario! Lo tomaré en cuenta para incluirlo en la siguiente versión.

Saludos (:
juanuni's avatar
Hola, me parece muy bueno el trabajo; siempre quize poner el clima en el conky y solo hasta ahora con el tuyo he podido.

Tengo un pequeño problema. He añadido la última parte del archivo conkyrc a otro conky que ya vengo usando. En primer lugar, el ícono correspondiente a mi ciudad aparece. Sin embargo, no he podido cambiarlo de ubicación a pesar de varios intentos.

La terminal no me muestra nada sospechoso. Las definiciones previas de mi conky si es algo diferente al de tu conkyrc. ¿Tendrá que ver esto con que no pueda moverlo? ¿Es necesario enviarte el código de mi conky con una captura de pantalla? Gracias por responder
pabloferz's avatar
Hola, gracias por usar mi Conky. Es probable que sea algún problema de configuración con el conkyrc. Sí sería más sencillo para mí analizar tu conkyrc y una captura de pantalla no está de más.
juanuni's avatar
Tuve un pequeño problema con la parte gráfica, así que te envio lo primero que obtuve. Tengo dos archivos conkys, pero solo te muestro el código del conky horizontal, pues ahí está parte de tu conky :)

Mi conky (el horizontal)

use_xft yes
xftfont Verdana:style=bold:size=8
default_bar_size 70 2
update_interval 2

total_run_times 0
double_buffer yes
text_buffer_size 2048

own_window yes
#own_window_colour 3D3D3D
own_window_type normal
own_window_transparent no
#own_window_class Conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

own_window_argb_visual yes
own_window_argb_value 91

minimum_size 1050 90
maximum_width 1050


default_color DDF2FF
draw_borders no
border_margin 1
draw_graph_borders yes
draw_outline no
draw_shades no

color0 E6E6E6
color1 A7CC5C
color2 E6E6E6

alignment bottom_right
gap_x 530
gap_y 380



override_utf8_locale yes

no_buffers yes

TEXT

${voffset 15}${offset 20}${font Designer Block :size=15}${color #D8D8D8}BESPIN r1702${image /home/juanuni/Public/icon/bespin.png -p 135,-10 -s 120x120}
${if_running amarok}
${font Designer Block :size=10}${execp ~/.conky/conkyAmarok.py --template=~/.conky/conkyAmarok.template}
$endif
${voffset 15}${offset 100}${execpi 60 ~/.conky/Flat-Weather/weather.sh -p "Lima" -i "PEXX0011"}
${texeci 1000 feh --bg-scale "/home/juanuni/Public/wall/20D.jpg"}

juanuni.deviantart.com/art/Res…
pabloferz's avatar
Si en el script no se especifíca la posición del ícono, entonces se muestra de forma automática en la posición (0,0). Desafotunadamente la posición debe ser indicada explícitamente. En tu caso bastaría con cambiar la posición vertical, eso puede hacerse con la opción -Y (Y mayúscula), por ejemplo

execpi 60 ~/.conky/Flat-Weather/weather.sh -p "Lima" -i "PEXX0011" -Y 100

Ejecuta el script y posiciona al ícono en (0,100). La opción -X modifica la posición horizontal en caso de que también desearas modificarla.

Por otro lado, parece que la versión que estás utilizando de conky tiene un bug que causa que se muestre el símbolo que aparece antes de las condiciones climáticas (un cuadro que aparece antes de 'Partly Cloudy' en el caso del enlace que proporcionaste). ¿Sabes que versión de conky tienes instalada?
juanuni's avatar
Si te refieres al ícono de Bespin, no te preocupes, ese ícono lo puse yo ... gracias por tu respuesta, probare ahora mismo
pabloferz's avatar
No me refiero al ícono de Bespin, me refiero a un carácter rectangular que se ve abajo del nombre de la ciudad y antes de las condiciones del cielo. Ese error es causado por un bug en una de las versiones de conky, creo que en la 1.8.0 o 1.8.1. En una terminal, si ejecutas el comando

conky -v

¿qué versión de conky se muestra?
juanuni's avatar
me aparece conky 1.8.1
pabloferz's avatar
Si pudieras instalar una versión de conky más reciente sería mejor, esa versión tenía algunos problemas que ya se resolvieron en versiones más recientes como la 1.9.0. ¿Pudiste cambiar la posición del ícono del clima?

Saludos
View all replies
je-en's avatar
je-enHobbyist General Artist
i'm not the most tech savvy of people ahah, first time using a linux distro and conky
but i'm using elementary OS, and I can't get the weather.sh to run o:
i've filled in my city and the location id, the flat-weather file is indeed in .conky but clicking the weather.sh file doesn't do anything
i'm pretty sure i have imagemagick and bc installed and i've given conkyrc and weather.sh every permission, is there something i'm doing wrong or i've missed? qq
pabloferz's avatar
Hi Jeanne. Thanks for the interest in using this conky.

If you have the Flat-Weather folder inside the .conky folder already and you have imagemagick and bc, you have to make sure that you installed conky as well (I supose you already did). The conkyrc does not need permission to be executed but the weather.sh does. If you have done that, to run the conky, all you have to do is run in a terminal, for example

conky -c ~/.conky/Flat-Weather/conkyrc &

That should show the conky on your desk. I am not sure where you configure the applications that run at session start-up in ElementaryOS, but you should be able to use the same command there to run it every time you log in to your session. I would recommend you to write

conky -p 10 -c ~/.conky/Flat-Weather/conkyrc &

instead.

Conky read the conkyrc file which contains an instruction to execute de weather.sh script and pass its information to Conky so it can be displayed on the screen. Hope it clarifies everything. Cheers
je-en's avatar
je-enHobbyist General Artist
yup, i'm 99% i have conky (and curl, if i need it?) installed
i've typed both commands into the terminal but i keep getting this:

[1] 12626
me~computername:~$ Conky: desktop window (c0001e) is subwindow of root window (ac)
Conky: window type - override
Conky: drawing to created window (0x3a00001)
Conky: drawing to double buffer
--2013-11-10 22:03:44--  m.in.weather.com/right_now/411…
Resolving m.in.weather.com (m.in.weather.com)... 24.156.140.19, 24.156.140.49
Connecting to m.in.weather.com (m.in.weather.com)|24.156.140.19|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `/tmp/weather-4118-en'

   [ <=>                                  ] 93,944      --.-K/s   in 0.08s  

2013-11-10 22:03:44 (1.06 MB/s) - `/tmp/weather-4118-en' saved [93944]

and then it repeats over and over again, while nothing happens on the desktop
pabloferz's avatar
It seems that everything should be working. That's the usual behaviour of the program and the script. You should be seeing the conky displayed on the desktop. I don't know how elementary handles the desktop, but you might try to change the line in the conkyrc file that says

own_window_type override

to

own_window_type normal

that usually works on GNOME Shell (which uses mutter as compositing manager). Since ElementaryOS uses gala, which uses libmutter it might work.
je-en's avatar
je-enHobbyist General Artist
well it now shows it on the desktop partially ahah
it has my city name, but no cards/background or weather condition after a few hours
is this a problem with connecting to the website?
pabloferz's avatar
The city ID must be a number with 8 characters, the first 4 are letters and the last 4 are numbers. For example, the code for Los Angeles, CA in the United States is USCA0638. Make sure you have it like that.
je-en's avatar
je-enHobbyist General Artist
WOAHHH IT'S THEREEEE
thank you so much ahhh it's awesome
pabloferz's avatar
Glad you liked it that much! And thank you for adding it to your favourites.
leodelacruz's avatar
Muy bueno, excelente trabajo. Gracias!
anonymous's avatar
Join the community to add your comment. Already a deviant? Log In