Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#751 Le 02/09/2013, à 16:07

daniel38100

Re : [Conky] Alternative à weather.com (3)

Didier-T a écrit :
daniel38100 a écrit :
Didier-T a écrit :

tu as raison, j'avais mal lu la question.
en fait, j'avais même oublié la notification.
il faut commenter les lignes 351 et 352 avec un # en début de ligne dans recmeteo.py
après modification :

        if notifi == "oui":
            if heure-dem == 0:
                mess=notify2.Notification('Recmeteo.py  v'+Version, 'Météo : mise à jour complète terminée\n en '+str(round(duree,2))+' secondes', 'dialog-information')
#            else:
#                mess=notify2.Notification('Recmeteo.py  v'+Version, 'Météo : mise à jour partielle terminée\n en '+str(round(duree,2))+' secondes', 'dialog-information')
            mess.show()

en faite ça va pas quand  il y a les mise à jour partielle ça me met quand même la notification mais en MAJ complète.

J'ai oublié une incrémentation

        if notifi == "oui":
            if heure-dem == 0:
                mess=notify2.Notification('Recmeteo.py  v'+Version, 'Météo : mise à jour complète terminée\n en '+str(round(duree,2))+' secondes', 'dialog-information')
#            else:
#                mess=notify2.Notification('Recmeteo.py  v'+Version, 'Météo : mise à jour partielle terminée\n en '+str(round(duree,2))+' secondes', 'dialog-information')
                mess.show()

ben tu me dira j'connais pas trop le python j'connais que le ruby et le c++ j'ai pas trop le temps en ce moment d'étudier ton script si  tu peut me faire la modif ce serait sympa mais c'est un détail pas urgent du tout wink

Dernière modification par daniel38100 (Le 02/09/2013, à 17:33)

Hors ligne

#752 Le 02/09/2013, à 18:03

Didier-T

Re : [Conky] Alternative à weather.com (3)

@daniel38100,
La modif est faite, j'ai ajouter les 4 espaces qui manquaient.

Hors ligne

#753 Le 02/09/2013, à 18:57

loutch

Re : [Conky] Alternative à weather.com (3)

Hello Didier-T

loutch,
sa ne fonctionne pas, car tu n'as toujours pas le BS4, pour python3

oui il ne fonctionne pas sur  mageia3 même avec la mise à jour ,pour python il y aurait la version 3 dans Mageia 4 et ne fonctionne plus sur mageia2 car  il ni a que la  2.7 et chez les mayas je viens de mettre bs4 et python3  il fonctionne au poil .
Encore merci .
@+

Dernière modification par loutch (Le 03/09/2013, à 10:34)

Hors ligne

#754 Le 02/09/2013, à 19:32

daniel38100

Re : [Conky] Alternative à weather.com (3)

Didier-T a écrit :

@daniel38100,
La modif est faite, j'ai ajouter les 4 espaces qui manquaient.

ah ok j'avais pas saisie
merci à toi

Hors ligne

#755 Le 02/09/2013, à 23:00

oOMaverickOo

Re : [Conky] Alternative à weather.com (3)

Bonsoir,

J'ai installé conky fond d'écran et tout s'est bien passé mais malheureusement l'affichage est tassé :

ax6x.png

J'ai tenté d'utiliser la solution mentionné dans le post 53 malheureusement, une fois les changement effectué je n'ai plus que la photo de l'image satellite d'affiché.

Je tourne sous ubuntu 12.04.3 - 64bits Kernel 3.5.0-39 et mon écran est un 1920x1080

Quelqu'un a t'il une solution ?

Dernière modification par oOMaverickOo (Le 02/09/2013, à 23:03)


2 Xubuntu 14.04.x / 1 Windows 8.1
Membre April N°9016

"We all change. When you think about it, we are all different people, all through our lives. And that's ok, that's good, you gotta keep moving, so long as you remember all the people that you used to be. I will not forget one line of this. Not one day...I swear. I will always remember when the Doctor was me"

Hors ligne

#756 Le 03/09/2013, à 16:19

jeje2a

Re : [Conky] Alternative à weather.com (3)

salut, bon alors aujourd'hui c'est un autre genre de problème, en rapport avec la mise à jour:

jeje@jeje-System-Product-Name:~$ conky -c /home/jeje/.conky/conky-meteo/meteo/conkyrc
Conky: /home/jeje/.conky/conky-meteo/meteo/conkyrc: 18: config file error
Conky: forked to background, pid is 13399
jeje@jeje-System-Product-Name:~$ 
Conky: desktop window (1400061) is subwindow of root window (be)
Conky: window type - normal
Conky: drawing to created window (0x3a00002)
Conky: drawing to double buffer
	version = v1.09
	web = http://www.accuweather.com/fr/fr/ajaccio/132932/weather-forecast/132932
	Pévision Nb jours = 5 
	Pévision Matin = non
	Pévision Après Midi = oui
	Pévision Soirée = non
	Pévision Nuit = oui
	Prévision sur 8 heures = non
	nbFoisHuit= 1
	Délais = 15
	Chemin de travail = /tmp
	Palier = 20
	Chemin de sauvegarde = /home/jeje/.conky/conky-meteo/meteo/reptravail
	Chemin script = /home/jeje/.conky/conky-meteo/meteo_lua_2/scripts
	Notification = non
	ID = 13399
