J'ai profité de ma migration sous lua pour me familiariser avec les commandes à utiliser pour faire réaliser l'affichage des données.
Aussi, pour maîtriser plus vite, quoi de mieux que de réaliser un conky 😃
J'en ai donc profité pour faire un conky en gros affichage, dans le style des widgets météo qu'on peut trouver sur les tablettes Androïd
Voici ce que cela donne :
Uploaded with
ImageShack.us
Attention, il occupe beaucoup de place, et si votre fond d'écran est trop clair, il ne sera pas très lisible.
Je vais d'ailleurs surement en refaire un avec un fond sombre pour le rendre plus lisible, mais cela masquera le fond d'écran :rolleyes:
Voici le conkyrc qui donne ce résultat :
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# fiddle with window
use_spacer right
use_xft yes
# Update interval in seconds
update_interval 3
# Minimum size of text area
minimum_size 780 450
maximum_width 1200
override_utf8_locale yes
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
#font freesans -12
xftfont Arial:size=9
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
border_margin 9
# border width
border_width 10
# Default colors and also border colors, grey90 == #e5e5e5
default_color cbcbcb
own_window_colour brown
own_window_transparent yes
# Text alignment, other possible values are commented
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 80
gap_y 30
#Rafraichissement images
imlib_cache_size 0
# Couleurs
default_color FFFFFF #blanc
default_shade_color 333333
default_outline_color black
color1 e49c16
color2 CA0000 #rouge
color4 E7E1D6 #
color6 EEEEEE
color7 DDDDDD
color8 CCCCCC
color9 48D1CC
# -- Declaration template -- #
template1 ${lua Meteo_\1 \2 \3 \4 \5 \6} # -- gestion météo --#
template2 ${lua_parse Meteo_\1 \2 \3 \4 60 \5} # -- icones météo -- \2=repertoire icones \3=position \4=taille \5=jour (pour les prévisions) #
template3 ${lua Lune_\1}
lua_load ~/conky/script/meteo.lua
# stuff after 'TEXT' will be formatted on screen
TEXT
#### Lancement du script récupérant les données météo ####
${template1 Maj http://www.accuweather.com/fr/fr/marseille/170960 7 1800 /tmp ~/meteotemp/}
####Affichage Heure et Date####
${font URW Chancery L:style=Bold:size=26}${color ffe595}${goto 50}${time %H}:${time %M}
${voffset -65}${goto 300}${font URW Chancery L:style=Bold:size=40}${template2 Date %A_%d_%B_%Y}
${voffset -45}${hr 2}${font}
####Affichage Cadre####
${voffset 15}${font Radio Space:style=Bold:size=24}${color yellow}MAINTENANT${goto 540}PREVISION 48H
####Affichage Localisation####
${voffset -60}${goto 350}${font Bitstream Vera Sans Mono:style=Bold:size=14}${color blue}${template1 Ville}
${voffset -5}${goto 275}${font Bitstream Vera Sans Mono:style=Bold:size=12}${template1 latitude} N / ${template1 longitude} E
####Affichage Actualisation####
${font URW Chancery L:style=Bold:size=16}${color red}${goto 280}Dernière mise à jour : ${template1 Heure}h${template1 Minute}
${voffset -15}${color ffe595}${hr 2}${font}
####Affichage Taux Humidité et T° ressentie####
${font URW Chancery L:style=Bold:size=16}${color ffe595}HUMIDITE${goto 415}RESSENTIE
${voffset -15}${font URW Chancery L:style=Bold:size=26}${color1}${goto 35}${template1 Humidite}%${goto 440}${template1 TempRes}°C
####Affichage Pression et Vent####
${voffset 20}${font URW Chancery L:style=Bold:size=16}${color ffe595}BAROMETRE${voffset -20}${goto 435}VENT
${voffset 5}${font URW Chancery L:style=Bold:size=26}${color1}${goto 15}${template1 Pression} mb${goto 430}${voffset -20}${template1 VentForce}Km/h
${voffset -15}${goto 430}${template1 VentDirP}
####Affichage Point de Rosée et Pluie####
${font URW Chancery L:style=Bold:size=16}${color ffe595}PT. DE ROSEE${goto 430}PLUIE
${voffset -15}${font URW Chancery L:style=Bold:size=26}${color1}${goto 35}${template1 Rose}°C${goto 430}${template1 QPrec} mm
####Affichage Icônes Temps et Vent####
${template2 IconeM ~/conky/meteo+lune/icones/base 80,165 250x150}
${template2 IconeV ~/conky/meteo+lune/icones/base/vent 365,260 55x55}
####Affichage T° Actuelle####
${voffset -300}${font Bitstream Vera Sans Mono:style=Bold:size=60}${if_match ${template1 TempAct}<6}${color red}${goto 310}${blink ${template1 TempAct}°}${else}${color white}${goto 310}${template1 TempAct}°${endif}
####Affichage Conditions Actuelles####
${voffset -25}${goto 175}${font URW Chancery L:style=Bold:size=22}${color Lightblue}${template1 CondMeteo1se}
${voffset -5}${goto 175}${font URW Chancery L:style=Bold:size=22}${color Lightblue}${template1 CondMeteo2se}
#${color ffe595}${hr 2}${font}
####Affichage Cadre####
${goto 40}${font Radio Space:style=Bold:size=24}${color yellow}JOUR${goto 220}SOIR${goto 400}LUNE
####Affichage Titres####
${voffset -15}${font URW Chancery L:style=Bold:size=12}${color ffe595}AUBE${goto 60}T°MAX${goto 115}PLUIE${goto 170}AURORE${goto 240}T°MIN${goto 295}PLUIE${goto 380}PHASE${goto 450}VISIBLE
####Affichage Icônes####
${image ~/conky/meteo+lune/icones/base/Lever.png -p 0,475 -s 45x45}
${image ~/conky/meteo+lune/icones/base/jour/ho.png -p 45,475 -s 50x30}
${image ~/conky/meteo+lune/icones/base/Coucher.png -p 165,475 -s 45x45}
${image ~/conky/meteo+lune/icones/base/jour/co.png -p 215,475 -s 50x30}
${image /tmp/lune.png -p 365,475 -s 45x45 -f 60}
####Affichage Données Jour####
${voffset -65}${font URW Chancery L:style=Bold:size=18}${color1}${template1 HLeverSoleil}:${template1 MLeverSoleil}${color ffe595}${goto 65}${template1 Jour_Temp 1}°C${goto 115}${voffset -40}${color Red}${template1 Jour_ProbOrage}%${voffset 40}${goto 115}${color1}${template1 Jour_QPluie 1}mm
####Affichage Données Nuit####
${voffset -30}${goto 170}${font URW Chancery L:style=Bold:size=18}${color ffe595}${template1 HCoucherSoleil}:${template1 MCoucherSoleil}${color1}${goto 240}${template1 Nuit_Temp 1}°C${goto 295}${voffset -40}${color Red}${template1 Nuit_ProbOrage}%${voffset 40}${goto 295}${color ffe595}${template1 Nuit_QPluie 1}mm
####Affichage Données Lune####
${voffset -30}${goto 375}${font URW Chancery L:style=Bold:size=14}${color1}${template3 ephemerides1}${voffset 15}${goto 375}${template3 ephemerides2}
${voffset -85}${goto 455}${font URW Chancery L:style=Bold:size=16}${color red}${template3 Visibilite}%
${voffset -10}${goto 455}${font URW Chancery L:style=Bold:size=16}${color1}Lever
${voffset -10}${goto 455}${font URW Chancery L:style=Bold:size=16}${color ffe595}${template3 HLeverLune}:${template3 MLeverLune}
${voffset -10}${goto 455}${font URW Chancery L:style=Bold:size=16}${color1}Coucher
${voffset -10}${goto 455}${font URW Chancery L:style=Bold:size=16}${color ffe595}${template3 HCoucherLune}:${template3 MCoucherLune}
####Prévisions 48H####
####J+1####
${voffset -430}${goto 575}${font URW Chancery L:style=Bold:size=16}${color6}${template2 Jour %A_%d_%B_%Y 2}
###Jour###
${template2 Jour_IconeM ~/conky/meteo+lune/icones/base 510,175 70x42 2}
${voffset -30}${goto 585}${color red}${template1 Jour_Temp 2}°${color1} Pluie:${template1 Jour_ProbOrage 2}% - ${template1 Jour_QPluie 2}mm
${voffset -10}${goto 585}${font Arial:size=10}${color3}${template1 Jour_CondMeteo 2}
${goto 555}${font URW Chancery L:style=Bold:size=16}${color1}Vent${goto 690}Rafales
${template2 Jour_IconeV ~/conky/meteo+lune/icones/base/vent 580,225 30x30 2}
${template2 Jour_IconeR ~/conky/meteo+lune/icones/base/vent 735,225 30x30 2}
${font URW Chancery L:style=Bold:size=14}${voffset -65}${goto 555}${color yellow}${template1 Jour_VentDirP 2} ${template1 Jour_VentForce 2}km/h${goto 690}${template1 Jour_VentDirP 2} ${template1 Jour_VentRafales 2}km/h
###Nuit###
${template2 Nuit_IconeM ~/conky/meteo+lune/icones/base 510,270 70x42 2}
${voffset -20}${goto 585}${color red}${template1 Nuit_Temp 2}°${color1} Pluie:${template1 Jour_ProbOrage 2}% - ${template1 Jour_QPluie 2}mm
${voffset -10}${goto 585}${font Arial:size=10}${color3}${template1 Nuit_CondMeteo 2}
${goto 555}${font URW Chancery L:style=Bold:size=16}${color1}Vent${goto 690}Rafales
${template2 Nuit_IconeV ~/conky/meteo+lune/icones/base/vent 580,315 30x30 2}
${template2 Nuit_IconeR ~/conky/meteo+lune/icones/base/vent 735,315 30x30 2}
${font URW Chancery L:style=Bold:size=14}${voffset -65}${goto 555}${color yellow}${template1 Nuit_VentDirP 2} ${template1 Nuit_VentForce 2}km/h${goto 690}${template1 Nuit_VentDirP 2} ${template1 Nuit_VentRafales 2}km/h
####J+2####
${goto 575}${font URW Chancery L:style=Bold:size=16}${color6}${template2 Jour %A_%d_%B_%Y 3}
###Jour###
${template2 Jour_IconeM ~/conky/meteo+lune/icones/base 510,395 70x42 3}
${voffset -30}${goto 585}${color red}${template1 Jour_Temp 3}°${color1} Pluie:${template1 Jour_ProbOrage 3}% - ${template1 Jour_QPluie 3}mm
${voffset -10}${goto 585}${font Arial:size=10}${color3}${template1 Jour_CondMeteo 3}
${goto 555}${font URW Chancery L:style=Bold:size=16}${color1}Vent${goto 690}Rafales
${template2 Jour_IconeV ~/conky/meteo+lune/icones/base/vent 580,435 30x30 3}
${template2 Jour_IconeR ~/conky/meteo+lune/icones/base/vent 735,435 30x30 3}
${font URW Chancery L:style=Bold:size=14}${voffset -65}${goto 555}${color yellow}${template1 Jour_VentDirP 3} ${template1 Jour_VentForce 3}km/h${goto 690}${template1 Jour_VentDirP 3} ${template1 Jour_VentRafales 3}km/h
###Nuit###
${template2 Nuit_IconeM ~/conky/meteo+lune/icones/base 510,485 70x42 2}
${voffset -20}${goto 585}${color red}${template1 Nuit_Temp 3}°${color1} Pluie:${template1 Jour_ProbOrage 3}% - ${template1 Jour_QPluie 3}mm
${voffset -10}${goto 585}${font Arial:size=10}${color3}${template1 Nuit_CondMeteo 3}
${goto 555}${font URW Chancery L:style=Bold:size=16}${color1}Vent${goto 690}Rafales
${template2 Nuit_IconeV ~/conky/meteo+lune/icones/base/vent 580,530 30x30 3}
${template2 Nuit_IconeR ~/conky/meteo+lune/icones/base/vent 735,530 30x30 3}
${font URW Chancery L:style=Bold:size=14}${voffset -65}${goto 555}${color yellow}${template1 Nuit_VentDirP 3} ${template1 Nuit_VentForce 3}km/h${goto 690}${template1 Nuit_VentDirP 3} ${template1 Nuit_VentRafales 3}km/h
${color ffe595}${hr 2}${font}
###PRÉVISIONS SIMPLIFIÉES RESTE DE LA SEMAINE###
###AFFICHAGE DES JOURS###
${font Radio Space:style=Bold:size=24}${color yellow}${alignc}RESTE DE LA SEMAINE
${voffset -15}${color ffe595}${hr 2}
${voffset -20}${font URW Chancery L:style=Bold:size=16}${color6}${goto 40}${template2 Jour %A 4}${goto 260}${template2 Jour %A 5}${goto 480}${template2 Jour %A 6}${goto 700}${template2 Jour %A 7}
###AFFICHAGE DES ICONES###
${template2 Jour_IconeM ~/conky/meteo+lune/icones/base 0,680 70x42 4}
${template2 Jour_IconeM ~/conky/meteo+lune/icones/base 220,680 70x42 5}
${template2 Jour_IconeM ~/conky/meteo+lune/icones/base 440,680 70x42 6}
${template2 Jour_IconeM ~/conky/meteo+lune/icones/base 655,680 70x42 7}
###AFFICHAGE DES TEMPERATURES###
${voffset -80}${goto 35}${color1}Mini : ${color red}${template1 Nuit_Temp 4}°${goto 250}${color1}Mini : ${color red}${template1 Nuit_Temp 5}°${goto 470}${color1}Mini : ${color red}${template1 Nuit_Temp 6}°${goto 690}${color1}Mini : ${color red}${template1 Nuit_Temp 7}°
${voffset -10}${goto 35}${color1}Maxi : ${color lightblue}${template1 Jour_Temp 4}°${goto 250}${color1}Maxi : ${color lightblue}${template1 Jour_Temp 5}°${goto 470}${color1}Maxi : ${color lightblue}${template1 Jour_Temp 6}°${goto 690}${color1}Maxi : ${color lightblue}${template1 Jour_Temp 7}°
${image ~/conky/meteo+lune/icones/base/jour/ho.png -p 0,737 -s 30x18}
${image ~/conky/meteo+lune/icones/base/jour/ho.png -p 215,737 -s 30x18}
${image ~/conky/meteo+lune/icones/base/jour/ho.png -p 435,737 -s 30x18}
${image ~/conky/meteo+lune/icones/base/jour/ho.png -p 655,737 -s 30x18}
${image ~/conky/meteo+lune/icones/base/jour/co.png -p 0,720 -s 30x18}
${image ~/conky/meteo+lune/icones/base/jour/co.png -p 215,720 -s 30x18}
${image ~/conky/meteo+lune/icones/base/jour/co.png -p 435,720 -s 30x18}
${image ~/conky/meteo+lune/icones/base/jour/co.png -p 655,720 -s 30x18}
###AFFICHAGE DES CONDITIONS###
${voffset -240}${font Arial:size=10}${color3}${template1 Jour_CondMeteo1se 4}${goto 250}${template1 Jour_CondMeteo1se 5}${goto 470}${template1 Jour_CondMeteo1se 6}${goto 690}${template1 Jour_CondMeteo1se 7}
${template1 Jour_CondMeteo2se 4}${goto 250}${template1 Jour_CondMeteo2se 5}${goto 470}${template1 Jour_CondMeteo2se 6}${goto 690}${template1 Jour_CondMeteo2se 7}
###AFFICHAGE DU VENT###
${template2 Jour_IconeV ~/conky/meteo+lune/icones/base/vent 60,685 30x30 4}
${template2 Jour_IconeV ~/conky/meteo+lune/icones/base/vent 280,685 30x30 5}
${template2 Jour_IconeV ~/conky/meteo+lune/icones/base/vent 500,685 30x30 6}
${template2 Jour_IconeV ~/conky/meteo+lune/icones/base/vent 720,685 30x30 7}
${voffset -170}${font URW Chancery L:style=Bold:size=14}${color ffe595}${goto 100}${template1 Jour_VentForce 4}km/h${goto 320}${template1 Jour_VentForce 5}km/h${goto 540}${template1 Jour_VentForce 6}km/h${goto 760}${template1 Jour_VentForce 7}km/h
###AFFICHAGE PRECIPITATIONS###
${voffset 80}PRECIPITATIONS${goto 220}PRECIPITATIONS${goto 440}PRECIPITATIONS${goto 660}PRECIPITATIONS
${image ~/conky/meteo+lune/icones/base/pluie.png -p 0,820 -s 20x20}
${image ~/conky/meteo+lune/icones/base/neige.png -p 40,845 -s 20x20}
${image ~/conky/meteo+lune/icones/base/pluie.png -p 220,820 -s 20x20}
${image ~/conky/meteo+lune/icones/base/neige.png -p 260,845 -s 20x20}
${image ~/conky/meteo+lune/icones/base/pluie.png -p 440,820 -s 20x20}
${image ~/conky/meteo+lune/icones/base/neige.png -p 480,845 -s 20x20}
${image ~/conky/meteo+lune/icones/base/pluie.png -p 660,820 -s 20x20}
${image ~/conky/meteo+lune/icones/base/neige.png -p 700,845 -s 20x20}
${voffset -202}${color1}${goto 40}${template1 Jour_QPluie 4}mm${goto 260}${template1 Jour_QPluie 5}mm${goto 480}${template1 Jour_QPluie 6}mm${goto 700}${template1 Jour_QPluie 7}mm
${goto 80}${template1 Jour_QNeige 4}cm${goto 300}${template1 Jour_QNeige 5}cm${goto 520}${template1 Jour_QNeige 6}cm${goto 740}${template1 Jour_QNeige 7}cm
Deux petites remarques :
Désolé, mais le temps reste au sec sur Marseille. C'est pourquoi les chiffres de précipitations restent à '0'.
Mais j'ai testé avec d'autres adresses. Si la pluie ou la neige tombent chez vous, les chiffres se mettront bien à jour.
Pour ce conky, j'ai rajouté 4 icônes : Lever, coucher de soleil, pluie, neige.
Donc si vous le lancez tel quel, vous aurez un message d'erreur, mais pas l'affichage.
Si vous êtes intéressés, voici les 4 icônes en question :
http://ubuntuone.com/2yMVkGmhQVbtzJvaBbLgG7
Je les ai placé, par souci de simplicité, dans l'arborescence suivante : ~/conky/meteo+lune/icones/base/. Si cela ne vous va pas, ne pas oublier de changer le chemin dans le conky.
Je vais maintenant pouvoir passer à la migration des baromètres et barographes, puis adapter tout cela à l'affichage sur mon netbook, qui va me demander de tout remettre en forme, car l'écran est beaucoup plus petit :lol: