oOMaverickOo a écritdaniel38100 a écritoOMaverickOo a écritBonsoir,
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