Condition courante Ok
Prévision 1 Ok
Apres Midi 1 Ok
Nuit 1 Ok
Prévision 2 Ok
Apres Midi 2 Ok
Nuit 2 Ok
Prévision 3 Ok
Apres Midi 3 Ok
Nuit 3 Ok
Prévision 4 Ok
Apres Midi 4 Ok
Nuit 4 Ok
Prévision 5 Ok
Apres Midi 5 Ok
Nuit 5 Ok
Version = 1.30
lunaison Ok
Jour 1 Ok
AM 1 Ok
Nuit 1 Ok
Jour 2 Ok
AM 2 Ok
Nuit 2 Ok
Jour 3 Ok
AM 3 Ok
Nuit 3 Ok
Jour 4 Ok
AM 4 Ok
Nuit 4 Ok
Traceback (most recent call last):
  File "/home/jeje/.conky/conky-meteo/meteo_lua_2/scripts/recmeteo.py", line 384, in <module>
    demonise(ent, nb1, nb2, huitHeures, nbJour, interval, nbFoisHuit, Id, demon)
  File "/home/jeje/.conky/conky-meteo/meteo_lua_2/scripts/recmeteo.py", line 327, in demonise
    traitement(ent+nb1+'/daily-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Jour"+str(x), repsauv)
  File "/home/jeje/.conky/conky-meteo/meteo_lua_2/scripts/recmeteo.py", line 174, in traitement
    infs=inf[1].get_text().split("\n")
IndexError: list index out of range
Conky: received SIGINT or SIGTERM to terminate. bye!

config. actuelle : MSI Z270 Gaming pro Carbon - Intel Core i7 7700K 4,2GHZ - MSI GeForce GTX 1070 ti 8Go -        
Ballistix Tactical 2x8 Go

Hors ligne

#757 Le 05/09/2013, à 15:10

daniel38100

Re : [Conky] Alternative à weather.com (3)

oOMaverickOo a écrit :

Bonsoir,

J'ai installé conky fond d'écran et tout s'est bien passé mais malheureusement l'affichage est tassé :

http://img689.imageshack.us/img689/1056/ax6x.png

J'ai tenté d'utiliser la solution mentionné dans le post 53 malheureusement, une fois les changement effectué je n'ai plus que la photo de l'image satellite d'affiché.

Je tourne sous ubuntu 12.04.3 - 64bits Kernel 3.5.0-39 et mon écran est un 1920x1080

Quelqu'un a t'il une solution ?

ça c'est un problème de résolution d'écran dans le fichier macompo.sh

Hors ligne

#758 Le 05/09/2013, à 17:44

oOMaverickOo

Re : [Conky] Alternative à weather.com (3)

daniel38100 a écrit :
oOMaverickOo a écrit :

Bonsoir,

J'ai installé conky fond d'écran et tout s'est bien passé mais malheureusement l'affichage est tassé :

http://img689.imageshack.us/img689/1056/ax6x.png

J'ai tenté d'utiliser la solution mentionné dans le post 53 malheureusement, une fois les changement effectué je n'ai plus que la photo de l'image satellite d'affiché.

Je tourne sous ubuntu 12.04.3 - 64bits Kernel 3.5.0-39 et mon écran est un 1920x1080

Quelqu'un a t'il une solution ?

ça c'est un problème de résolution d'écran dans le fichier macompo.sh

Non, j'ai déjà modifié ce fichier sans succès.


2 Xubuntu 14.04.x / 1 Windows 8.1
Membre April N°9016

"We all change. When you think about it, we are all different people, all through our lives. And that's ok, that's good, you gotta keep moving, so long as you remember all the people that you used to be. I will not forget one line of this. Not one day...I swear. I will always remember when the Doctor was me"

Hors ligne

#759 Le 05/09/2013, à 18:42

daniel38100

Re : [Conky] Alternative à weather.com (3)

oOMaverickOo a écrit :
daniel38100 a écrit :
oOMaverickOo a écrit :

Bonsoir,

J'ai installé conky fond d'écran et tout s'est bien passé mais malheureusement l'affichage est tassé :

http://img689.imageshack.us/img689/1056/ax6x.png

J'ai tenté d'utiliser la solution mentionné dans le post 53 malheureusement, une fois les changement effectué je n'ai plus que la photo de l'image satellite d'affiché.

Je tourne sous ubuntu 12.04.3 - 64bits Kernel 3.5.0-39 et mon écran est un 1920x1080

Quelqu'un a t'il une solution ?

ça c'est un problème de résolution d'écran dans le fichier macompo.sh

Non, j'ai déjà modifié ce fichier sans succès.

#!/bin/bash

##########################################
#        Crée par JPDipsy v2             #
#  Dépend de recmeteo et meteo           #
#                V2.0                    #
##################################################
#                                                # 
#destination="/tmp/test.png"                     #    
source $meteo_rep/scripts/meteo $meteo_config $2 # entêtes obligatoires
if [ "$start" = "non" ] ;then exit;fi            # dans votre fichier
##################################################

# L'appel des variables doit être encadré de $(.....)
# exemple:  $(CC ville) 
# les quelques autres tel Ver_meteo
# exemple: $Ver_meteo
# L'appel des modules prédéfinis est direct tel que :
# nom condition type dim opacité
# ex: rose CC vent 120x120 100
# modules: rose , barometre ,thermorond
#
#------------------ Variables que vous pouvez modifier ------------------------

fonte=Helvetica-LT-Std-Bold			 # fonte generique 
fonte1=URW-Chancery-Medium-Italic    # fonte ville
fonte2=Times-Bold
fonte3=Monaco-Regular
fonte4=Monaco-Bold
fonte5=SV-Basic-Manual-book
fonte6=Splendid-66-Regular	
fonte7=Bitstream-Vera-Sans-Mono-Bold # fonte cond act
fonte8=Arrows-Regular
# couleur texte					 
couleur1="white" 
couleur2="orange"
couleur3="cyan"
couleur4="yellow"
couleur5="#C16600"
couleur6="orangered"
couleur7="aqua"
couleur8="red"
couleur9="orangered"	 
# couleurs paliers temp
coultemp1="blue4"
coultemp2="dodgerblue1"
coultemp3="yellow"
coultemp4="white"
coultemp5="springgreen"
coultemp6="red"
coultemp7="black"
# couleurs paliers vent
coulvent1="orange"
coulvent2="dodgerblue1"
coulvent3="yellow"
coulvent4="white"
coulvent5="#0EAF00"
coulvent6="red"
coulvent7="blue"
coulvent8="gold"
coulvent9="black"
coulvent10="#00003F"

# Décalage depuis haut de l'ecran ex + 50 pour descendre -10 pour monter
decalagehaut=10

# taille du cartouche ville jouez sur l'echelle pour des grands noms de ville
# ex 100 taille normal  50 taille moitié
max=12
caracville=$(echo $(CC ville)|wc -m)
if [ "$caracville" -gt "$max" ];then
taille_ville=40
else
taille_ville=100
fi
###############################################################################
#                                                                             #
#                                                                             #
#-----------------------------------Calendrier 1------------------------------#
#                                                                             #
#                                                                             #
###############################################################################
samedi="SAM"
dimanche="DIM"
function calendar
{
if [[ $cale1 = `echo ${calen1[30]}` ]] ; then 
coul3=$coulvent6
elif [[ `echo $cale1 | cut -c1-3`  = `echo $dimanche` ]] ; then 
coul3=$coulvent1
elif [[ `echo $cale1 | cut -c1-3`  = `echo $samedi` ]] ; then 
coul3=$coulvent3
else coul3=$coulvent7
fi
if [ $cale1 = `echo ${calen1[30]}` ] ; then 
fonts1=18
else fonts1=16
fi
if [ $cale1 = `echo ${calen1[30]}` ] ; then 
pos13=1
else pos13=0
fi
if [[ $cale1 = `echo ${calen1[30]}` ]] ; then 
coul4=$coulvent8
elif [[ `echo $cale1 | cut -c1-3`  = `echo $dimanche` ]] ; then 
coul4=$coulvent10
elif [[ `echo $cale1 | cut -c1-3`  = `echo $samedi` ]] ; then 
coul4=$coulvent10
else coul4=$coultemp7
fi
}

# Cartouche Calendar 2 --------------------------------------------------------

convert -size 1890x100 xc:none  -fill none  $imagetemp
# Prévisions HuitHeure --------------------------------------------------------
dep1=7 ; pos12=23

calen1[0]=`date +%^a%d%^b --date '-30 days'`
calen1[1]=`date +%^a%d%^b --date '-29 days'`
calen1[2]=`date +%^a%d%^b --date '-28 days'`
calen1[3]=`date +%^a%d%^b --date '-27 days'`
calen1[4]=`date +%^a%d%^b --date '-26 days'`
calen1[5]=`date +%^a%d%^b --date '-25 days'`
calen1[6]=`date +%^a%d%^b --date '-24 days'`
calen1[7]=`date +%^a%d%^b --date '-23 days'`
calen1[8]=`date +%^a%d%^b --date '-22 days'`
calen1[9]=`date +%^a%d%^b --date '-21 days'`
calen1[10]=`date +%^a%d%^b --date '-20 days'`
calen1[11]=`date +%^a%d%^b --date '-19 days'`
calen1[12]=`date +%^a%d%^b --date '-18 days'`
calen1[13]=`date +%^a%d%^b --date '-17 days'`
calen1[14]=`date +%^a%d%^b --date '-16 days'`
calen1[15]=`date +%^a%d%^b --date '-15 days'`
calen1[16]=`date +%^a%d%^b --date '-14 days'`
calen1[17]=`date +%^a%d%^b --date '-13 days'`
calen1[18]=`date +%^a%d%^b --date '-12 days'`
calen1[19]=`date +%^a%d%^b --date '-11 days'`
calen1[20]=`date +%^a%d%^b --date '-10 days'`
calen1[21]=`date +%^a%d%^b --date '-9 days'`
calen1[22]=`date +%^a%d%^b --date '-8 days'`
calen1[23]=`date +%^a%d%^b --date '-7 days'`
calen1[24]=`date +%^a%d%^b --date '-6 days'`
calen1[25]=`date +%^a%d%^b --date '-5 days'`
calen1[26]=`date +%^a%d%^b --date '-4 days'`
calen1[27]=`date +%^a%d%^b --date '-3 days'`
calen1[28]=`date +%^a%d%^b --date '-2 days'`
calen1[29]=`date +%^a%d%^b --date '-1 days'`
calen1[30]=`date +%^a%d%^b --date '0 days'`
calen1[31]=`date +%^a%d%^b --date '+1 days'`
calen1[32]=`date +%^a%d%^b --date '+2 days'`
calen1[33]=`date +%^a%d%^b --date '+3 days'`
calen1[34]=`date +%^a%d%^b --date '+4 days'`
calen1[35]=`date +%^a%d%^b --date '+5 days'`
calen1[36]=`date +%^a%d%^b --date '+6 days'`
calen1[37]=`date +%^a%d%^b --date '+7 days'`
calen1[38]=`date +%^a%d%^b --date '+8 days'`
calen1[39]=`date +%^a%d%^b --date '+9 days'`
calen1[40]=`date +%^a%d%^b --date '+10 days'`
calen1[41]=`date +%^a%d%^b --date '+11 days'`
calen1[42]=`date +%^a%d%^b --date '+12 days'`
calen1[43]=`date +%^a%d%^b --date '+13 days'`
calen1[44]=`date +%^a%d%^b --date '+14 days'`
calen1[45]=`date +%^a%d%^b --date '+15 days'`
calen1[46]=`date +%^a%d%^b --date '+16 days'`
calen1[47]=`date +%^a%d%^b --date '+17 days'`
calen1[48]=`date +%^a%d%^b --date '+18 days'`
calen1[49]=`date +%^a%d%^b --date '+19 days'`
calen1[50]=`date +%^a%d%^b --date '+20 days'`
calen1[51]=`date +%^a%d%^b --date '+21 days'`
calen1[52]=`date +%^a%d%^b --date '+22 days'`
calen1[53]=`date +%^a%d%^b --date '+23 days'`
calen1[54]=`date +%^a%d%^b --date '+24 days'`
calen1[55]=`date +%^a%d%^b --date '+25 days'`
calen1[56]=`date +%^a%d%^b --date '+26 days'`
calen1[57]=`date +%^a%d%^b --date '+27 days'`
calen1[58]=`date +%^a%d%^b --date '+28 days'`
calen1[59]=`date +%^a%d%^b --date '+29 days'`
calen1[60]=`date +%^a%d%^b --date '+30 days'`
calen1[61]=`date +%^a%d%^b --date '+31 days'`
calen1[62]=`date +%^a%d%^b --date '+32 days'`
calen1[63]=`date +%^a%d%^b --date '+33 days'`
calen1[64]=`date +%^a%d%^b --date '+34 days'`
calen1[65]=`date +%^a%d%^b --date '+35 days'`
calen1[66]=`date +%^a%d%^b --date '+36 days'`
calen1[67]=`date +%^a%d%^b --date '+37 days'`
calen1[68]=`date +%^a%d%^b --date '+38 days'`
calen1[69]=`date +%^a%d%^b --date '+39 days'`
calen1[70]=`date +%^a%d%^b --date '+40 days'`
calen1[71]=`date +%^a%d%^b --date '+41 days'`
calen1[72]=`date +%^a%d%^b --date '+42 days'`
calen1[73]=`date +%^a%d%^b --date '+43 days'`
calen1[74]=`date +%^a%d%^b --date '+44 days'`
calen1[75]=`date +%^a%d%^b --date '+45 days'`
calen1[76]=`date +%^a%d%^b --date '+46 days'`
calen1[77]=`date +%^a%d%^b --date '+47 days'`
calen1[78]=`date +%^a%d%^b --date '+48 days'`
calen1[79]=`date +%^a%d%^b --date '+49 days'`
calen1[80]=`date +%^a%d%^b --date '+50 days'`
calen1[81]=`date +%^a%d%^b --date '+51 days'`



for (( x=0 ; x<80 ; x++ ));do
cale1=`echo ${calen1[x]}`;calendar
echo ${calen1[x]} | sed 's/é/E/g' | tr '.' '\012' | cut -c1-2 |\
convert -background none -fill $coul3 -font $fonte3 -pointsize $fonts1 -gravity center    label:@- -trim \
\( +clone -background $coul4  -shadow 100x1 -channel A -level 0,7% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity west -background transparent -geometry +$(((pos12*x-pos13)+dep1))+2 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
done
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background none -shadow 100x2 \) -compose DstOver -composite -compose Over $reptemp/calendar.png
# position de 0 à ce que vous voulez pour aligner avec une autre fonte
# ex : -10 pour descendre +10 pour remonter
position_ville=0

# ville -----------------------------------------------------------------------
convert -background transparent -font $fonte1  -pointsize 80 -fill dodgerblue  label:"$(CC ville)" \
\( +clone -background  Darkblue -shadow 120x1+2+2 \)  +swap -background transparent -compose over -layers merge +repage  \
 $imagetemp
convert $imagetemp  -channel A  -blur 0x4 +channel  -fill skyblue  -colorize 0% $imagetemp1
convert  -size 700x120 xc:transparent $imagetemp1 -background transparent -gravity center -geometry +0-0  -composite \
$imagetemp -background transparent -gravity center  -composite $reptemp/ville.png
# mise en forme ville
convert -resize $taille_ville% $reptemp/ville.png $reptemp/ville.png

#creation des images alerte et conditions + mise à l'échelle
#cond
im_cond=$(cond_cart CC 400 "$fonte2" centre red);convert "$im_cond" -resize 65% "$im_cond"
# alertes
im_alerte=$(alerte_cart 600 "$fonte2" centre yellow ico);convert "$im_alerte" -resize 45% "$im_alerte"

# temperatures ----------------------------------------------------------------
function coultemp
{
if  (($temp < -5 )); then
coul=$coultemp1
elif (($temp < 1 && $temp > -6 )); then
coul=$coultemp2
elif (($temp < 6 && $temp > 0)); then
coul=$coultemp3
elif (($temp < 20 && $temp > 5 )); then
coul=$coultemp4
elif (($temp < 25 && $temp > 19 )); then
coul=$coultemp5
elif (($temp > 24 )); then
coul=$coultemp6
else coul=$coultemp7
fi
}
# vent -------------------------------------------------------------------------
function coulvent
{
if  (($vent < 1 )); then 
coul1=$coulvent4
elif (( $vent < 11 && $vent > 0 )); then
coul1=$coulvent5
elif (($vent < 21 && $vent > 10)); then
coul1=$coulvent3
elif (($vent < 31 && $vent > 20 )); then
coul1=$coulvent1
elif (($vent < 61 && $vent > 30 )); then
coul1=$coulvent6
elif (($vent > 60 )); then
coul1=$coulvent7
else coul1=$coulvent7
fi
}

function risqueverglas
{
verglas="non"
if  (($temp < 5 )); then
verglas="oui"
fi
}

temp=$(CC temp) ; coultemp
convert -background transparent  -font $fonte  -pointsize 26 -fill $coul label:"$temp °" $reptemp/max.png
temp=$(CC ressent) ;risqueverglas; coultemp
convert -background transparent  -font $fonte  -pointsize 14 -fill $couleur1 label:"/" -fill $coul label:"r.$temp°" +append   $reptemp/ress.png
temp=$(prev_jour 1 tmpmax ) ; coultemp
convert -background transparent  -font Helvetica-LT-Std-Bold  -pointsize 14 -fill $couleur1 label:"Max : " -fill $coul label:"$temp °" +append $reptemp/max1.png

# temp la plus basse
function plusbas
{
if (("$temp1" < "$bas")); then
bas="$temp1"
fi
}

temp="$(CC temp)";temp1="$(CC ressent)";bas="$temp";plusbas
temp1="$(prev_quart Nuit 1 ressentmin)";plusbas
temp=$bas;risqueverglas; coultemp
convert -background transparent  -font Helvetica-LT-Std-Bold  -pointsize 14 -fill $couleur1 label:"+Bas : " -fill $coul label:"$temp °" +append $reptemp/min.png
#-------------------------------------
convert  -size 120x120 xc:transparent \
$reptemp/max.png -background transparent -gravity  NorthEast -geometry +56+4 -composite \
$reptemp/ress.png -background transparent -gravity  Northwest -geometry +50+13 -composite \
$reptemp/max1.png -background transparent -gravity North -geometry +0+31 -composite \
$reptemp/min.png -background transparent -gravity North -geometry +0+49 -composite \
$reptemp/temps.png
rm $reptemp/max.png ;rm $reptemp/max1.png ; rm $reptemp/ress.png ;rm $reptemp/min.png

# Historique ------------------------------------------------------------------
convert $reptemp/temps.png -background transparent -gravity North -font $fonte  -pointsize 13 -fill $couleur1 \
-annotate +0+72 "Historique" \
-pointsize 16 -fill $couleur1 -annotate +0+107  "$(prev_jour 1 tmpmaxlast)° / $(prev_jour 1 tmpminlast)°"  $reptemp/temps.png
# incruste année --------------------------------------------------------------
an=`date +"%Y"`
convert -background transparent -fill $couleur2 -font $fonte -stroke black -pointsize 18  label:"$[$an-1]" $imagetemp
composite -compose Over -gravity  North -geometry +0+87 -dissolve 40,95  $imagetemp  $reptemp/temps.png $reptemp/temps.png
convert $reptemp/temps.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over  $reptemp/temps.png

# icone conditions actuel
convert  $(CC ico) -resize 60% -bordercolor None -border 20x20 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over $reptemp/ico_cond.png
#creation cartouche -----------------------------------------------------------
convert -size 180x135 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,1 179,134 5,5" $imagetemp

# données meteo cartouche 1 ---------------------------------------------------
#prochaine M.a.j
heure=$heure_maint
if (( `echo ${heure:0:1}` == 0 ));then  heure=`echo ${heure:1:1}` ; fi
update=$((interval * 60))
mins=$min_maint
if (( `echo ${mins:0:1}` == 0 ));then  mins=`echo ${mins:1:1}` ; fi
secact=$(($heure*3600+$mins*60))
proch=$(($update+$secact))
resproch=`printf "%02dh%02d" $(($proch/3600))  $(($proch/60%60))`

bord=10 ;pos1=88 ;pos2=95 ;posdepart=10 ;ecart=12

for (( x=1 ; x<10 ; x++ ));do
    convert $imagetemp -background transparent -gravity Northwest -font $fonte -pointsize 11 -fill $couleur1 \
    -annotate +$pos1+$(((ecart*x)+posdepart)) ":" \
    $imagetemp
done
# Tendance pression ------------------------------------------------------------
tendpress=$(CC tendpression)
if [ "$tendpress" == "hausse" ];then tpos=-3;tend="c";convert  -background none  -font $fonte8 -fill $coultemp3 -size x25  -gravity center label:"$tend"  $reptemp/tend.png
elif [ "$tendpress" == "baisse" ];then tpos=-3;tend="d";convert  -background none -font $fonte8 -fill $coultemp3 -size x25  -gravity center label:"$tend"  $reptemp/tend.png
else
tpos=0;tend="~\n~";convert -interline-spacing -13 -background none  -fill $coultemp3 -size x27 -gravity North label:"$tend"  $reptemp/tend.png
fi

if [ "$verglas" = "oui" ];then
convert $imagetemp -background transparent \
-gravity Northwest -font $fonte -pointsize 11 -fill $couleur1 -annotate +$bord+$posdepart "Prob. Précip." -annotate +$pos1+$posdepart ":" -annotate +$pos2+$posdepart "$(prev_jour 1 precip) %" \
-annotate +$bord+$(((ecart*1)+posdepart)) "Humidité" -annotate +$pos2+$(((ecart*1)+posdepart)) "$(CC humid) %" \
-annotate +$bord+$(((ecart*2)+posdepart)) "Pression-Tend" -annotate +$pos2+$(((ecart*2)+posdepart)) "$(CC pression) mb  --" \
-annotate +$bord+$(((ecart*3)+posdepart)) "Pluie / Neige" -annotate +$pos2+$(((ecart*3)+posdepart)) "$(prev_jour 1 pluie) mm / $(prev_jour 1 neige) cm" \
-annotate +$bord+$(((ecart*4)+posdepart)) "Verglas" -annotate +$pos2+$(((ecart*4)+posdepart)) "$(prev_jour 1 verglas) mm" \
-annotate +$bord+$(((ecart*5)+posdepart)) "Visibilité" -annotate +$pos2+$(((ecart*5)+posdepart)) "$(CC visib) km U.V : $(CC uv)" \
-annotate +$bord+$(((ecart*6)+posdepart)) "Levé - Couché" -annotate +$pos2+$(((ecart*6)+posdepart)) "$(prev_jour 1 sollever)-$(prev_jour 1 solcouch)" \
-annotate +$bord+$(((ecart*7)+posdepart)) "Durée du jour" -annotate +$pos2+$(((ecart*7)+posdepart)) "$(prev_jour 1 solduree)" \
-annotate +$bord+$(((ecart*8)+posdepart)) "Mise à jour à" -annotate +$pos2+$(((ecart*8)+posdepart)) "$maint" \
-annotate +$bord+$(((ecart*9)+posdepart)) "Prochaine   à" -annotate +$pos2+$(((ecart*9)+posdepart)) "$resproch" \
$imagetemp
convert $imagetemp $reptemp/tend.png -background transparent -gravity NorthEast -geometry +10+$((28+$tpos)) -composite $imagetemp
else
convert $imagetemp -background transparent \
-gravity Northwest -font $fonte -pointsize 11 -fill $couleur1 -annotate +$bord+$posdepart "Prob. Précip." -annotate +$pos1+$posdepart ":" -annotate +$pos2+$posdepart "$(prev_jour 1 precip) %" \
-annotate +$bord+$(((ecart*1)+posdepart)) "Humidité" -annotate +$pos2+$(((ecart*1)+posdepart)) "$(CC humid) %" \
-annotate +$bord+$(((ecart*2)+posdepart)) "Pression-Tend" -annotate +$pos2+$(((ecart*2)+posdepart)) "$(CC pression) mb  --" \
-annotate +$bord+$(((ecart*3)+posdepart)) "Pluie " -annotate +$pos2+$(((ecart*3)+posdepart)) "$(prev_jour 1 pluie) mm " \
-annotate +$bord+$(((ecart*4)+posdepart)) "Visibilité" -annotate +$pos2+$(((ecart*4)+posdepart)) "$(CC visib) km" \
-annotate +$bord+$(((ecart*5)+posdepart)) "U.V" -annotate +$pos2+$(((ecart*5)+posdepart)) "$(CC uv)" \
-annotate +$bord+$(((ecart*6)+posdepart)) "Levé - Couché" -annotate +$pos2+$(((ecart*6)+posdepart)) "$(prev_jour 1 sollever)-$(prev_jour 1 solcouch)" \
-annotate +$bord+$(((ecart*7)+posdepart)) "Durée du jour" -annotate +$pos2+$(((ecart*7)+posdepart)) "$(prev_jour 1 solduree)" \
-annotate +$bord+$(((ecart*8)+posdepart)) "Mise à jour à" -annotate +$pos2+$(((ecart*8)+posdepart)) "$maint" \
-annotate +$bord+$(((ecart*9)+posdepart)) "Prochaine   à" -annotate +$pos2+$(((ecart*9)+posdepart)) "$resproch" \
$imagetemp
convert $imagetemp $reptemp/tend.png -background transparent -gravity NorthEast -geometry +10+$((28+$tpos)) -composite $imagetemp
fi
# ombres cartouche -------------------------------------------------------------
convert $imagetemp -bordercolor None -border 10x10 \( +clone -background black -shadow 100x2 \) \
-compose DstOver -composite -compose Over $reptemp/actuel.png
# versions ---------------------------------------------------------------------
#
versionrecmeteo=`echo $vrecmeteo | cut -c2-5`
convert -background none -fill orange -font $fonte -pointsize 10 \
label:"Meteo v-$Ver_meteo Recmeteo v-$versionrecmeteo" -trim \
\( +clone -background grey19  -shadow 100x1 -channel A -level 0,5% +channel \) +swap +repage -gravity center -composite $reptemp/versions.png

# Prévisions semaine 1 ------------------------------------------------------
convert -size 200x266 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,199,265,5,5" $imagetemp
# Prévisions ------------------------------------------------------------------
echo -n "Prévisions" | sed 's/./&@/g; s/@$//' | tr '@' '\012' |\
convert -background none -fill blue -font $fonte2 -pointsize 14 -gravity center    label:@- -trim \
\( +clone -background skyblue  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity west -background transparent -geometry +4+0 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
rot=353 ; pos1=23 ; pos2=138 ; pos3=145 ; posdepart=20 ; posdepart1=37 ;ecart=35
# Tableaux jours - vent dir - vent force
ventd[1]=$(prev_jour 2 vent);ventd[2]=$(prev_jour 3 vent);ventd[3]=$(prev_jour 4 vent)
ventd[4]=$(prev_jour 5 vent);ventd[5]=$(prev_jour 6 vent);ventd[6]=$(prev_jour 7 vent)
ventd[7]=$(prev_jour 8 vent)
ventf[1]=$(prev_jour 2 vent_force);ventf[2]=$(prev_jour 3 vent_force);ventf[3]=$(prev_jour 4 vent_force)
ventf[4]=$(prev_jour 5 vent_force);ventf[5]=$(prev_jour 6 vent_force);ventf[6]=$(prev_jour 7 vent_force)
ventf[7]=$(prev_jour 8 vent_force)
for (( x=1 ; x<8 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur2 \
-annotate +$((pos1))+$(((ecart*x-ecart)+posdepart)) "$(date --date "$x day" +%a%d|sed -e 's/\(.\{1\}\)/\U\1/')" \
-annotate +$((pos2))+$(((ecart*x-ecart)+posdepart)) "${ventd[x]}" $imagetemp
vent=${ventf[x]};coulvent
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $coul1 \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*x-ecart)+posdepart1)) "${ventf[x]} km/h" $imagetemp
done
# températures -----------------------------------------------------------------
# positionnement du /
for (( x=0 ; x<7 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur1 \
-annotate +$((pos1+18))+$(((ecart*x)+posdepart1)) "/" $imagetemp
done
# temp max jour/nuit
tempjour[1]=$(prev_jour 2 temp);tempjour[2]=$(prev_jour 3 temp);tempjour[3]=$(prev_jour 4 temp)
tempjour[4]=$(prev_jour 5 temp);tempjour[5]=$(prev_jour 6 temp);tempjour[6]=$(prev_jour 7 temp)
tempjour[7]=$(prev_jour 8 temp)
tempnuit[1]=$(prev_jour 2 nuit_temp);tempnuit[2]=$(prev_jour 3 nuit_temp);tempnuit[3]=$(prev_jour 4 nuit_temp)
tempnuit[4]=$(prev_jour 5 nuit_temp);tempnuit[5]=$(prev_jour 6 nuit_temp);tempnuit[6]=$(prev_jour 7 nuit_temp)
tempnuit[7]=$(prev_jour 8 nuit_temp)

for (( x=1 ; x<8 ; x++ ));do
temp=${tempnuit[x]};coultemp
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11  -fill $coul \
-annotate +$((pos1+22))+$(((ecart*x-ecart)+posdepart1)) "${tempnuit[x]}°" $imagetemp
temp=${tempjour[x]};coultemp
convert $imagetemp -background transparent -gravity Northeast -font $fonte  -pointsize 11  -fill $coul \
-annotate +157+$(((ecart*x-ecart)+posdepart1)) "${tempjour[x]}°" $imagetemp
done

# icones ----------------------------------------------------------------------
tailleic=51x30 ; pos=55 ; tailleic1=30x30 ; pos1=105 ; posdepart=17
icond[1]=$(prev_jour 2 ico);icond[2]=$(prev_jour 3 ico);icond[3]=$(prev_jour 4 ico)
icond[4]=$(prev_jour 5 ico);icond[5]=$(prev_jour 6 ico);icond[6]=$(prev_jour 7 ico)
icond[7]=$(prev_jour 8 ico)
ivent[1]=$(prev_jour 2 icovent);ivent[2]=$(prev_jour 3 icovent);ivent[3]=$(prev_jour 4 icovent);
ivent[4]=$(prev_jour 5 icovent);ivent[5]=$(prev_jour 6 icovent);ivent[6]=$(prev_jour 7 icovent)
ivent[7]=$(prev_jour 8 icovent)
for (( x=1 ; x<8 ; x++ ));do
convert $imagetemp ${icond[x]} -background transparent -geometry $tailleic+$pos+$(((ecart*x-ecart)+posdepart)) -composite \
${ivent[x]} -background transparent -geometry $tailleic1+$pos1+$(((ecart*x-ecart)+posdepart)) -composite $imagetemp
done

# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/previsions.png
# cartouche semaine 2 ---------------------------------------------------------
convert -size 200x266 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,199,265,5,5" $imagetemp
# Prévisions ------------------------------------------------------------------
echo -n "Prévisions" | sed 's/./&@/g; s/@$//' | tr '@' '\012' |\
convert -background none -fill blue -font $fonte2 -pointsize 14 -gravity center    label:@- -trim \
\( +clone -background skyblue  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity west -background transparent -geometry +4+0 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
rot=353 ; pos1=23 ; pos2=138 ; pos3=145 ; posdepart=20 ; posdepart1=37 ;ecart=35
# Tableaux jours - vent dir - vent force
ventd[8]=$(prev_jour 9 vent);ventd[9]=$(prev_jour 10 vent);ventd[10]=$(prev_jour 11 vent)
ventd[11]=$(prev_jour 12 vent);ventd[12]=$(prev_jour 13 vent);ventd[13]=$(prev_jour 14 vent)
ventd[14]=$(prev_jour 15 vent)
ventf[8]=$(prev_jour 9 vent_force);ventf[9]=$(prev_jour 10 vent_force);ventf[10]=$(prev_jour 11 vent_force)
ventf[11]=$(prev_jour 12 vent_force);ventf[12]=$(prev_jour 13 vent_force);ventf[13]=$(prev_jour 14 vent_force)
ventf[14]=$(prev_jour 15 vent_force)
for (( x=8 ; x<15 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur2 \
-annotate +$((pos1))+$(((ecart*x-(ecart*8))+posdepart)) "$(date --date "$x day" +%a%d|sed -e 's/\(.\{1\}\)/\U\1/')" \
-annotate +$((pos2))+$(((ecart*x-(ecart*8))+posdepart)) "${ventd[x]}" $imagetemp
vent=${ventf[x]};coulvent
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $coul1 \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*x-(ecart*8))+posdepart1)) "${ventf[x]} km/h" $imagetemp
done
# températures -----------------------------------------------------------------
# positionnement du /
for (( x=0 ; x<7 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur1 \
-annotate +$((pos1+18))+$(((ecart*x)+posdepart1)) "/" $imagetemp
done
# temp max jour/nuit
tempjour[8]=$(prev_jour 9 temp);tempjour[9]=$(prev_jour 10 temp);tempjour[10]=$(prev_jour 11 temp)
tempjour[11]=$(prev_jour 12 temp);tempjour[12]=$(prev_jour 13 temp);tempjour[13]=$(prev_jour 14 temp)
tempjour[14]=$(prev_jour 15 temp)
tempnuit[8]=$(prev_jour 9 nuit_temp);tempnuit[9]=$(prev_jour 10 nuit_temp);tempnuit[10]=$(prev_jour 11 nuit_temp)
tempnuit[11]=$(prev_jour 12 nuit_temp);tempnuit[12]=$(prev_jour 13 nuit_temp);tempnuit[13]=$(prev_jour 14 nuit_temp)
tempnuit[14]=$(prev_jour 15 nuit_temp)

for (( x=8 ; x<15 ; x++ ));do
temp=${tempnuit[x]};coultemp
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11  -fill $coul \
-annotate +$((pos1+22))+$(((ecart*x-(ecart*8))+posdepart1)) "${tempnuit[x]}°" $imagetemp
temp=${tempjour[x]};coultemp
convert $imagetemp -background transparent -gravity Northeast -font $fonte  -pointsize 11  -fill $coul \
-annotate +157+$(((ecart*x-(ecart*8))+posdepart1)) "${tempjour[x]}°" $imagetemp
done

# icones ----------------------------------------------------------------------
tailleic=51x30 ; pos=55 ; tailleic1=30x30 ; pos1=105 ; posdepart=17
icond[8]=$(prev_jour 9 ico);icond[9]=$(prev_jour 10 ico);icond[10]=$(prev_jour 11 ico)
icond[11]=$(prev_jour 12 ico);icond[12]=$(prev_jour 13 ico);icond[13]=$(prev_jour 14 ico)
icond[14]=$(prev_jour 15 ico)
ivent[8]=$(prev_jour 9 icovent);ivent[9]=$(prev_jour 10 icovent);ivent[10]=$(prev_jour 11 icovent);
ivent[11]=$(prev_jour 12 icovent);ivent[12]=$(prev_jour 13 icovent);ivent[13]=$(prev_jour 14 icovent)
ivent[14]=$(prev_jour 15 icovent)
for (( x=8 ; x<15 ; x++ ));do
convert $imagetemp ${icond[x]} -background transparent -geometry $tailleic+$pos+$(((ecart*x-(ecart*8))+posdepart)) -composite \
${ivent[x]} -background transparent -geometry $tailleic1+$pos1+$(((ecart*x-(ecart*8))+posdepart)) -composite $imagetemp
done

# -----------------------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/previsions3.png
#huit heures ------------------------------------------------------------------
# Prévisions cartouche huitHeures  -------------------------------------------------
convert -size 200x310 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,199,309,5,5" $imagetemp
#-------------------------------------------------------------------------------
convert -background none -fill $coultemp3 -font $fonte2 -pointsize 12 -gravity center    label:"à huit heures" \
\( +clone -background black  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity North -background transparent -geometry +0+10 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
#-------------------------------------------------------------------------------
rot=353 ; pos1=10 ; pos2=138 ; pos3=145 ; posdepart=65 ; posdepart1=82 ;ecart=35
# Tableaux jours - vent dir - vent force ---------------------------------------

ventd[0]=$(prev_huit 1 vent);ventd[1]=$(prev_huit 2 vent);ventd[2]=$(prev_huit 3 vent);ventd[3]=$(prev_huit 4 vent)
ventd[4]=$(prev_huit 5 vent);ventd[5]=$(prev_huit 6 vent);ventd[6]=$(prev_huit 7 vent);ventd[7]=$(prev_huit 8 vent)
ventf[0]=$(prev_huit 1 vent_force);ventf[1]=$(prev_huit 2 vent_force);ventf[2]=$(prev_huit 3 vent_force);ventf[3]=$(prev_huit 4 vent_force)
ventf[4]=$(prev_huit 5 vent_force);ventf[5]=$(prev_huit 6 vent_force);ventf[6]=$(prev_huit 7 vent_force);ventf[7]=$(prev_huit 8 vent_force)

for (( x=0 ; x<8 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur2 \
-annotate +$((pos1))+$(((ecart*x-ecart)+posdepart)) "$(date --date "$x hour" +%H|sed -e 's/\(.\{1\}\)/\U\1/') heure" \
-annotate +$((pos2))+$(((ecart*x-ecart)+posdepart)) "${ventd[x]}" $imagetemp
vent=${ventf[x]};coulvent
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $coul1 \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*x-ecart)+posdepart1)) "${ventf[x]} km/h" $imagetemp
done

# températures -----------------------------------------------------------------

tempjour[0]=$(prev_huit 1 temp);tempjour[1]=$(prev_huit 2 temp);tempjour[2]=$(prev_huit 3 temp);tempjour[3]=$(prev_huit 4 temp)
tempjour[4]=$(prev_huit 5 temp);tempjour[5]=$(prev_huit 6 temp);tempjour[6]=$(prev_huit 7 temp);tempjour[7]=$(prev_huit 8 temp)


for (( x=0 ; x<8 ; x++ ));do
temp=${tempjour[x]};coultemp 
convert $imagetemp -background transparent -gravity Northeast -font $fonte  -pointsize 11  -fill $coul \
-annotate +157+$(((ecart*x-ecart)+posdepart1)) "${tempjour[x]}°C" $imagetemp
done

# icones ----------------------------------------------------------------------
tailleic=51x30 ; pos=55 ; tailleic1=30x30 ; pos1=105 ; posdepart=60
icond[0]=$(prev_huit 1 ico);icond[1]=$(prev_huit 2 ico);icond[2]=$(prev_huit 3 ico);icond[3]=$(prev_huit 4 ico)
icond[4]=$(prev_huit 5 ico);icond[5]=$(prev_huit 6 ico);icond[6]=$(prev_huit 7 ico);icond[7]=$(prev_huit 8 ico)
ivent[0]=$(prev_huit 1 icovent);ivent[1]=$(prev_huit 2 icovent);ivent[2]=$(prev_huit 3 icovent);ivent[3]=$(prev_huit 4 icovent);
ivent[4]=$(prev_huit 5 icovent);ivent[5]=$(prev_huit 6 icovent);ivent[6]=$(prev_huit 7 icovent);ivent[7]=$(prev_huit 8 icovent)
for (( x=0 ; x<8 ; x++ ));do
convert $imagetemp ${icond[x]} -background transparent -geometry $tailleic+$pos+$(((ecart*x-ecart)+posdepart)) -composite \
${ivent[x]} -background transparent -geometry $tailleic1+$pos1+$(((ecart*x-ecart)+posdepart)) -composite $imagetemp
done

# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/huitheures1.png
####################################################################################
# Prévisions cartouche douzeheure  -------------------------------------------------
convert -size 200x310 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,199,309,5,5" $imagetemp
#-------------------------------------------------------------------------------
convert -background none -fill $coultemp3 -font $fonte2 -pointsize 12 -gravity center    label:"à seize heures" \
\( +clone -background black  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity North -background transparent -geometry +0+10 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
#-------------------------------------------------------------------------------
rot=353 ; pos1=10 ; pos2=138 ; pos3=145 ; posdepart=65 ; posdepart1=82 ;ecart=35
# Tableaux jours - vent dir - vent force ---------------------------------------

ventd[0]=$(prev_huit 9 vent);ventd[1]=$(prev_huit 10 vent);ventd[2]=$(prev_huit 11 vent);ventd[3]=$(prev_huit 12 vent)
ventd[4]=$(prev_huit 13 vent);ventd[5]=$(prev_huit 14 vent);ventd[6]=$(prev_huit 15 vent);ventd[7]=$(prev_huit 16 vent)
ventf[0]=$(prev_huit 9 vent_force);ventf[1]=$(prev_huit 10 vent_force);ventf[2]=$(prev_huit 11 vent_force);ventf[3]=$(prev_huit 12 vent_force)
ventf[4]=$(prev_huit 13 vent_force);ventf[5]=$(prev_huit 14 vent_force);ventf[6]=$(prev_huit 15 vent_force);ventf[7]=$(prev_huit 16 vent_force)

for (( x=0 ; x<8 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur2 \
-annotate +$((pos1))+$(((ecart*x-ecart)+posdepart)) "$(date --date "$((x+8)) hour" +%H|sed -e 's/\(.\{1\}\)/\U\1/') heure" \
-annotate +$((pos2))+$(((ecart*x-ecart)+posdepart)) "${ventd[x]}" $imagetemp
vent=${ventf[x]};coulvent
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $coul1 \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*x-ecart)+posdepart1)) "${ventf[x]} km/h" $imagetemp
done

# températures -----------------------------------------------------------------

tempjour[0]=$(prev_huit 9 temp);tempjour[1]=$(prev_huit 10 temp);tempjour[2]=$(prev_huit 11 temp);tempjour[3]=$(prev_huit 12 temp)
tempjour[4]=$(prev_huit 13 temp);tempjour[5]=$(prev_huit 14 temp);tempjour[6]=$(prev_huit 15 temp);tempjour[7]=$(prev_huit 16 temp)


for (( x=0 ; x<8 ; x++ ));do
temp=${tempjour[x]};coultemp 
convert $imagetemp -background transparent -gravity Northeast -font $fonte  -pointsize 11  -fill $coul \
-annotate +157+$(((ecart*x-ecart)+posdepart1)) "${tempjour[x]}°C" $imagetemp
done

# icones ----------------------------------------------------------------------
tailleic=51x30 ; pos=55 ; tailleic1=30x30 ; pos1=105 ; posdepart=60
icond[0]=$(prev_huit 9 ico);icond[1]=$(prev_huit 10 ico);icond[2]=$(prev_huit 11 ico);icond[3]=$(prev_huit 12 ico)
icond[4]=$(prev_huit 13 ico);icond[5]=$(prev_huit 14 ico);icond[6]=$(prev_huit 15 ico);icond[7]=$(prev_huit 16 ico)
ivent[0]=$(prev_huit 9 icovent);ivent[1]=$(prev_huit 10 icovent);ivent[2]=$(prev_huit 11 icovent);ivent[3]=$(prev_huit 12 icovent);
ivent[4]=$(prev_huit 13 icovent);ivent[5]=$(prev_huit 14 icovent);ivent[6]=$(prev_huit 15 icovent);ivent[7]=$(prev_huit 16 icovent)
for (( x=0 ; x<8 ; x++ ));do
convert $imagetemp ${icond[x]} -background transparent -geometry $tailleic+$pos+$(((ecart*x-ecart)+posdepart)) -composite \
${ivent[x]} -background transparent -geometry $tailleic1+$pos1+$(((ecart*x-ecart)+posdepart)) -composite $imagetemp
done

# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/huitheures2.png
# nettoyage -------------------------------------------------------------------
rm $imagetemp1; rm $imagetemp

# Prévisions à 2 heure  ------------------------------------------------------
convert -size 200x200 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,199,85,5,5" $imagetemp
convert -background none -fill $coultemp3 -font $fonte2 -pointsize 12 -gravity center    label:"à deux heures" \
\( +clone -background black  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity North -background transparent -geometry +0+10 -dissolve 65% $imagetemp1   $imagetemp $imagetemp

# verif pluie ou neige
if [ "$(prev_huit 2 neige)" != "0" ]||[ "$(prev_huit 3 neige)" != "0" ];then titre="Neige";precip1="$( prev_huit 2 neige) %";precip2="$( prev_huit 3 neige) %"
elif [ "$(prev_huit 2 pluie)" != "0" ]||[ "$(prev_huit 3 pluie)" != "0" ];then titre="Pluie";precip1="$( prev_huit 2 pluie) %";precip2="$( prev_huit 3 pluie) %"
else
 titre="Precip.";precip1="0 %";precip2="0 %"
fi

convert $imagetemp -background transparent \
-gravity Northeast -font $fonte -pointsize 11 -fill $couleur1 \
-annotate +84+30 "à         C°           Vent" -annotate +10+30 "$titre" \
-annotate +170+50 "$(prev_huit 2 heure) h" -annotate +140+50 "$(prev_huit 2 temp)°" -annotate +108+50 "$(prev_huit 2 vent)" -annotate +50+50 "$(prev_huit 2 vent_force) km/h" -annotate +8+50 "$precip1" \
-annotate +170+70 "$(prev_huit 3 heure) h" -annotate +140+70 "$(prev_huit 3 temp)°" -annotate +108+70 "$(prev_huit 3 vent)" -annotate +50+70 "$(prev_huit 3 vent_force) km/h" -annotate +8+70 "$precip2" \
$imagetemp
# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/previsions2.png
################################################################################
#-------- Infos_Pratiques --------------------------------------------------------
convert -size 203x148 xc:none -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,1 202,147 5,5" $imagetemp
# -----------------------------------------------------------------------------
name=`uname -n`
convert -background none -fill $coultemp3 -font $fonte -pointsize 16 -gravity center    label:$name \
\( +clone -background black  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity North -background transparent -geometry +0+5 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
# ------------------------------------------------------------------------------
bord=10 ;pos1=85 ;pos2=95 ;posdepart=14 ;ecart=13 ;posdepart1=12 ;posdepart2=15

gmail=`perl $meteo_rep/scripts/extra/gmail.pl n`
hotmail=`perl $meteo_rep/scripts/extra/hotmail.pl`
iplocal=`ifconfig |  grep adr:192 | cut -c20-31`
ippublic=` wget -q -O - checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'`
kernel=`uname -r`
mac=`ifconfig | grep HWaddr | cut -c39-55`
distrib=`lsb_release -i | cut -c17-22`
version=`lsb_release -r | cut -c10-14`
codename=`lsb_release -c | cut -c11-20`
fetes=`sh $meteo_rep/scripts/extra/Saints.sh`
for (( x=1 ; x<10 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte -pointsize 15 -fill $couleur1 \
-annotate +$pos1+$(((ecart*x)+posdepart1)) ":" \
$imagetemp
done

convert $imagetemp -background transparent \
-gravity Northwest -font $fonte -pointsize 11 -fill $couleur1 \
-annotate +$bord+$(((ecart*1)+posdepart)) "Distribution" -annotate +$pos2+$(((ecart*1)+posdepart2)) "$distrib" \
-annotate +$bord+$(((ecart*2)+posdepart)) "version" -annotate +$pos2+$(((ecart*2)+posdepart2)) "$version $codename" \
-annotate +$bord+$(((ecart*3)+posdepart)) "Kernel" -annotate +$pos2+$(((ecart*3)+posdepart2)) "$kernel" \
-annotate +$bord+$(((ecart*4)+posdepart)) "IP local" -annotate +$pos2+$(((ecart*4)+posdepart2)) "$iplocal" \
-annotate +$bord+$(((ecart*5)+posdepart)) "IP public" -annotate +$pos2+$(((ecart*5)+posdepart2)) "$ippublic" \
-annotate +$bord+$(((ecart*6)+posdepart)) "MAC" -annotate +$pos2+$(((ecart*6)+posdepart2)) "$mac" \
-annotate +$bord+$(((ecart*7)+posdepart)) "Gmail " -annotate +$pos2+$(((ecart*7)+posdepart2)) "$gmail message(s)" \
-annotate +$bord+$(((ecart*8)+posdepart)) "Hotmail " -annotate +$pos2+$(((ecart*8)+posdepart2)) "$hotmail message(s)" \
-annotate +$bord+$(((ecart*9)+posdepart)) "Saints " -annotate +$pos2+$(((ecart*9)+posdepart2)) "$fetes" \
$imagetemp

# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/Infos-pratiques.png

################################################################################
########BarographTemp############
convert -size 352x190 xc:none  -fill none -strokewidth 1 -stroke firebrick3 -draw "roundrectangle 1,1 351,189 5,5" $imagetemp
#############Titre#####
convert -background none -fill $coultemp3 -font $fonte1 -pointsize 20 -gravity center label:"Pression et Température" \
\( +clone -background black  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity North -background transparent -geometry +0+0 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
#####
bord=315 ;pos1=40 ;pos2=305 ;posdepart=42 ;ecart=28
$meteo_rep/scripts/extra/barognuplot.sh &&

for (( x=1 ; x<4 ; x++ ));do
convert $imagetemp -background transparent \
$meteo_rep/images/graph2.png -background transparent -gravity North -geometry -5+18 -composite \
-gravity Northeast -font $fonte -pointsize 11 -fill green2 -annotate +$bord+$posdepart "40C°-"  -fill red -gravity Northwest -annotate +$pos2+$posdepart "-1040mb" \
-fill green2 -gravity Northeast -annotate +$bord+$(((ecart*1)+posdepart)) "20C°-" -fill red -gravity Northwest -annotate +$pos2+$(((ecart*1)+posdepart)) "-1020mb" \
-fill green2 -gravity Northeast -annotate +$bord+$(((ecart*2)+posdepart)) "0C°-" -fill red -gravity Northwest -annotate +$pos2+$(((ecart*2)+posdepart)) "-1000mb" \
-fill green2 -gravity Northeast -annotate +$bord+$(((ecart*3)+posdepart)) "-20C°-" -fill red -gravity Northwest -annotate +$pos2+$(((ecart*3)+posdepart)) "-980mb" \
-fill green2 -gravity Northeast -annotate +$bord+$(((ecart*4)+posdepart)) "-40C°-" -fill red -gravity Northwest -annotate +$pos2+$(((ecart*4)+posdepart)) "-960mb" \
$imagetemp
done



# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/BaroGraph.png
rm $imagetemp;rm $imagetemp1
# lunaison --------------------------------------------------------------------
lunaison 200x200 100
convert $reptemp/lunaison.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over  $reptemp/lunaison.png

# lune info
convert -size 130x130 xc:transparent $reptemp/Lune.png -gravity center -geometry 60x60+0+0 -composite $reptemp/lune.png
convert -background none -fill blue -font $fonte2 -pointsize 13 -gravity center    label:"$(lune ephe)" -trim \
\( +clone -background skyblue  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp
convert -background none -fill white -font $fonte2 -pointsize 15 -gravity center    label:"$(lune age) j" \
\( +clone -background  black -shadow 120x1+4+4 \)  +swap -background transparent -compose over -layers merge +repage  \
$imagetemp1
composite  -gravity center -background transparent -geometry +0+40 $imagetemp $reptemp/lune.png $reptemp/lune.png


# fabrication  des modules prêt à l'emplois ##########################################################################
barometre 200x200 100 hr
#  ombre baro
convert $reptemp/Barometre_hr.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over  $reptemp/Barometre_hr.png

# rose des vents --------------------------------------------------------------
# creation rose
rose CC vent 120x120 100
convert $reptemp/Rose-CC.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over  $reptemp/Rose-CC.png
thermorond CC 200x200 100 ver
thermorond CC 200x200 100 rou
convert $reptemp/CC_thermver.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over \
$reptemp/CC_thermrou.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over \
$reptemp/CC-therm.png
#####################################################################################
# mise à l'echelle du fond
# si vous rencontrez des difficulté avec la détection automatique du format de votre
# environnement vous pouvez forcer en decommentant la ligne suivante
ecran=1920x1080  # vous pouvez choisir votre format d'ecran
convert -resize $ecran! $fondbase $fondbase
# pour réglage positionnement si besoin jouez sur  les nombre de -geometry -210+$((10+decalagehaut))
# -geometry ±posdroitegauche±hautbas
# assemblage final des différentes parties toujours de l'image de  base vers l'image finale
# l'image finale se retrouve dans le rep fonds
#
#

convert $fondbase \
$reptemp/imagesat-couvnuage.png -background transparent -gravity North  -geometry -25+$((240+decalagehaut)) -composite \
$reptemp/ico_cond.png -background transparent -gravity North  -geometry -210+$((0+decalagehaut)) -composite \
$reptemp/ville.png -background transparent -gravity North  -geometry +0+$((-10+decalagehaut)) -composite \
$reptemp/lune.png  -background transparent -gravity North  -geometry +205+$((0+decalagehaut)) -composite \
$im_cond -background transparent -gravity center  -geometry +0-$((410+decalagehaut)) -composite \
$im_alerte -background transparent -gravity center  -geometry +325+$((185+decalagehaut)) -composite \
$reptemp/temps.png -background transparent -gravity North  -geometry -62+$((110+decalagehaut)) -composite \
$reptemp/Rose-CC.png -background transparent -gravity North  -geometry +38+$((118+decalagehaut)) -composite \
$reptemp/actuel.png -background transparent -gravity North  -geometry -200+$((120+decalagehaut)) -composite \
$reptemp/previsions.png -background transparent -gravity North  -geometry +205+$((115+decalagehaut)) -composite \
$reptemp/previsions3.png -background transparent -gravity North  -geometry +410+$((115+decalagehaut)) -composite \
$reptemp/versions.png -background transparent -gravity North  -geometry -200+$((115+decalagehaut)) -composite \
$reptemp/lunaison.png -background transparent -gravity North  -geometry -300+$((300+decalagehaut)) -composite \
$reptemp/calendar.png -background transparent -gravity North  -geometry +50+$((985+decalagehaut)) -composite \
$reptemp/huitheures1.png -background transparent -gravity North  -geometry +205+$((381+decalagehaut)) -composite \
$reptemp/huitheures2.png -background transparent -gravity North  -geometry +410+$((381+decalagehaut)) -composite \
$reptemp/Infos-pratiques.png -background transparent -gravity North -geometry +849+$((50+decalagehaut)) -composite \
$reptemp/BaroGraph.png -background transparent -gravity North -geometry -600+$((700+decalagehaut)) -composite \
$reptemp/Barometre_hr.png -background transparent -gravity North -geometry -300+$((500+decalagehaut)) -composite \
$reptemp/CC-therm.png -background transparent -gravity North -geometry -500+$((500+decalagehaut)) -composite \
$imagefinale
####################################################################################
# obligatoire pour afficher le fond d'ecran
affichage
exit

remplace macompositon.sh par ça j'ai eu le même problème que toi
ya surement quelques details à modifier pour toi tien moi au courant

Dernière modification par daniel38100 (Le 05/09/2013, à 18:47)

Hors ligne

#760 Le 05/09/2013, à 19:01

oOMaverickOo

Re : [Conky] Alternative à weather.com (3)

Merci pour ton aide, c'est largement mieux : il reste la partie en haut à droite qui foire un peu, le cadre pression et température qui se balade et le nom de ma ville qui est un poils caché.

1378400221.png
Sinon la ligne bleu en bas est-elle normale ?

ljere: merci de mettre en miniature

Dernière modification par ljere (Le 05/09/2013, à 20:43)


2 Xubuntu 14.04.x / 1 Windows 8.1
Membre April N°9016

"We all change. When you think about it, we are all different people, all through our lives. And that's ok, that's good, you gotta keep moving, so long as you remember all the people that you used to be. I will not forget one line of this. Not one day...I swear. I will always remember when the Doctor was me"

Hors ligne

#761 Le 05/09/2013, à 20:04

ragamatrix

Re : [Conky] Alternative à weather.com (3)

salut daniel38100 et oOMaverickOo
Je ne sais pas si c'est la solution mais j'ai aussi un 1920x1080 et je crois me rappeler que dans une compo j'avais mis

# Décalage depuis haut de l'ecran ex + 50 pour descendre -10 pour monter
decalagehaut=50

# taille du cartouche ville jouez sur l'echelle pour des grands noms de ville
# ex 100 taille normal  50 taille moitié
max=9 

Maintenant ma compo n'a plus rien à voir mais MERCI à jpdipsy et Didier-T pour leur travail car les vacances sont passées et les scripts tournent toujours cool
1378379430.png

Hors ligne

#762 Le 05/09/2013, à 22:40

daniel38100

Re : [Conky] Alternative à weather.com (3)

oOMaverickOo a écrit :

Merci pour ton aide, c'est largement mieux : il reste la partie en haut à droite qui foire un peu, le cadre pression et température qui se balade et le nom de ma ville qui est un poils caché.

http://pix.toile-libre.org/upload/img/1378400221.png
Sinon la ligne bleu en bas est-elle normale ?

ljere: merci de mettre en miniature

la ligne bleu a la base est un calendrier
supprime les ligne 759 et 760

$reptemp/Infos-pratiques.png -background transparent -gravity North -geometry +849+$((50+decalagehaut)) -composite \
$reptemp/BaroGraph.png -background transparent -gravity North -geometry -600+$((700+decalagehaut)) -composite \

pour la ville faut voir a partir de la ligne 67

# taille du cartouche ville jouez sur l'echelle pour des grands noms de ville
# ex 100 taille normal  50 taille moitié
max=12
caracville=$(echo $(CC ville)|wc -m)
if [ "$caracville" -gt "$max" ];then
taille_ville=40
else
taille_ville=100
fi

tu change en

# taille du cartouche ville jouez sur l'echelle pour des grands noms de ville
# ex 100 taille normal  50 taille moitié
max=12
caracville=$(echo $(CC ville)|wc -m)
if [ "$caracville" -gt "$max" ];then
taille_ville=40 ; decalageville=60
else
taille_ville=100 ; decalageville=10
fi

et ça doit donner
1378415114.png
le fichier complet macomposition.sh modifier pour toi

#!/bin/bash

##########################################
#        Crée par JPDipsy v2             #
#  Dépend de recmeteo et meteo           #
#                V2.0                    #
##################################################
#                                                # 
#destination="/tmp/test.png"                     #    
source $meteo_rep/scripts/meteo $meteo_config $2 # entêtes obligatoires
if [ "$start" = "non" ] ;then exit;fi            # dans votre fichier
##################################################

# L'appel des variables doit être encadré de $(.....)
# exemple:  $(CC ville) 
# les quelques autres tel Ver_meteo
# exemple: $Ver_meteo
# L'appel des modules prédéfinis est direct tel que :
# nom condition type dim opacité
# ex: rose CC vent 120x120 100
# modules: rose , barometre ,thermorond
#
#------------------ Variables que vous pouvez modifier ------------------------

fonte=Helvetica-LT-Std-Bold			 # fonte generique 
fonte1=URW-Chancery-Medium-Italic    # fonte ville
fonte2=Times-Bold
fonte3=Monaco-Regular
fonte4=Monaco-Bold
fonte5=SV-Basic-Manual-book
fonte6=Splendid-66-Regular	
fonte7=Bitstream-Vera-Sans-Mono-Bold # fonte cond act
fonte8=Arrows-Regular
# couleur texte					 
couleur1="white" 
couleur2="orange"
couleur3="cyan"
couleur4="yellow"
couleur5="#C16600"
couleur6="orangered"
couleur7="aqua"
couleur8="red"
couleur9="orangered"	 
# couleurs paliers temp
coultemp1="blue4"
coultemp2="dodgerblue1"
coultemp3="yellow"
coultemp4="white"
coultemp5="springgreen"
coultemp6="red"
coultemp7="black"
# couleurs paliers vent
coulvent1="orange"
coulvent2="dodgerblue1"
coulvent3="yellow"
coulvent4="white"
coulvent5="#0EAF00"
coulvent6="red"
coulvent7="blue"
coulvent8="gold"
coulvent9="black"
coulvent10="#00003F"

# Décalage depuis haut de l'ecran ex + 50 pour descendre -10 pour monter
decalagehaut=10

# taille du cartouche ville jouez sur l'echelle pour des grands noms de ville
# ex 100 taille normal  50 taille moitié
max=12
caracville=$(echo $(CC ville)|wc -m)
if [ "$caracville" -gt "$max" ];then
taille_ville=40 ; decalageville=60
else
taille_ville=100 ; decalageville=10
fi

###############################################################################
#                                                                             #
#                                                                             #
#-----------------------------------Calendrier 1------------------------------#
#                                                                             #
#                                                                             #
###############################################################################
samedi="SAM"
dimanche="DIM"
function calendar
{
if [[ $cale1 = `echo ${calen1[30]}` ]] ; then 
coul3=$coulvent6
elif [[ `echo $cale1 | cut -c1-3`  = `echo $dimanche` ]] ; then 
coul3=$coulvent1
elif [[ `echo $cale1 | cut -c1-3`  = `echo $samedi` ]] ; then 
coul3=$coulvent3
else coul3=$coulvent7
fi
if [ $cale1 = `echo ${calen1[30]}` ] ; then 
fonts1=18
else fonts1=16
fi
if [ $cale1 = `echo ${calen1[30]}` ] ; then 
pos13=1
else pos13=0
fi
if [[ $cale1 = `echo ${calen1[30]}` ]] ; then 
coul4=$coulvent8
elif [[ `echo $cale1 | cut -c1-3`  = `echo $dimanche` ]] ; then 
coul4=$coulvent10
elif [[ `echo $cale1 | cut -c1-3`  = `echo $samedi` ]] ; then 
coul4=$coulvent10
else coul4=$coultemp7
fi
}

# Cartouche Calendar 2 --------------------------------------------------------

convert -size 1890x100 xc:none  -fill none  $imagetemp
# Prévisions HuitHeure --------------------------------------------------------
dep1=7 ; pos12=23

calen1[0]=`date +%^a%d%^b --date '-30 days'`
calen1[1]=`date +%^a%d%^b --date '-29 days'`
calen1[2]=`date +%^a%d%^b --date '-28 days'`
calen1[3]=`date +%^a%d%^b --date '-27 days'`
calen1[4]=`date +%^a%d%^b --date '-26 days'`
calen1[5]=`date +%^a%d%^b --date '-25 days'`
calen1[6]=`date +%^a%d%^b --date '-24 days'`
calen1[7]=`date +%^a%d%^b --date '-23 days'`
calen1[8]=`date +%^a%d%^b --date '-22 days'`
calen1[9]=`date +%^a%d%^b --date '-21 days'`
calen1[10]=`date +%^a%d%^b --date '-20 days'`
calen1[11]=`date +%^a%d%^b --date '-19 days'`
calen1[12]=`date +%^a%d%^b --date '-18 days'`
calen1[13]=`date +%^a%d%^b --date '-17 days'`
calen1[14]=`date +%^a%d%^b --date '-16 days'`
calen1[15]=`date +%^a%d%^b --date '-15 days'`
calen1[16]=`date +%^a%d%^b --date '-14 days'`
calen1[17]=`date +%^a%d%^b --date '-13 days'`
calen1[18]=`date +%^a%d%^b --date '-12 days'`
calen1[19]=`date +%^a%d%^b --date '-11 days'`
calen1[20]=`date +%^a%d%^b --date '-10 days'`
calen1[21]=`date +%^a%d%^b --date '-9 days'`
calen1[22]=`date +%^a%d%^b --date '-8 days'`
calen1[23]=`date +%^a%d%^b --date '-7 days'`
calen1[24]=`date +%^a%d%^b --date '-6 days'`
calen1[25]=`date +%^a%d%^b --date '-5 days'`
calen1[26]=`date +%^a%d%^b --date '-4 days'`
calen1[27]=`date +%^a%d%^b --date '-3 days'`
calen1[28]=`date +%^a%d%^b --date '-2 days'`
calen1[29]=`date +%^a%d%^b --date '-1 days'`
calen1[30]=`date +%^a%d%^b --date '0 days'`
calen1[31]=`date +%^a%d%^b --date '+1 days'`
calen1[32]=`date +%^a%d%^b --date '+2 days'`
calen1[33]=`date +%^a%d%^b --date '+3 days'`
calen1[34]=`date +%^a%d%^b --date '+4 days'`
calen1[35]=`date +%^a%d%^b --date '+5 days'`
calen1[36]=`date +%^a%d%^b --date '+6 days'`
calen1[37]=`date +%^a%d%^b --date '+7 days'`
calen1[38]=`date +%^a%d%^b --date '+8 days'`
calen1[39]=`date +%^a%d%^b --date '+9 days'`
calen1[40]=`date +%^a%d%^b --date '+10 days'`
calen1[41]=`date +%^a%d%^b --date '+11 days'`
calen1[42]=`date +%^a%d%^b --date '+12 days'`
calen1[43]=`date +%^a%d%^b --date '+13 days'`
calen1[44]=`date +%^a%d%^b --date '+14 days'`
calen1[45]=`date +%^a%d%^b --date '+15 days'`
calen1[46]=`date +%^a%d%^b --date '+16 days'`
calen1[47]=`date +%^a%d%^b --date '+17 days'`
calen1[48]=`date +%^a%d%^b --date '+18 days'`
calen1[49]=`date +%^a%d%^b --date '+19 days'`
calen1[50]=`date +%^a%d%^b --date '+20 days'`
calen1[51]=`date +%^a%d%^b --date '+21 days'`
calen1[52]=`date +%^a%d%^b --date '+22 days'`
calen1[53]=`date +%^a%d%^b --date '+23 days'`
calen1[54]=`date +%^a%d%^b --date '+24 days'`
calen1[55]=`date +%^a%d%^b --date '+25 days'`
calen1[56]=`date +%^a%d%^b --date '+26 days'`
calen1[57]=`date +%^a%d%^b --date '+27 days'`
calen1[58]=`date +%^a%d%^b --date '+28 days'`
calen1[59]=`date +%^a%d%^b --date '+29 days'`
calen1[60]=`date +%^a%d%^b --date '+30 days'`
calen1[61]=`date +%^a%d%^b --date '+31 days'`
calen1[62]=`date +%^a%d%^b --date '+32 days'`
calen1[63]=`date +%^a%d%^b --date '+33 days'`
calen1[64]=`date +%^a%d%^b --date '+34 days'`
calen1[65]=`date +%^a%d%^b --date '+35 days'`
calen1[66]=`date +%^a%d%^b --date '+36 days'`
calen1[67]=`date +%^a%d%^b --date '+37 days'`
calen1[68]=`date +%^a%d%^b --date '+38 days'`
calen1[69]=`date +%^a%d%^b --date '+39 days'`
calen1[70]=`date +%^a%d%^b --date '+40 days'`
calen1[71]=`date +%^a%d%^b --date '+41 days'`
calen1[72]=`date +%^a%d%^b --date '+42 days'`
calen1[73]=`date +%^a%d%^b --date '+43 days'`
calen1[74]=`date +%^a%d%^b --date '+44 days'`
calen1[75]=`date +%^a%d%^b --date '+45 days'`
calen1[76]=`date +%^a%d%^b --date '+46 days'`
calen1[77]=`date +%^a%d%^b --date '+47 days'`
calen1[78]=`date +%^a%d%^b --date '+48 days'`
calen1[79]=`date +%^a%d%^b --date '+49 days'`
calen1[80]=`date +%^a%d%^b --date '+50 days'`
calen1[81]=`date +%^a%d%^b --date '+51 days'`



for (( x=0 ; x<80 ; x++ ));do
cale1=`echo ${calen1[x]}`;calendar
echo ${calen1[x]} | sed 's/é/E/g' | tr '.' '\012' | cut -c1-2 |\
convert -background none -fill $coul3 -font $fonte3 -pointsize $fonts1 -gravity center    label:@- -trim \
\( +clone -background $coul4  -shadow 100x1 -channel A -level 0,7% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity west -background transparent -geometry +$(((pos12*x-pos13)+dep1))+2 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
done
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background none -shadow 100x2 \) -compose DstOver -composite -compose Over $reptemp/calendar.png
# position de 0 à ce que vous voulez pour aligner avec une autre fonte
# ex : -10 pour descendre +10 pour remonter
position_ville=0

# ville -----------------------------------------------------------------------
convert -background transparent -font $fonte1  -pointsize 80 -fill dodgerblue  label:"$(CC ville)" \
\( +clone -background  Darkblue -shadow 120x1+2+2 \)  +swap -background transparent -compose over -layers merge +repage  \
 $imagetemp
convert $imagetemp  -channel A  -blur 0x4 +channel  -fill skyblue  -colorize 0% $imagetemp1
convert  -size 700x120 xc:transparent $imagetemp1 -background transparent -gravity center -geometry +0-0  -composite \
$imagetemp -background transparent -gravity center  -composite $reptemp/ville.png
# mise en forme ville
convert -resize $taille_ville% $reptemp/ville.png $reptemp/ville.png

#creation des images alerte et conditions + mise à l'échelle
#cond
im_cond=$(cond_cart CC 400 "$fonte2" centre red);convert "$im_cond" -resize 65% "$im_cond"
# alertes
im_alerte=$(alerte_cart 600 "$fonte2" centre yellow ico);convert "$im_alerte" -resize 45% "$im_alerte"

# temperatures ----------------------------------------------------------------
function coultemp
{
if  (($temp < -5 )); then
coul=$coultemp1
elif (($temp < 1 && $temp > -6 )); then
coul=$coultemp2
elif (($temp < 6 && $temp > 0)); then
coul=$coultemp3
elif (($temp < 20 && $temp > 5 )); then
coul=$coultemp4
elif (($temp < 25 && $temp > 19 )); then
coul=$coultemp5
elif (($temp > 24 )); then
coul=$coultemp6
else coul=$coultemp7
fi
}
# vent -------------------------------------------------------------------------
function coulvent
{
if  (($vent < 1 )); then 
coul1=$coulvent4
elif (( $vent < 11 && $vent > 0 )); then
coul1=$coulvent5
elif (($vent < 21 && $vent > 10)); then
coul1=$coulvent3
elif (($vent < 31 && $vent > 20 )); then
coul1=$coulvent1
elif (($vent < 61 && $vent > 30 )); then
coul1=$coulvent6
elif (($vent > 60 )); then
coul1=$coulvent7
else coul1=$coulvent7
fi
}

function risqueverglas
{
verglas="non"
if  (($temp < 5 )); then
verglas="oui"
fi
}

temp=$(CC temp) ; coultemp
convert -background transparent  -font $fonte  -pointsize 26 -fill $coul label:"$temp °" $reptemp/max.png
temp=$(CC ressent) ;risqueverglas; coultemp
convert -background transparent  -font $fonte  -pointsize 14 -fill $couleur1 label:"/" -fill $coul label:"r.$temp°" +append   $reptemp/ress.png
temp=$(prev_jour 1 tmpmax ) ; coultemp
convert -background transparent  -font Helvetica-LT-Std-Bold  -pointsize 14 -fill $couleur1 label:"Max : " -fill $coul label:"$temp °" +append $reptemp/max1.png

# temp la plus basse
function plusbas
{
if (("$temp1" < "$bas")); then
bas="$temp1"
fi
}

temp="$(CC temp)";temp1="$(CC ressent)";bas="$temp";plusbas
temp1="$(prev_quart Nuit 1 ressentmin)";plusbas
temp=$bas;risqueverglas; coultemp
convert -background transparent  -font Helvetica-LT-Std-Bold  -pointsize 14 -fill $couleur1 label:"+Bas : " -fill $coul label:"$temp °" +append $reptemp/min.png
#-------------------------------------
convert  -size 120x120 xc:transparent \
$reptemp/max.png -background transparent -gravity  NorthEast -geometry +56+4 -composite \
$reptemp/ress.png -background transparent -gravity  Northwest -geometry +50+13 -composite \
$reptemp/max1.png -background transparent -gravity North -geometry +0+31 -composite \
$reptemp/min.png -background transparent -gravity North -geometry +0+49 -composite \
$reptemp/temps.png
rm $reptemp/max.png ;rm $reptemp/max1.png ; rm $reptemp/ress.png ;rm $reptemp/min.png

# Historique ------------------------------------------------------------------
convert $reptemp/temps.png -background transparent -gravity North -font $fonte  -pointsize 13 -fill $couleur1 \
-annotate +0+72 "Historique" \
-pointsize 16 -fill $couleur1 -annotate +0+107  "$(prev_jour 1 tmpmaxlast)° / $(prev_jour 1 tmpminlast)°"  $reptemp/temps.png
# incruste année --------------------------------------------------------------
an=`date +"%Y"`
convert -background transparent -fill $couleur2 -font $fonte -stroke black -pointsize 18  label:"$[$an-1]" $imagetemp
composite -compose Over -gravity  North -geometry +0+87 -dissolve 40,95  $imagetemp  $reptemp/temps.png $reptemp/temps.png
convert $reptemp/temps.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over  $reptemp/temps.png

# icone conditions actuel
convert  $(CC ico) -resize 60% -bordercolor None -border 20x20 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over $reptemp/ico_cond.png
#creation cartouche -----------------------------------------------------------
convert -size 180x135 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,1 179,134 5,5" $imagetemp

# données meteo cartouche 1 ---------------------------------------------------
#prochaine M.a.j
heure=$heure_maint
if (( `echo ${heure:0:1}` == 0 ));then  heure=`echo ${heure:1:1}` ; fi
update=$((interval * 60))
mins=$min_maint
if (( `echo ${mins:0:1}` == 0 ));then  mins=`echo ${mins:1:1}` ; fi
secact=$(($heure*3600+$mins*60))
proch=$(($update+$secact))
resproch=`printf "%02dh%02d" $(($proch/3600))  $(($proch/60%60))`

bord=10 ;pos1=88 ;pos2=95 ;posdepart=10 ;ecart=12

for (( x=1 ; x<10 ; x++ ));do
    convert $imagetemp -background transparent -gravity Northwest -font $fonte -pointsize 11 -fill $couleur1 \
    -annotate +$pos1+$(((ecart*x)+posdepart)) ":" \
    $imagetemp
done
# Tendance pression ------------------------------------------------------------
tendpress=$(CC tendpression)
if [ "$tendpress" == "hausse" ];then tpos=-3;tend="c";convert  -background none  -font $fonte8 -fill $coultemp3 -size x25  -gravity center label:"$tend"  $reptemp/tend.png
elif [ "$tendpress" == "baisse" ];then tpos=-3;tend="d";convert  -background none -font $fonte8 -fill $coultemp3 -size x25  -gravity center label:"$tend"  $reptemp/tend.png
else
tpos=0;tend="~\n~";convert -interline-spacing -13 -background none  -fill $coultemp3 -size x27 -gravity North label:"$tend"  $reptemp/tend.png
fi

if [ "$verglas" = "oui" ];then
convert $imagetemp -background transparent \
-gravity Northwest -font $fonte -pointsize 11 -fill $couleur1 -annotate +$bord+$posdepart "Prob. Précip." -annotate +$pos1+$posdepart ":" -annotate +$pos2+$posdepart "$(prev_jour 1 precip) %" \
-annotate +$bord+$(((ecart*1)+posdepart)) "Humidité" -annotate +$pos2+$(((ecart*1)+posdepart)) "$(CC humid) %" \
-annotate +$bord+$(((ecart*2)+posdepart)) "Pression-Tend" -annotate +$pos2+$(((ecart*2)+posdepart)) "$(CC pression) mb  --" \
-annotate +$bord+$(((ecart*3)+posdepart)) "Pluie / Neige" -annotate +$pos2+$(((ecart*3)+posdepart)) "$(prev_jour 1 pluie) mm / $(prev_jour 1 neige) cm" \
-annotate +$bord+$(((ecart*4)+posdepart)) "Verglas" -annotate +$pos2+$(((ecart*4)+posdepart)) "$(prev_jour 1 verglas) mm" \
-annotate +$bord+$(((ecart*5)+posdepart)) "Visibilité" -annotate +$pos2+$(((ecart*5)+posdepart)) "$(CC visib) km U.V : $(CC uv)" \
-annotate +$bord+$(((ecart*6)+posdepart)) "Levé - Couché" -annotate +$pos2+$(((ecart*6)+posdepart)) "$(prev_jour 1 sollever)-$(prev_jour 1 solcouch)" \
-annotate +$bord+$(((ecart*7)+posdepart)) "Durée du jour" -annotate +$pos2+$(((ecart*7)+posdepart)) "$(prev_jour 1 solduree)" \
-annotate +$bord+$(((ecart*8)+posdepart)) "Mise à jour à" -annotate +$pos2+$(((ecart*8)+posdepart)) "$maint" \
-annotate +$bord+$(((ecart*9)+posdepart)) "Prochaine   à" -annotate +$pos2+$(((ecart*9)+posdepart)) "$resproch" \
$imagetemp
convert $imagetemp $reptemp/tend.png -background transparent -gravity NorthEast -geometry +10+$((28+$tpos)) -composite $imagetemp
else
convert $imagetemp -background transparent \
-gravity Northwest -font $fonte -pointsize 11 -fill $couleur1 -annotate +$bord+$posdepart "Prob. Précip." -annotate +$pos1+$posdepart ":" -annotate +$pos2+$posdepart "$(prev_jour 1 precip) %" \
-annotate +$bord+$(((ecart*1)+posdepart)) "Humidité" -annotate +$pos2+$(((ecart*1)+posdepart)) "$(CC humid) %" \
-annotate +$bord+$(((ecart*2)+posdepart)) "Pression-Tend" -annotate +$pos2+$(((ecart*2)+posdepart)) "$(CC pression) mb  --" \
-annotate +$bord+$(((ecart*3)+posdepart)) "Pluie " -annotate +$pos2+$(((ecart*3)+posdepart)) "$(prev_jour 1 pluie) mm " \
-annotate +$bord+$(((ecart*4)+posdepart)) "Visibilité" -annotate +$pos2+$(((ecart*4)+posdepart)) "$(CC visib) km" \
-annotate +$bord+$(((ecart*5)+posdepart)) "U.V" -annotate +$pos2+$(((ecart*5)+posdepart)) "$(CC uv)" \
-annotate +$bord+$(((ecart*6)+posdepart)) "Levé - Couché" -annotate +$pos2+$(((ecart*6)+posdepart)) "$(prev_jour 1 sollever)-$(prev_jour 1 solcouch)" \
-annotate +$bord+$(((ecart*7)+posdepart)) "Durée du jour" -annotate +$pos2+$(((ecart*7)+posdepart)) "$(prev_jour 1 solduree)" \
-annotate +$bord+$(((ecart*8)+posdepart)) "Mise à jour à" -annotate +$pos2+$(((ecart*8)+posdepart)) "$maint" \
-annotate +$bord+$(((ecart*9)+posdepart)) "Prochaine   à" -annotate +$pos2+$(((ecart*9)+posdepart)) "$resproch" \
$imagetemp
convert $imagetemp $reptemp/tend.png -background transparent -gravity NorthEast -geometry +10+$((28+$tpos)) -composite $imagetemp
fi
# ombres cartouche -------------------------------------------------------------
convert $imagetemp -bordercolor None -border 10x10 \( +clone -background black -shadow 100x2 \) \
-compose DstOver -composite -compose Over $reptemp/actuel.png
# versions ---------------------------------------------------------------------
#
versionrecmeteo=`echo $vrecmeteo | cut -c2-5`
convert -background none -fill orange -font $fonte -pointsize 10 \
label:"Meteo v-$Ver_meteo Recmeteo v-$versionrecmeteo" -trim \
\( +clone -background grey19  -shadow 100x1 -channel A -level 0,5% +channel \) +swap +repage -gravity center -composite $reptemp/versions.png

# Prévisions semaine 1 ------------------------------------------------------
convert -size 200x266 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,199,265,5,5" $imagetemp
# Prévisions ------------------------------------------------------------------
echo -n "Prévisions" | sed 's/./&@/g; s/@$//' | tr '@' '\012' |\
convert -background none -fill blue -font $fonte2 -pointsize 14 -gravity center    label:@- -trim \
\( +clone -background skyblue  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity west -background transparent -geometry +4+0 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
rot=353 ; pos1=23 ; pos2=138 ; pos3=145 ; posdepart=20 ; posdepart1=37 ;ecart=35
# Tableaux jours - vent dir - vent force
ventd[1]=$(prev_jour 2 vent);ventd[2]=$(prev_jour 3 vent);ventd[3]=$(prev_jour 4 vent)
ventd[4]=$(prev_jour 5 vent);ventd[5]=$(prev_jour 6 vent);ventd[6]=$(prev_jour 7 vent)
ventd[7]=$(prev_jour 8 vent)
ventf[1]=$(prev_jour 2 vent_force);ventf[2]=$(prev_jour 3 vent_force);ventf[3]=$(prev_jour 4 vent_force)
ventf[4]=$(prev_jour 5 vent_force);ventf[5]=$(prev_jour 6 vent_force);ventf[6]=$(prev_jour 7 vent_force)
ventf[7]=$(prev_jour 8 vent_force)
for (( x=1 ; x<8 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur2 \
-annotate +$((pos1))+$(((ecart*x-ecart)+posdepart)) "$(date --date "$x day" +%a%d|sed -e 's/\(.\{1\}\)/\U\1/')" \
-annotate +$((pos2))+$(((ecart*x-ecart)+posdepart)) "${ventd[x]}" $imagetemp
vent=${ventf[x]};coulvent
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $coul1 \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*x-ecart)+posdepart1)) "${ventf[x]} km/h" $imagetemp
done
# températures -----------------------------------------------------------------
# positionnement du /
for (( x=0 ; x<7 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur1 \
-annotate +$((pos1+18))+$(((ecart*x)+posdepart1)) "/" $imagetemp
done
# temp max jour/nuit
tempjour[1]=$(prev_jour 2 temp);tempjour[2]=$(prev_jour 3 temp);tempjour[3]=$(prev_jour 4 temp)
tempjour[4]=$(prev_jour 5 temp);tempjour[5]=$(prev_jour 6 temp);tempjour[6]=$(prev_jour 7 temp)
tempjour[7]=$(prev_jour 8 temp)
tempnuit[1]=$(prev_jour 2 nuit_temp);tempnuit[2]=$(prev_jour 3 nuit_temp);tempnuit[3]=$(prev_jour 4 nuit_temp)
tempnuit[4]=$(prev_jour 5 nuit_temp);tempnuit[5]=$(prev_jour 6 nuit_temp);tempnuit[6]=$(prev_jour 7 nuit_temp)
tempnuit[7]=$(prev_jour 8 nuit_temp)

for (( x=1 ; x<8 ; x++ ));do
temp=${tempnuit[x]};coultemp
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11  -fill $coul \
-annotate +$((pos1+22))+$(((ecart*x-ecart)+posdepart1)) "${tempnuit[x]}°" $imagetemp
temp=${tempjour[x]};coultemp
convert $imagetemp -background transparent -gravity Northeast -font $fonte  -pointsize 11  -fill $coul \
-annotate +157+$(((ecart*x-ecart)+posdepart1)) "${tempjour[x]}°" $imagetemp
done

# icones ----------------------------------------------------------------------
tailleic=51x30 ; pos=55 ; tailleic1=30x30 ; pos1=105 ; posdepart=17
icond[1]=$(prev_jour 2 ico);icond[2]=$(prev_jour 3 ico);icond[3]=$(prev_jour 4 ico)
icond[4]=$(prev_jour 5 ico);icond[5]=$(prev_jour 6 ico);icond[6]=$(prev_jour 7 ico)
icond[7]=$(prev_jour 8 ico)
ivent[1]=$(prev_jour 2 icovent);ivent[2]=$(prev_jour 3 icovent);ivent[3]=$(prev_jour 4 icovent);
ivent[4]=$(prev_jour 5 icovent);ivent[5]=$(prev_jour 6 icovent);ivent[6]=$(prev_jour 7 icovent)
ivent[7]=$(prev_jour 8 icovent)
for (( x=1 ; x<8 ; x++ ));do
convert $imagetemp ${icond[x]} -background transparent -geometry $tailleic+$pos+$(((ecart*x-ecart)+posdepart)) -composite \
${ivent[x]} -background transparent -geometry $tailleic1+$pos1+$(((ecart*x-ecart)+posdepart)) -composite $imagetemp
done

# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/previsions.png
# cartouche semaine 2 ---------------------------------------------------------
convert -size 200x266 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,199,265,5,5" $imagetemp
# Prévisions ------------------------------------------------------------------
echo -n "Prévisions" | sed 's/./&@/g; s/@$//' | tr '@' '\012' |\
convert -background none -fill blue -font $fonte2 -pointsize 14 -gravity center    label:@- -trim \
\( +clone -background skyblue  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity west -background transparent -geometry +4+0 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
rot=353 ; pos1=23 ; pos2=138 ; pos3=145 ; posdepart=20 ; posdepart1=37 ;ecart=35
# Tableaux jours - vent dir - vent force
ventd[8]=$(prev_jour 9 vent);ventd[9]=$(prev_jour 10 vent);ventd[10]=$(prev_jour 11 vent)
ventd[11]=$(prev_jour 12 vent);ventd[12]=$(prev_jour 13 vent);ventd[13]=$(prev_jour 14 vent)
ventd[14]=$(prev_jour 15 vent)
ventf[8]=$(prev_jour 9 vent_force);ventf[9]=$(prev_jour 10 vent_force);ventf[10]=$(prev_jour 11 vent_force)
ventf[11]=$(prev_jour 12 vent_force);ventf[12]=$(prev_jour 13 vent_force);ventf[13]=$(prev_jour 14 vent_force)
ventf[14]=$(prev_jour 15 vent_force)
for (( x=8 ; x<15 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur2 \
-annotate +$((pos1))+$(((ecart*x-(ecart*8))+posdepart)) "$(date --date "$x day" +%a%d|sed -e 's/\(.\{1\}\)/\U\1/')" \
-annotate +$((pos2))+$(((ecart*x-(ecart*8))+posdepart)) "${ventd[x]}" $imagetemp
vent=${ventf[x]};coulvent
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $coul1 \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*x-(ecart*8))+posdepart1)) "${ventf[x]} km/h" $imagetemp
done
# températures -----------------------------------------------------------------
# positionnement du /
for (( x=0 ; x<7 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur1 \
-annotate +$((pos1+18))+$(((ecart*x)+posdepart1)) "/" $imagetemp
done
# temp max jour/nuit
tempjour[8]=$(prev_jour 9 temp);tempjour[9]=$(prev_jour 10 temp);tempjour[10]=$(prev_jour 11 temp)
tempjour[11]=$(prev_jour 12 temp);tempjour[12]=$(prev_jour 13 temp);tempjour[13]=$(prev_jour 14 temp)
tempjour[14]=$(prev_jour 15 temp)
tempnuit[8]=$(prev_jour 9 nuit_temp);tempnuit[9]=$(prev_jour 10 nuit_temp);tempnuit[10]=$(prev_jour 11 nuit_temp)
tempnuit[11]=$(prev_jour 12 nuit_temp);tempnuit[12]=$(prev_jour 13 nuit_temp);tempnuit[13]=$(prev_jour 14 nuit_temp)
tempnuit[14]=$(prev_jour 15 nuit_temp)

for (( x=8 ; x<15 ; x++ ));do
temp=${tempnuit[x]};coultemp
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11  -fill $coul \
-annotate +$((pos1+22))+$(((ecart*x-(ecart*8))+posdepart1)) "${tempnuit[x]}°" $imagetemp
temp=${tempjour[x]};coultemp
convert $imagetemp -background transparent -gravity Northeast -font $fonte  -pointsize 11  -fill $coul \
-annotate +157+$(((ecart*x-(ecart*8))+posdepart1)) "${tempjour[x]}°" $imagetemp
done

# icones ----------------------------------------------------------------------
tailleic=51x30 ; pos=55 ; tailleic1=30x30 ; pos1=105 ; posdepart=17
icond[8]=$(prev_jour 9 ico);icond[9]=$(prev_jour 10 ico);icond[10]=$(prev_jour 11 ico)
icond[11]=$(prev_jour 12 ico);icond[12]=$(prev_jour 13 ico);icond[13]=$(prev_jour 14 ico)
icond[14]=$(prev_jour 15 ico)
ivent[8]=$(prev_jour 9 icovent);ivent[9]=$(prev_jour 10 icovent);ivent[10]=$(prev_jour 11 icovent);
ivent[11]=$(prev_jour 12 icovent);ivent[12]=$(prev_jour 13 icovent);ivent[13]=$(prev_jour 14 icovent)
ivent[14]=$(prev_jour 15 icovent)
for (( x=8 ; x<15 ; x++ ));do
convert $imagetemp ${icond[x]} -background transparent -geometry $tailleic+$pos+$(((ecart*x-(ecart*8))+posdepart)) -composite \
${ivent[x]} -background transparent -geometry $tailleic1+$pos1+$(((ecart*x-(ecart*8))+posdepart)) -composite $imagetemp
done

# -----------------------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/previsions3.png
#huit heures ------------------------------------------------------------------
# Prévisions cartouche huitHeures  -------------------------------------------------
convert -size 200x310 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,199,309,5,5" $imagetemp
#-------------------------------------------------------------------------------
convert -background none -fill $coultemp3 -font $fonte2 -pointsize 12 -gravity center    label:"à huit heures" \
\( +clone -background black  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity North -background transparent -geometry +0+10 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
#-------------------------------------------------------------------------------
rot=353 ; pos1=10 ; pos2=138 ; pos3=145 ; posdepart=65 ; posdepart1=82 ;ecart=35
# Tableaux jours - vent dir - vent force ---------------------------------------

ventd[0]=$(prev_huit 1 vent);ventd[1]=$(prev_huit 2 vent);ventd[2]=$(prev_huit 3 vent);ventd[3]=$(prev_huit 4 vent)
ventd[4]=$(prev_huit 5 vent);ventd[5]=$(prev_huit 6 vent);ventd[6]=$(prev_huit 7 vent);ventd[7]=$(prev_huit 8 vent)
ventf[0]=$(prev_huit 1 vent_force);ventf[1]=$(prev_huit 2 vent_force);ventf[2]=$(prev_huit 3 vent_force);ventf[3]=$(prev_huit 4 vent_force)
ventf[4]=$(prev_huit 5 vent_force);ventf[5]=$(prev_huit 6 vent_force);ventf[6]=$(prev_huit 7 vent_force);ventf[7]=$(prev_huit 8 vent_force)

for (( x=0 ; x<8 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur2 \
-annotate +$((pos1))+$(((ecart*x-ecart)+posdepart)) "$(date --date "$x hour" +%H|sed -e 's/\(.\{1\}\)/\U\1/') heure" \
-annotate +$((pos2))+$(((ecart*x-ecart)+posdepart)) "${ventd[x]}" $imagetemp
vent=${ventf[x]};coulvent
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $coul1 \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*x-ecart)+posdepart1)) "${ventf[x]} km/h" $imagetemp
done

# températures -----------------------------------------------------------------

tempjour[0]=$(prev_huit 1 temp);tempjour[1]=$(prev_huit 2 temp);tempjour[2]=$(prev_huit 3 temp);tempjour[3]=$(prev_huit 4 temp)
tempjour[4]=$(prev_huit 5 temp);tempjour[5]=$(prev_huit 6 temp);tempjour[6]=$(prev_huit 7 temp);tempjour[7]=$(prev_huit 8 temp)


for (( x=0 ; x<8 ; x++ ));do
temp=${tempjour[x]};coultemp 
convert $imagetemp -background transparent -gravity Northeast -font $fonte  -pointsize 11  -fill $coul \
-annotate +157+$(((ecart*x-ecart)+posdepart1)) "${tempjour[x]}°C" $imagetemp
done

# icones ----------------------------------------------------------------------
tailleic=51x30 ; pos=55 ; tailleic1=30x30 ; pos1=105 ; posdepart=60
icond[0]=$(prev_huit 1 ico);icond[1]=$(prev_huit 2 ico);icond[2]=$(prev_huit 3 ico);icond[3]=$(prev_huit 4 ico)
icond[4]=$(prev_huit 5 ico);icond[5]=$(prev_huit 6 ico);icond[6]=$(prev_huit 7 ico);icond[7]=$(prev_huit 8 ico)
ivent[0]=$(prev_huit 1 icovent);ivent[1]=$(prev_huit 2 icovent);ivent[2]=$(prev_huit 3 icovent);ivent[3]=$(prev_huit 4 icovent);
ivent[4]=$(prev_huit 5 icovent);ivent[5]=$(prev_huit 6 icovent);ivent[6]=$(prev_huit 7 icovent);ivent[7]=$(prev_huit 8 icovent)
for (( x=0 ; x<8 ; x++ ));do
convert $imagetemp ${icond[x]} -background transparent -geometry $tailleic+$pos+$(((ecart*x-ecart)+posdepart)) -composite \
${ivent[x]} -background transparent -geometry $tailleic1+$pos1+$(((ecart*x-ecart)+posdepart)) -composite $imagetemp
done

# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/huitheures1.png
####################################################################################
# Prévisions cartouche douzeheure  -------------------------------------------------
convert -size 200x310 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,199,309,5,5" $imagetemp
#-------------------------------------------------------------------------------
convert -background none -fill $coultemp3 -font $fonte2 -pointsize 12 -gravity center    label:"à seize heures" \
\( +clone -background black  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity North -background transparent -geometry +0+10 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
#-------------------------------------------------------------------------------
rot=353 ; pos1=10 ; pos2=138 ; pos3=145 ; posdepart=65 ; posdepart1=82 ;ecart=35
# Tableaux jours - vent dir - vent force ---------------------------------------

ventd[0]=$(prev_huit 9 vent);ventd[1]=$(prev_huit 10 vent);ventd[2]=$(prev_huit 11 vent);ventd[3]=$(prev_huit 12 vent)
ventd[4]=$(prev_huit 13 vent);ventd[5]=$(prev_huit 14 vent);ventd[6]=$(prev_huit 15 vent);ventd[7]=$(prev_huit 16 vent)
ventf[0]=$(prev_huit 9 vent_force);ventf[1]=$(prev_huit 10 vent_force);ventf[2]=$(prev_huit 11 vent_force);ventf[3]=$(prev_huit 12 vent_force)
ventf[4]=$(prev_huit 13 vent_force);ventf[5]=$(prev_huit 14 vent_force);ventf[6]=$(prev_huit 15 vent_force);ventf[7]=$(prev_huit 16 vent_force)

for (( x=0 ; x<8 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $couleur2 \
-annotate +$((pos1))+$(((ecart*x-ecart)+posdepart)) "$(date --date "$((x+8)) hour" +%H|sed -e 's/\(.\{1\}\)/\U\1/') heure" \
-annotate +$((pos2))+$(((ecart*x-ecart)+posdepart)) "${ventd[x]}" $imagetemp
vent=${ventf[x]};coulvent
convert $imagetemp -background transparent -gravity Northwest -font $fonte  -pointsize 11 -fill $coul1 \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*x-ecart)+posdepart1)) "${ventf[x]} km/h" $imagetemp
done

# températures -----------------------------------------------------------------

tempjour[0]=$(prev_huit 9 temp);tempjour[1]=$(prev_huit 10 temp);tempjour[2]=$(prev_huit 11 temp);tempjour[3]=$(prev_huit 12 temp)
tempjour[4]=$(prev_huit 13 temp);tempjour[5]=$(prev_huit 14 temp);tempjour[6]=$(prev_huit 15 temp);tempjour[7]=$(prev_huit 16 temp)


for (( x=0 ; x<8 ; x++ ));do
temp=${tempjour[x]};coultemp 
convert $imagetemp -background transparent -gravity Northeast -font $fonte  -pointsize 11  -fill $coul \
-annotate +157+$(((ecart*x-ecart)+posdepart1)) "${tempjour[x]}°C" $imagetemp
done

# icones ----------------------------------------------------------------------
tailleic=51x30 ; pos=55 ; tailleic1=30x30 ; pos1=105 ; posdepart=60
icond[0]=$(prev_huit 9 ico);icond[1]=$(prev_huit 10 ico);icond[2]=$(prev_huit 11 ico);icond[3]=$(prev_huit 12 ico)
icond[4]=$(prev_huit 13 ico);icond[5]=$(prev_huit 14 ico);icond[6]=$(prev_huit 15 ico);icond[7]=$(prev_huit 16 ico)
ivent[0]=$(prev_huit 9 icovent);ivent[1]=$(prev_huit 10 icovent);ivent[2]=$(prev_huit 11 icovent);ivent[3]=$(prev_huit 12 icovent);
ivent[4]=$(prev_huit 13 icovent);ivent[5]=$(prev_huit 14 icovent);ivent[6]=$(prev_huit 15 icovent);ivent[7]=$(prev_huit 16 icovent)
for (( x=0 ; x<8 ; x++ ));do
convert $imagetemp ${icond[x]} -background transparent -geometry $tailleic+$pos+$(((ecart*x-ecart)+posdepart)) -composite \
${ivent[x]} -background transparent -geometry $tailleic1+$pos1+$(((ecart*x-ecart)+posdepart)) -composite $imagetemp
done

# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/huitheures2.png
# nettoyage -------------------------------------------------------------------
rm $imagetemp1; rm $imagetemp

# Prévisions à 2 heure  ------------------------------------------------------
convert -size 200x200 xc:none  -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,199,85,5,5" $imagetemp
convert -background none -fill $coultemp3 -font $fonte2 -pointsize 12 -gravity center    label:"à deux heures" \
\( +clone -background black  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity North -background transparent -geometry +0+10 -dissolve 65% $imagetemp1   $imagetemp $imagetemp

# verif pluie ou neige
if [ "$(prev_huit 2 neige)" != "0" ]||[ "$(prev_huit 3 neige)" != "0" ];then titre="Neige";precip1="$( prev_huit 2 neige) %";precip2="$( prev_huit 3 neige) %"
elif [ "$(prev_huit 2 pluie)" != "0" ]||[ "$(prev_huit 3 pluie)" != "0" ];then titre="Pluie";precip1="$( prev_huit 2 pluie) %";precip2="$( prev_huit 3 pluie) %"
else
 titre="Precip.";precip1="0 %";precip2="0 %"
fi

convert $imagetemp -background transparent \
-gravity Northeast -font $fonte -pointsize 11 -fill $couleur1 \
-annotate +84+30 "à         C°           Vent" -annotate +10+30 "$titre" \
-annotate +170+50 "$(prev_huit 2 heure) h" -annotate +140+50 "$(prev_huit 2 temp)°" -annotate +108+50 "$(prev_huit 2 vent)" -annotate +50+50 "$(prev_huit 2 vent_force) km/h" -annotate +8+50 "$precip1" \
-annotate +170+70 "$(prev_huit 3 heure) h" -annotate +140+70 "$(prev_huit 3 temp)°" -annotate +108+70 "$(prev_huit 3 vent)" -annotate +50+70 "$(prev_huit 3 vent_force) km/h" -annotate +8+70 "$precip2" \
$imagetemp
# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/previsions2.png


################################################################################
########BarographTemp############
convert -size 352x190 xc:none  -fill none -strokewidth 1 -stroke firebrick3 -draw "roundrectangle 1,1 351,189 5,5" $imagetemp
#############Titre#####
convert -background none -fill $coultemp3 -font $fonte1 -pointsize 20 -gravity center label:"Pression et Température" \
\( +clone -background black  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity North -background transparent -geometry +0+0 -dissolve 65% $imagetemp1   $imagetemp $imagetemp


rm $imagetemp;rm $imagetemp1
# lunaison --------------------------------------------------------------------
lunaison 200x200 100
convert $reptemp/lunaison.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over  $reptemp/lunaison.png

# lune info
convert -size 130x130 xc:transparent $reptemp/Lune.png -gravity center -geometry 60x60+0+0 -composite $reptemp/lune.png
convert -background none -fill blue -font $fonte2 -pointsize 13 -gravity center    label:"$(lune ephe)" -trim \
\( +clone -background skyblue  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp
convert -background none -fill white -font $fonte2 -pointsize 15 -gravity center    label:"$(lune age) j" \
\( +clone -background  black -shadow 120x1+4+4 \)  +swap -background transparent -compose over -layers merge +repage  \
$imagetemp1
composite  -gravity center -background transparent -geometry +0+40 $imagetemp $reptemp/lune.png $reptemp/lune.png


# fabrication  des modules prêt à l'emplois ##########################################################################
barometre 200x200 100 hr
#  ombre baro
convert $reptemp/Barometre_hr.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over  $reptemp/Barometre_hr.png

# rose des vents --------------------------------------------------------------
# creation rose
rose CC vent 120x120 100
convert $reptemp/Rose-CC.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over  $reptemp/Rose-CC.png
thermorond CC 200x200 100 ver
thermorond CC 200x200 100 rou
convert $reptemp/CC_thermver.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over \
$reptemp/CC_thermrou.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over \
$reptemp/CC-therm.png
#####################################################################################
# mise à l'echelle du fond
# si vous rencontrez des difficulté avec la détection automatique du format de votre
# environnement vous pouvez forcer en decommentant la ligne suivante
ecran=1920x1080  # vous pouvez choisir votre format d'ecran
convert -resize $ecran! $fondbase $fondbase
# pour réglage positionnement si besoin jouez sur  les nombre de -geometry -210+$((10+decalagehaut))
# -geometry ±posdroitegauche±hautbas
# assemblage final des différentes parties toujours de l'image de  base vers l'image finale
# l'image finale se retrouve dans le rep fonds
#
#

convert $fondbase \
$reptemp/imagesat-couvnuage.png -background transparent -gravity North  -geometry -25+$((240+decalagehaut)) -composite \
$reptemp/ico_cond.png -background transparent -gravity North  -geometry -210+$((0+decalagehaut)) -composite \
$reptemp/ville.png -background transparent -gravity North  -geometry +0+$((-10+decalageville)) -composite \
$reptemp/lune.png  -background transparent -gravity North  -geometry +205+$((0+decalagehaut)) -composite \
$im_cond -background transparent -gravity center  -geometry +0-$((410+decalagehaut)) -composite \
$im_alerte -background transparent -gravity center  -geometry +325+$((185+decalagehaut)) -composite \
$reptemp/temps.png -background transparent -gravity North  -geometry -62+$((110+decalagehaut)) -composite \
$reptemp/Rose-CC.png -background transparent -gravity North  -geometry +38+$((118+decalagehaut)) -composite \
$reptemp/actuel.png -background transparent -gravity North  -geometry -200+$((120+decalagehaut)) -composite \
$reptemp/previsions.png -background transparent -gravity North  -geometry +205+$((115+decalagehaut)) -composite \
$reptemp/previsions3.png -background transparent -gravity North  -geometry +410+$((115+decalagehaut)) -composite \
$reptemp/versions.png -background transparent -gravity North  -geometry -200+$((115+decalagehaut)) -composite \
$reptemp/lunaison.png -background transparent -gravity North  -geometry -300+$((300+decalagehaut)) -composite \
$reptemp/calendar.png -background transparent -gravity North  -geometry +50+$((985+decalagehaut)) -composite \
$reptemp/huitheures1.png -background transparent -gravity North  -geometry +205+$((381+decalagehaut)) -composite \
$reptemp/huitheures2.png -background transparent -gravity North  -geometry +410+$((381+decalagehaut)) -composite \
$reptemp/Barometre_hr.png -background transparent -gravity North -geometry -300+$((500+decalagehaut)) -composite \
$reptemp/CC-therm.png -background transparent -gravity North -geometry -500+$((500+decalagehaut)) -composite \
$imagefinale
####################################################################################
# obligatoire pour afficher le fond d'ecran
affichage
exit

Dernière modification par daniel38100 (Le 05/09/2013, à 23:09)

Hors ligne

#763 Le 06/09/2013, à 00:46

Dreadid

Re : [Conky] Alternative à weather.com (3)

Bonsoir tout le monde wink
@ daniel38100 :
dans ton script clock-rings.lua, pour que les vitesses de download et upload ne dépassent pas les 3/4 de tour prévus, il faut ajuster les variables max à tes débits maximum

        {
        name='downspeedf',
        arg='wlan0',
        max=2000,
        bg_colour=0xffffff,
        bg_alpha=0.3,
        fg_colour=0x339900,
        fg_alpha=0.8,
        x=121, y=396,
        radius=25,
        thickness=4,
        start_angle=-45,
        end_angle=225
    },
        {
        name='upspeedf',
        arg='wlan0',
        max=200,
        bg_colour=0xffffff,
        bg_alpha=0.3,
        fg_colour=0xef8c25,
        fg_alpha=0.8,
        x=121, y=396,
        radius=20,
        thickness=4,
        start_angle=-45,
        end_angle=225
    },

Dans mon adaptation de script (lignes 190 et 204), le max pour la variable downspeedf est (arbitrairement) fixée à 2000 et celle pour upspeedf à 200 car mes maximales de download et d'upload sont respectivement d'1,5 Mo et 150 ko.
Je te conseille de mettre une valeur légèrement supérieure à ton débit réel (en l’occurrence, j'aurais pu mettre mes variables à 1650 et 165 pour laisser une marge de 10% à mon débit max réel wink)


Intel NUC / Intel® Core™ i5-8259U CPU @ 2.30GHz × 4/ Intel Iris Plus Graphics 655 / 16 Go RAM
LinuxMint 20.3 - Cinnamon 64 bits / Windows 10 - 64 bits

Hors ligne

#764 Le 06/09/2013, à 20:05

daniel38100

Re : [Conky] Alternative à weather.com (3)

Dreadid a écrit :

Bonsoir tout le monde wink
@ daniel38100 :
dans ton script clock-rings.lua, pour que les vitesses de download et upload ne dépassent pas les 3/4 de tour prévus, il faut ajuster les variables max à tes débits maximum

        {
        name='downspeedf',
        arg='wlan0',
        max=2000,
        bg_colour=0xffffff,
        bg_alpha=0.3,
        fg_colour=0x339900,
        fg_alpha=0.8,
        x=121, y=396,
        radius=25,
        thickness=4,
        start_angle=-45,
        end_angle=225
    },
        {
        name='upspeedf',
        arg='wlan0',
        max=200,
        bg_colour=0xffffff,
        bg_alpha=0.3,
        fg_colour=0xef8c25,
        fg_alpha=0.8,
        x=121, y=396,
        radius=20,
        thickness=4,
        start_angle=-45,
        end_angle=225
    },

Dans mon adaptation de script (lignes 190 et 204), le max pour la variable downspeedf est (arbitrairement) fixée à 2000 et celle pour upspeedf à 200 car mes maximales de download et d'upload sont respectivement d'1,5 Mo et 150 ko.
Je te conseille de mettre une valeur légèrement supérieure à ton débit réel (en l’occurrence, j'aurais pu mettre mes variables à 1650 et 165 pour laisser une marge de 10% à mon débit max réel wink)

@Dreadid merci de m'y faire penser j'avais oublier de le faire

Hors ligne

#765 Le 07/09/2013, à 00:17

Dreadid

Re : [Conky] Alternative à weather.com (3)

daniel38100 a écrit :

@Dreadid merci de m'y faire penser j'avais oublier de le faire

De rien... j'aimerais bien avoir ton débit wink
Pas encore accessible chez moi des débits pareils... même au boulot ! roll


Intel NUC / Intel® Core™ i5-8259U CPU @ 2.30GHz × 4/ Intel Iris Plus Graphics 655 / 16 Go RAM
LinuxMint 20.3 - Cinnamon 64 bits / Windows 10 - 64 bits

Hors ligne

#766 Le 07/09/2013, à 00:40

daniel38100

Re : [Conky] Alternative à weather.com (3)

Dreadid a écrit :
daniel38100 a écrit :

@Dreadid merci de m'y faire penser j'avais oublier de le faire

De rien... j'aimerais bien avoir ton débit wink
Pas encore accessible chez moi des débits pareils... même au boulot ! roll

2949874051.png

Hors ligne

#767 Le 07/09/2013, à 09:57

oOMaverickOo

Re : [Conky] Alternative à weather.com (3)

Bonjour Daniel,

Merci pour le script, il fonctionne nikel !
Juste un détail chez moi au niveau du calendrier(lignes bleues en bas, je n'ai toujours que les jours) sans les "numéros"


2 Xubuntu 14.04.x / 1 Windows 8.1
Membre April N°9016

"We all change. When you think about it, we are all different people, all through our lives. And that's ok, that's good, you gotta keep moving, so long as you remember all the people that you used to be. I will not forget one line of this. Not one day...I swear. I will always remember when the Doctor was me"

Hors ligne

#768 Le 07/09/2013, à 10:40

daniel38100

Re : [Conky] Alternative à weather.com (3)

oOMaverickOo a écrit :

Bonjour Daniel,

Merci pour le script, il fonctionne nikel !
Juste un détail chez moi au niveau du calendrier(lignes bleues en bas, je n'ai toujours que les jours) sans les "numéros"

c'est pq tas date n'est pas en français alors c'est ou tu supprime le calendar ou on peut faire une petite modif si tu le veut

Dernière modification par daniel38100 (Le 07/09/2013, à 10:43)

Hors ligne

#769 Le 07/09/2013, à 10:42

oOMaverickOo

Re : [Conky] Alternative à weather.com (3)

Va pour la modif ma foi, j'ai essayé de voir par moi même mais mes modifs n'ont pas eu d'effet.


2 Xubuntu 14.04.x / 1 Windows 8.1
Membre April N°9016

"We all change. When you think about it, we are all different people, all through our lives. And that's ok, that's good, you gotta keep moving, so long as you remember all the people that you used to be. I will not forget one line of this. Not one day...I swear. I will always remember when the Doctor was me"

Hors ligne

#770 Le 07/09/2013, à 10:43

daniel38100

Re : [Conky] Alternative à weather.com (3)

oOMaverickOo a écrit :

Va pour la modif ma foi, j'ai essayé de voir par moi même mais mes modifs n'ont pas eu d'effet.

envoie moi ton retour terminal pour

date +%^a%d%^b

Hors ligne

#771 Le 07/09/2013, à 10:46

oOMaverickOo

Re : [Conky] Alternative à weather.com (3)

SAT07SEP

2 Xubuntu 14.04.x / 1 Windows 8.1
Membre April N°9016

"We all change. When you think about it, we are all different people, all through our lives. And that's ok, that's good, you gotta keep moving, so long as you remember all the people that you used to be. I will not forget one line of this. Not one day...I swear. I will always remember when the Doctor was me"

Hors ligne

#772 Le 07/09/2013, à 10:52

daniel38100

Re : [Conky] Alternative à weather.com (3)

remplace

###############################################################################
#                                                                             #
#                                                                             #
#-----------------------------------Calendrier 1------------------------------#
#                                                                             #
#                                                                             #
###############################################################################
samedi="SAM"
dimanche="DIM"
function calendar
{
if [[ $cale1 = `echo ${calen1[30]}` ]] ; then 
coul3=$coulvent6
elif [[ `echo $cale1 | cut -c1-3`  = `echo $dimanche` ]] ; then 
coul3=$coulvent1
elif [[ `echo $cale1 | cut -c1-3`  = `echo $samedi` ]] ; then 
coul3=$coulvent3
else coul3=$coulvent7
fi
if [ $cale1 = `echo ${calen1[30]}` ] ; then 
fonts1=18
else fonts1=16
fi
if [ $cale1 = `echo ${calen1[30]}` ] ; then 
pos13=1
else pos13=0
fi
if [[ $cale1 = `echo ${calen1[30]}` ]] ; then 
coul4=$coulvent8
elif [[ `echo $cale1 | cut -c1-3`  = `echo $dimanche` ]] ; then 
coul4=$coulvent10
elif [[ `echo $cale1 | cut -c1-3`  = `echo $samedi` ]] ; then 
coul4=$coulvent10
else coul4=$coultemp7
fi
}

# Cartouche Calendar 2 --------------------------------------------------------

convert -size 1890x100 xc:none  -fill none  $imagetemp
# Prévisions HuitHeure --------------------------------------------------------
dep1=7 ; pos12=23

calen1[0]=`date +%^a%d%^b --date '-30 days'`
calen1[1]=`date +%^a%d%^b --date '-29 days'`
calen1[2]=`date +%^a%d%^b --date '-28 days'`
calen1[3]=`date +%^a%d%^b --date '-27 days'`
calen1[4]=`date +%^a%d%^b --date '-26 days'`
calen1[5]=`date +%^a%d%^b --date '-25 days'`
calen1[6]=`date +%^a%d%^b --date '-24 days'`
calen1[7]=`date +%^a%d%^b --date '-23 days'`
calen1[8]=`date +%^a%d%^b --date '-22 days'`
calen1[9]=`date +%^a%d%^b --date '-21 days'`
calen1[10]=`date +%^a%d%^b --date '-20 days'`
calen1[11]=`date +%^a%d%^b --date '-19 days'`
calen1[12]=`date +%^a%d%^b --date '-18 days'`
calen1[13]=`date +%^a%d%^b --date '-17 days'`
calen1[14]=`date +%^a%d%^b --date '-16 days'`
calen1[15]=`date +%^a%d%^b --date '-15 days'`
calen1[16]=`date +%^a%d%^b --date '-14 days'`
calen1[17]=`date +%^a%d%^b --date '-13 days'`
calen1[18]=`date +%^a%d%^b --date '-12 days'`
calen1[19]=`date +%^a%d%^b --date '-11 days'`
calen1[20]=`date +%^a%d%^b --date '-10 days'`
calen1[21]=`date +%^a%d%^b --date '-9 days'`
calen1[22]=`date +%^a%d%^b --date '-8 days'`
calen1[23]=`date +%^a%d%^b --date '-7 days'`
calen1[24]=`date +%^a%d%^b --date '-6 days'`
calen1[25]=`date +%^a%d%^b --date '-5 days'`
calen1[26]=`date +%^a%d%^b --date '-4 days'`
calen1[27]=`date +%^a%d%^b --date '-3 days'`
calen1[28]=`date +%^a%d%^b --date '-2 days'`
calen1[29]=`date +%^a%d%^b --date '-1 days'`
calen1[30]=`date +%^a%d%^b --date '0 days'`
calen1[31]=`date +%^a%d%^b --date '+1 days'`
calen1[32]=`date +%^a%d%^b --date '+2 days'`
calen1[33]=`date +%^a%d%^b --date '+3 days'`
calen1[34]=`date +%^a%d%^b --date '+4 days'`
calen1[35]=`date +%^a%d%^b --date '+5 days'`
calen1[36]=`date +%^a%d%^b --date '+6 days'`
calen1[37]=`date +%^a%d%^b --date '+7 days'`
calen1[38]=`date +%^a%d%^b --date '+8 days'`
calen1[39]=`date +%^a%d%^b --date '+9 days'`
calen1[40]=`date +%^a%d%^b --date '+10 days'`
calen1[41]=`date +%^a%d%^b --date '+11 days'`
calen1[42]=`date +%^a%d%^b --date '+12 days'`
calen1[43]=`date +%^a%d%^b --date '+13 days'`
calen1[44]=`date +%^a%d%^b --date '+14 days'`
calen1[45]=`date +%^a%d%^b --date '+15 days'`
calen1[46]=`date +%^a%d%^b --date '+16 days'`
calen1[47]=`date +%^a%d%^b --date '+17 days'`
calen1[48]=`date +%^a%d%^b --date '+18 days'`
calen1[49]=`date +%^a%d%^b --date '+19 days'`
calen1[50]=`date +%^a%d%^b --date '+20 days'`
calen1[51]=`date +%^a%d%^b --date '+21 days'`
calen1[52]=`date +%^a%d%^b --date '+22 days'`
calen1[53]=`date +%^a%d%^b --date '+23 days'`
calen1[54]=`date +%^a%d%^b --date '+24 days'`
calen1[55]=`date +%^a%d%^b --date '+25 days'`
calen1[56]=`date +%^a%d%^b --date '+26 days'`
calen1[57]=`date +%^a%d%^b --date '+27 days'`
calen1[58]=`date +%^a%d%^b --date '+28 days'`
calen1[59]=`date +%^a%d%^b --date '+29 days'`
calen1[60]=`date +%^a%d%^b --date '+30 days'`
calen1[61]=`date +%^a%d%^b --date '+31 days'`
calen1[62]=`date +%^a%d%^b --date '+32 days'`
calen1[63]=`date +%^a%d%^b --date '+33 days'`
calen1[64]=`date +%^a%d%^b --date '+34 days'`
calen1[65]=`date +%^a%d%^b --date '+35 days'`
calen1[66]=`date +%^a%d%^b --date '+36 days'`
calen1[67]=`date +%^a%d%^b --date '+37 days'`
calen1[68]=`date +%^a%d%^b --date '+38 days'`
calen1[69]=`date +%^a%d%^b --date '+39 days'`
calen1[70]=`date +%^a%d%^b --date '+40 days'`
calen1[71]=`date +%^a%d%^b --date '+41 days'`
calen1[72]=`date +%^a%d%^b --date '+42 days'`
calen1[73]=`date +%^a%d%^b --date '+43 days'`
calen1[74]=`date +%^a%d%^b --date '+44 days'`
calen1[75]=`date +%^a%d%^b --date '+45 days'`
calen1[76]=`date +%^a%d%^b --date '+46 days'`
calen1[77]=`date +%^a%d%^b --date '+47 days'`
calen1[78]=`date +%^a%d%^b --date '+48 days'`
calen1[79]=`date +%^a%d%^b --date '+49 days'`
calen1[80]=`date +%^a%d%^b --date '+50 days'`
calen1[81]=`date +%^a%d%^b --date '+51 days'`

par

###############################################################################
#                                                                             #
#                                                                             #
#-----------------------------------Calendrier 1------------------------------#
#                                                                             #
#                                                                             #
###############################################################################
samedi="SAT"
dimanche="SUN"
function calendar
{
if [[ $cale1 = `echo ${calen1[30]}` ]] ; then 
coul3=$coulvent6
elif [[ `echo $cale1 | cut -c1-3`  = `echo $dimanche` ]] ; then 
coul3=$coulvent1
elif [[ `echo $cale1 | cut -c1-3`  = `echo $samedi` ]] ; then 
coul3=$coulvent3
else coul3=$coulvent7
fi
if [ $cale1 = `echo ${calen1[30]}` ] ; then 
fonts1=18
else fonts1=16
fi
if [ $cale1 = `echo ${calen1[30]}` ] ; then 
pos13=1
else pos13=0
fi
if [[ $cale1 = `echo ${calen1[30]}` ]] ; then 
coul4=$coulvent8
elif [[ `echo $cale1 | cut -c1-3`  = `echo $dimanche` ]] ; then 
coul4=$coulvent10
elif [[ `echo $cale1 | cut -c1-3`  = `echo $samedi` ]] ; then 
coul4=$coulvent10
else coul4=$coultemp7
fi
}

# Cartouche Calendar 2 --------------------------------------------------------

convert -size 1890x100 xc:none  -fill none  $imagetemp
# Prévisions HuitHeure --------------------------------------------------------
dep1=7 ; pos12=23


calen1[0]=`date +%^a.%d%^b --date '-30 days'`
calen1[1]=`date +%^a.%d%^b --date '-29 days'`
calen1[2]=`date +%^a.%d%^b --date '-28 days'`
calen1[3]=`date +%^a.%d%^b --date '-27 days'`
calen1[4]=`date +%^a.%d%^b --date '-26 days'`
calen1[5]=`date +%^a.%d%^b --date '-25 days'`
calen1[6]=`date +%^a.%d%^b --date '-24 days'`
calen1[7]=`date +%^a.%d%^b --date '-23 days'`
calen1[8]=`date +%^a.%d%^b --date '-22 days'`
calen1[9]=`date +%^a.%d%^b --date '-21 days'`
calen1[10]=`date +%^a.%d%^b --date '-20 days'`
calen1[11]=`date +%^a.%d%^b --date '-19 days'`
calen1[12]=`date +%^a.%d%^b --date '-18 days'`
calen1[13]=`date +%^a.%d%^b --date '-17 days'`
calen1[14]=`date +%^a.%d%^b --date '-16 days'`
calen1[15]=`date +%^a.%d%^b --date '-15 days'`
calen1[16]=`date +%^a.%d%^b --date '-14 days'`
calen1[17]=`date +%^a.%d%^b --date '-13 days'`
calen1[18]=`date +%^a.%d%^b --date '-12 days'`
calen1[19]=`date +%^a.%d%^b --date '-11 days'`
calen1[20]=`date +%^a.%d%^b --date '-10 days'`
calen1[21]=`date +%^a.%d%^b --date '-9 days'`
calen1[22]=`date +%^a.%d%^b --date '-8 days'`
calen1[23]=`date +%^a.%d%^b --date '-7 days'`
calen1[24]=`date +%^a.%d%^b --date '-6 days'`
calen1[25]=`date +%^a.%d%^b --date '-5 days'`
calen1[26]=`date +%^a.%d%^b --date '-4 days'`
calen1[27]=`date +%^a.%d%^b --date '-3 days'`
calen1[28]=`date +%^a.%d%^b --date '-2 days'`
calen1[29]=`date +%^a.%d%^b --date '-1 days'`
calen1[30]=`date +%^a.%d%^b --date '0 days'`
calen1[31]=`date +%^a.%d%^b --date '+1 days'`
calen1[32]=`date +%^a.%d%^b --date '+2 days'`
calen1[33]=`date +%^a.%d%^b --date '+3 days'`
calen1[34]=`date +%^a.%d%^b --date '+4 days'`
calen1[35]=`date +%^a.%d%^b --date '+5 days'`
calen1[36]=`date +%^a.%d%^b --date '+6 days'`
calen1[37]=`date +%^a.%d%^b --date '+7 days'`
calen1[38]=`date +%^a.%d%^b --date '+8 days'`
calen1[39]=`date +%^a.%d%^b --date '+9 days'`
calen1[40]=`date +%^a.%d%^b --date '+10 days'`
calen1[41]=`date +%^a.%d%^b --date '+11 days'`
calen1[42]=`date +%^a.%d%^b --date '+12 days'`
calen1[43]=`date +%^a.%d%^b --date '+13 days'`
calen1[44]=`date +%^a.%d%^b --date '+14 days'`
calen1[45]=`date +%^a.%d%^b --date '+15 days'`
calen1[46]=`date +%^a.%d%^b --date '+16 days'`
calen1[47]=`date +%^a.%d%^b --date '+17 days'`
calen1[48]=`date +%^a.%d%^b --date '+18 days'`
calen1[49]=`date +%^a.%d%^b --date '+19 days'`
calen1[50]=`date +%^a.%d%^b --date '+20 days'`
calen1[51]=`date +%^a.%d%^b --date '+21 days'`
calen1[52]=`date +%^a.%d%^b --date '+22 days'`
calen1[53]=`date +%^a.%d%^b --date '+23 days'`
calen1[54]=`date +%^a.%d%^b --date '+24 days'`
calen1[55]=`date +%^a.%d%^b --date '+25 days'`
calen1[56]=`date +%^a.%d%^b --date '+26 days'`
calen1[57]=`date +%^a.%d%^b --date '+27 days'`
calen1[58]=`date +%^a.%d%^b --date '+28 days'`
calen1[59]=`date +%^a.%d%^b --date '+29 days'`
calen1[60]=`date +%^a.%d%^b --date '+30 days'`
calen1[61]=`date +%^a.%d%^b --date '+31 days'`
calen1[62]=`date +%^a.%d%^b --date '+32 days'`
calen1[63]=`date +%^a.%d%^b --date '+33 days'`
calen1[64]=`date +%^a.%d%^b --date '+34 days'`
calen1[65]=`date +%^a.%d%^b --date '+35 days'`
calen1[66]=`date +%^a.%d%^b --date '+36 days'`
calen1[67]=`date +%^a.%d%^b --date '+37 days'`
calen1[68]=`date +%^a.%d%^b --date '+38 days'`
calen1[69]=`date +%^a.%d%^b --date '+39 days'`
calen1[70]=`date +%^a.%d%^b --date '+40 days'`
calen1[71]=`date +%^a.%d%^b --date '+41 days'`
calen1[72]=`date +%^a.%d%^b --date '+42 days'`
calen1[73]=`date +%^a.%d%^b --date '+43 days'`
calen1[74]=`date +%^a.%d%^b --date '+44 days'`
calen1[75]=`date +%^a.%d%^b --date '+45 days'`
calen1[76]=`date +%^a.%d%^b --date '+46 days'`
calen1[77]=`date +%^a.%d%^b --date '+47 days'`
calen1[78]=`date +%^a.%d%^b --date '+48 days'`
calen1[79]=`date +%^a.%d%^b --date '+49 days'`
calen1[80]=`date +%^a.%d%^b --date '+50 days'`
calen1[81]=`date +%^a.%d%^b --date '+51 days'`

et dit moi si c'est mieux a moins que tu veuille en francais
edit: pardon j'ma gouré

Dernière modification par daniel38100 (Le 07/09/2013, à 11:09)

Hors ligne

#773 Le 07/09/2013, à 11:18

daniel38100

Re : [Conky] Alternative à weather.com (3)

Didier-T a écrit :

@daniel38100,
La modif est faite, j'ai ajouter les 4 espaces qui manquaient.

j'est effectuer ta modif mais du coup au niveau des MAJ complete j'ai cette erreur

huitHeures 1 Ok
huitHeures 2 Ok
Jour 1 Ok
Nuit 1 Ok
Jour 2 Ok
Nuit 2 Ok
Jour 3 Ok
Nuit 3 Ok
Jour 4 Ok
Nuit 4 Ok
Jour 5 Ok
Nuit 5 Ok
Jour 6 Ok
Nuit 6 Ok
Jour 7 Ok
Nuit 7 Ok
Jour 8 Ok
Nuit 8 Ok
Jour 9 Ok
Nuit 9 Ok
Jour 10 Ok
Nuit 10 Ok
Jour 11 Ok
Nuit 11 Ok
Jour 12 Ok
Nuit 12 Ok
Jour 13 Ok
Nuit 13 Ok
Jour 14 Ok
Nuit 14 Ok
Jour 15 Ok
Nuit 15 Ok
CC Ok
/tmp/saint-pierre-des-corps-daniel/lunaison.png
/tmp/saint-pierre-des-corps-daniel/Barometre_hr.png
/tmp/saint-pierre-des-corps-daniel/Rose-CC.png
/tmp/saint-pierre-des-corps-daniel/CC_thermver.png
/tmp/saint-pierre-des-corps-daniel/CC_thermrou.png
Traceback (most recent call last):
  File "/home/daniel/Accuweather/scripts/recmeteo.py", line 380, in <module>
    demonise(ent, nb1, nb2, huitHeures, nbJour, interval, nbFoisHuit, Id, demon)
  File "/home/daniel/Accuweather/scripts/recmeteo.py", line 349, in demonise
    mess.show()
  File "/usr/lib/python3/dist-packages/notify2.py", line 188, in show
    self.timeout,  # expire_timeout
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.116 was not provided by any .service files

et j'vais peut être un peu loin mais serait-il possible d'y associer au .cfg

Dernière modification par daniel38100 (Le 07/09/2013, à 11:38)

Hors ligne

#774 Le 07/09/2013, à 11:56

oOMaverickOo

Re : [Conky] Alternative à weather.com (3)

Modifications effectuées, ça marche nikel, merci Daniel !


2 Xubuntu 14.04.x / 1 Windows 8.1
Membre April N°9016

"We all change. When you think about it, we are all different people, all through our lives. And that's ok, that's good, you gotta keep moving, so long as you remember all the people that you used to be. I will not forget one line of this. Not one day...I swear. I will always remember when the Doctor was me"

Hors ligne

#775 Le 07/09/2013, à 14:12

Didier-T

Re : [Conky] Alternative à weather.com (3)

Daniel38100, je vais préparer une mise à jour, par contre je ne parviens pas à reproduire le souci de jeje2a (dommage, sa aurai permis de régler en même temps)

Hors ligne