enebre a écrit- Didier-T - Phyllinux - Serait-ce pas moins lourd d'avoir un conky séparé pour les images et qui pourrait être appelé dans la config à l'installation du premier ? Un peu comme un train auquel on ajoute des wagons, je pense à ça parce que je retrouve bien souvent les mêmes commande d'un conky à l'autre.
edit : non ça doit être une bétise, je sors :/
Dans cet ordre d'idée, j'ai fait un petit conky, qui donne cela :
Lancement des infos météo, puis lancement de l'image SAT. Impérativement dans cet ordre, sinon, le conky image recouvre le texte et cela laisse une bande qui masque le texte qui est en dessous.
Pour le moment, en test, ce sont juste 2 conkys lancés séparément, mais cela peut sans problème être automatisé.
Un aperçu de ce que cela donne :
J'en ai profité pour nettoyer un peu le conky, en refaisant un peu la mise en forme, alignement des données, etc... ainsi qu'en changeant quelques valeurs de Probabilité de Pluie au lieu de Probabilité d'Orage.
Le nouveau code conky :
background yes
# 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_inner_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_middle
#alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 0
gap_y 10
#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=repertoir icones \3=position \4=taille \5=jour (pour les prévisions) #
template3 ${lua Lune_\1}
lua_load ~/conky/script/meteo.lua
lua_startup_hook init ~/conky/script/meteo.cfg
# stuff after 'TEXT' will be formatted on screen
TEXT
#### Lancement du script récupérant les données météo ####
${template1 Maj}
####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, Visibilité et Pluie####
${font URW Chancery L:style=Bold:size=16}${color ffe595}PT. DE ROSEE${goto 230}VISIBILITE${goto 430}PLUIE
${voffset -15}${font URW Chancery L:style=Bold:size=26}${color1}${goto 35}${template1 Rose}°C${goto 240}${template1 Visibilite} km${goto 430}${template1 QPrec} mm
####Affichage Icônes Temps et Vent####
${template2 IconeM ~/conky/meteo/icones 80,165 250x150}
${template2 IconeV ~/conky/meteo/icones/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 302}${blink ${template1 TempAct}°}${else}${color white}${goto 302}${template1 TempAct}°${endif}
####Affichage Conditions Actuelles####
${voffset -30}${goto 135}${font URW Chancery L:style=Bold:size=22}${color Lightblue}${template1 CondMeteo}
####Affichage Cadre####
${goto 40}${font Radio Space:style=Bold:size=24}${color yellow}JOUR${goto 230}SOIR${goto 400}LUNE
####Affichage Titres####
${voffset -15}${font URW Chancery L:style=Bold:size=12}${color ffe595}AUBE${goto 77}T°MAX${goto 134}PLUIE${goto 190}COUCHER${goto 265}T°MIN${goto 320}PLUIE${goto 390}PHASE${goto 460}VISIBLE
####Affichage Icônes####
${image ~/conky/meteo/icones/Lever.png -p 0,475 -s 45x45}
${image ~/conky/meteo/icones/jour/ho.png -p 50,475 -s 50x30}
${image ~/conky/meteo/icones/Coucher.png -p 180,475 -s 45x45}
${image ~/conky/meteo/icones/jour/co.png -p 235,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 75}${template1 Jour_Temp 1}°C${goto 135}${voffset -40}${color Red}${template1 Jour_ProbPrec}%${voffset 40}${goto 130}${color1}${template1 Jour_QPluie 1}mm
####Affichage Données Nuit####
${voffset -30}${goto 190}${font URW Chancery L:style=Bold:size=18}${color ffe595}${template1 HCoucherSoleil}:${template1 MCoucherSoleil}${color1}${goto 260}${template1 Nuit_Temp 1}°C${goto 315}${voffset -40}${color Red}${template1 Nuit_ProbPrec}%${voffset 40}${goto 315}${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}
${voffset -30}${font Radio Space:style=Bold:size=16}${color yellow}HISTORIQUE A-1 : ${color ffe595}${template1 Histo_Max 1}°C ${color }/ ${color1}${template1 Histo_Min 1}°C
####Prévisions 48H####
####J+1####
${voffset -425}${goto 575}${font URW Chancery L:style=Bold:size=16}${color6}${template2 Jour %A_%d_%B_%Y 2}
###Jour###
${template2 Jour_IconeM ~/conky/meteo/icones 510,170 70x42 2}
${voffset -30}${goto 585}${color red}${template1 Jour_Temp 2}°${color1} Pluie:${template1 Jour_ProbPrec 2}% - ${template1 Jour_QPluie 2}mm
${voffset -10}${goto 550}${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/icones/vent 580,223 30x30 2}
${template2 Jour_IconeR ~/conky/meteo/icones/vent 735,223 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/icones 510,268 70x42 2}
${voffset -20}${goto 585}${color lightblue}${template1 Nuit_Temp 2}°${color1} Pluie:${template1 Jour_ProbPrec 2}% - ${template1 Jour_QPluie 2}mm
${voffset -10}${goto 550}${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/icones/vent 580,313 30x30 2}
${template2 Nuit_IconeR ~/conky/meteo/icones/vent 735,313 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/icones 510,390 70x42 3}
${voffset -30}${goto 585}${color red}${template1 Jour_Temp 3}°${color1} Pluie:${template1 Jour_ProbPrec 3}% - ${template1 Jour_QPluie 3}mm
${voffset -10}${goto 550}${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/icones/vent 580,437 30x30 3}
${template2 Jour_IconeR ~/conky/meteo/icones/vent 735,437 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/icones 510,483 70x42 2}
${voffset -20}${goto 585}${color lightblue}${template1 Nuit_Temp 3}°${color1} Pluie:${template1 Jour_ProbPrec 3}% - ${template1 Jour_QPluie 3}mm
${voffset -10}${goto 550}${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/icones/vent 580,530 30x30 3}
${template2 Nuit_IconeR ~/conky/meteo/icones/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 -28}${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/icones 0,667 70x42 4}
${template2 Jour_IconeM ~/conky/meteo/icones 220,667 70x42 5}
${template2 Jour_IconeM ~/conky/meteo/icones 440,667 70x42 6}
${template2 Jour_IconeM ~/conky/meteo/icones 655,667 70x42 7}
###AFFICHAGE DES TEMPERATURES###
${voffset -88}${goto 40}${color1}Mini : ${color lightblue}${template1 Nuit_Temp 4}°${goto 255}${color1}Mini : ${color lightblue}${template1 Nuit_Temp 5}°${goto 475}${color1}Mini : ${color lightblue}${template1 Nuit_Temp 6}°${goto 695}${color1}Mini : ${color lightblue}${template1 Nuit_Temp 7}°
${voffset -10}${goto 40}${color1}Maxi : ${color red}${template1 Jour_Temp 4}°${goto 255}${color1}Maxi : ${color red}${template1 Jour_Temp 5}°${goto 475}${color1}Maxi : ${color red}${template1 Jour_Temp 6}°${goto 695}${color1}Maxi : ${color red}${template1 Jour_Temp 7}°
${image ~/conky/meteo/icones/jour/ho.png -p 0,720 -s 30x18}
${image ~/conky/meteo/icones/jour/ho.png -p 215,720 -s 30x18}
${image ~/conky/meteo/icones/jour/ho.png -p 435,720 -s 30x18}
${image ~/conky/meteo/icones/jour/ho.png -p 655,720 -s 30x18}
${image ~/conky/meteo/icones/jour/co.png -p 0,702 -s 30x18}
${image ~/conky/meteo/icones/jour/co.png -p 215,702 -s 30x18}
${image ~/conky/meteo/icones/jour/co.png -p 435,702 -s 30x18}
${image ~/conky/meteo/icones/jour/co.png -p 655,702 -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/icones/vent 60,672 30x30 4}
${template2 Jour_IconeV ~/conky/meteo/icones/vent 280,672 30x30 5}
${template2 Jour_IconeV ~/conky/meteo/icones/vent 500,672 30x30 6}
${template2 Jour_IconeV ~/conky/meteo/icones/vent 720,672 30x30 7}
${voffset -170}${font URW Chancery L:style=Bold:size=14}${color ffe595}${goto 110}${template1 Jour_VentForce 4}km/h${goto 330}${template1 Jour_VentForce 5}km/h${goto 550}${template1 Jour_VentForce 6}km/h${goto 770}${template1 Jour_VentForce 7}km/h
###AFFICHAGE PRECIPITATIONS###
${voffset 80}PRECIPITATIONS${goto 220}PRECIPITATIONS${goto 440}PRECIPITATIONS${goto 660}PRECIPITATIONS
${image ~/conky/meteo/icones/pluie.png -p 0,800 -s 20x20}
${image ~/conky/meteo/icones/neige.png -p 40,820 -s 20x20}
${image ~/conky/meteo/icones/pluie.png -p 220,800 -s 20x20}
${image ~/conky/meteo/icones/neige.png -p 260,820 -s 20x20}
${image ~/conky/meteo/icones/pluie.png -p 440,800 -s 20x20}
${image ~/conky/meteo/icones/neige.png -p 480,820 -s 20x20}
${image ~/conky/meteo/icones/pluie.png -p 660,800 -s 20x20}
${image ~/conky/meteo/icones/neige.png -p 700,820 -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
${voffset -7}${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
Attention, le choix du fond d'écran est primordial, sinon, le conky devient très mal lisible.
@ ragamatrix :
Effectivement je vais essayer le script images multiples.
Cela pourrait correspondre à une partie du besoin.
Reste après la gestion du choix des images et la gestion de leur affichage en fonction du choix... 😉