jpdipsy a écrit@Sfroumptch
Tu as raison mais le masochisme tu peux pas savoir ce que c'est bon rhaaa.. lovely :lol:
@Didier
Une nouvelle fois merci mon "petit"
@ragamatrix quand tu aura la possibilité tu me fera voir le création modules résultant dans ton /tmp
@Didier-T
Merci encore !!
@jpdipsy
création modules résultant dans /tmp/horgen/316407/:
#!/bin/bash
##########################################
cheminref=~/.conky/conky40/Meteo-Lua
source /home/climatix/.conky/conky40/Meteo-Lua/configs/fondecran.cfg 2>/dev/null
source /home/climatix/.conky/conky40/Meteo-Lua/configs/meteo.cfg 2>/dev/null
##########################################
# Crée par JPDipsy v1.4 #
##########################################
repville=`echo $web | cut -d / -f6-7`
# initialisation variables ----------------------------------------------------
repertimages=$TempShell/$repville
reptemp=$repertimages/cartouches
imagetemp=$repertimages/cartouches/temp.png
imagetemp1=$repertimages/cartouches/temp1.png
fondbase=$repsauv/fond-base.png
fondtravail=$repsauv/fond-travaille.png
#------------------------------------------------------------------------------
if [[ ! -d $reptemp ]]; then
mkdir $repertimages/cartouches
fi
#------------------ Variables que vous pouvez modifier ------------------------
fonte=Helvetica-LT-Std-Bold # fonte generique
fonte1=Spaceship-Bullet-Normal # fonte ville
fonte2=Times-Bold
fonte3=Monaco-Regular # fonte cond act
couleur1=white ; couleur2=orangered # couleur texte
# couleur texte
couleur1="white"
couleur2="orange"
couleur3="cyan"
couleur4="yellow"
couleur5="#C16600"
couleur6="honeydew2"
couleur7="orangered"
couleur8="orangered"
couleur9="orangered"
# couleurs paliers temp
coultemp1="aqua"
coultemp2="dodgerblue1"
coultemp3="yellow"
coultemp4="white"
coultemp5="springgreen"
coultemp6="red"
coultemp7="black"
# 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=50
# taille du cartouche ville jouez sur l'echelle pour des grands noms de ville
# ex 100 taille normal 50 taille moitié
taille_ville=100
# position de 0 à ce que vous voulez pour aligner avec une autre fonte
# ex : -10 pour descendre +10 pour remonter
position_ville=100
# lunaison --------------------------------------------------------------------
convert -size 130x130 xc:transparent $TempShell/lune.png -gravity center -geometry 60x60+0+0 -composite $reptemp/lune.png
convert -background none -fill blue -font $fonte2 -pointsize 13 -gravity center label:"Gibbeuse ascendante" -trim \
\( +clone -background skyblue -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp
composite -gravity center -background transparent -geometry +0+40 $imagetemp $reptemp/lune.png $reptemp/lune.png
# ville --TEST---TRANSPARENCE------------------------------------------------------
# ville -----------------------------------------------------------------------
convert -size 300x120 xc:transparent -font $fonte1 -pointsize 80 -fill black -annotate +37+80 label:"horgen" \
-fill white -annotate +39+82 'horgen' \
-fill transparent -annotate +36+81 'horgen' /tmp/horgen/316407/cartouches/image-depart.png
convert -size 300x120 xc:black -font Spaceship-Bullet-Normal -pointsize 80 \
-fill white -annotate +37+80 'horgen' \
-fill white -annotate +39+82 'horgen' \
-fill black -annotate +36+81 'horgen' /tmp/horgen/316407/cartouches/mask.jpg
#découpage
composite -compose CopyOpacity /tmp/horgen/316407/cartouches/mask.jpg /tmp/horgen/316407/cartouches/image-depart.png $reptemp/ville.png
#création d'un fond si on veut
#convert -size 300x120 xc:grey $reptemp/ville.png -composite /tmp/horgen/316407/cartouches/image-finale.png
rm /tmp/horgen/316407/cartouches/mask.jpg /tmp/horgen/316407/cartouches/image-depart.png
#ou simplement ajouté à une image exixtante
#convert image-existante titre.png -background transparent -gravity North -geometry -210+20 -composite image-finale.png
# placement sur l'image # assemblage et résultat
#
# conditions actuelles --------------------------------------------------------
act1="Ciel Très Nuageux"
act2=" "
if [ "$act2" != " " ];then
convert -font $fonte2 -pointsize 23 \
-background none label:"$act1\n .. $act2" \
\( +clone -sparse-color barycentric '0,%h gold %w,0 red' \) \
\( +clone -background black -shadow 100x2+2+2 \) +swap -background transparent -compose over -layers merge +repage $imagetemp
convert -size 450x50 xc:transparent $imagetemp -background transparent -gravity center -composite $reptemp/condactuel.png
else
convert -font $fonte2 -pointsize 23 \
-background none label:"$act1" \
\( +clone -sparse-color barycentric '0,%h gold %w,0 red' \) \
\( +clone -background black -shadow 100x2+2+2 \) +swap -background transparent -compose over -layers merge +repage $imagetemp
convert -size 450x50 xc:transparent $imagetemp -background transparent -gravity center -composite $reptemp/condactuel.png
fi
# 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
}
function coultemp1
{
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 coulvent1
{
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=-2 ; coultemp
convert -background transparent -font $fonte -pointsize 28 -fill $coul label:$temp"°" $reptemp/max.png
temp=-1 ;risqueverglas; coultemp
convert -background transparent -font $fonte -pointsize 14 -fill $couleur1 label:"/" -fill $coul label:$temp"°" +append $reptemp/ress.png
temp=3 ; 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="-2";temp1="-1";bas="$temp";plusbas
temp1="-2";plusbas
temp1="-4";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 +48+2 -composite \
$reptemp/ress.png -background transparent -gravity Northwest -geometry +58+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 ------------------------------------------------------------------
# à ajouter positionnement
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 "7° / 4°" $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 $IconesRep/jour/mc.png -resize 60% -bordercolor None -border 20x20 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over $reptemp/ico_cond.png
#creation cartouche -----------------------------------------------------------
convert -size 180x175 xc:none -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,1 179,174 10,10" $imagetemp
# données meteo cartouche 1 ---------------------------------------------------
#prochaine M.a.j
heure=10
if (( `echo ${heure:0:1}` == 0 ));then heure=`echo ${heure:1:1}` ; fi
mins=25
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
if [ "$verglas" = "oui" ];then
convert $imagetemp -background transparent \
-gravity Northwest -font $fonte -pointsize 11 -fill $couleur6 -annotate +$bord+$posdepart "Prob. Précip." -annotate +$pos1+$posdepart ":" -annotate +$pos2+$posdepart "3 %" \
-annotate +$bord+$(((ecart*1)+posdepart)) "Humidité" -annotate +$pos2+$(((ecart*1)+posdepart)) "74 %" \
-annotate +$bord+$(((ecart*2)+posdepart)) "Vent force" -annotate +$pos2+$(((ecart*2)+posdepart)) "6 km/h" \
-annotate +$bord+$(((ecart*3)+posdepart)) "Vent dir." -annotate +$pos2+$(((ecart*3)+posdepart)) "NNO" \
-annotate +$bord+$(((ecart*4)+posdepart)) "Raf Max" -annotate +$pos2+$(((ecart*4)+posdepart)) "6 Km/h " \
-annotate +$bord+$(((ecart*5)+posdepart)) "Pluie / Neige" -annotate +$pos2+$(((ecart*5)+posdepart)) "0 mm / 0 cm" \
-annotate +$bord+$(((ecart*6)+posdepart)) "Verglas" -annotate +$pos2+$(((ecart*6)+posdepart)) "0 mm" \
-annotate +$bord+$(((ecart*7)+posdepart)) "Pression" -annotate +$pos2+$(((ecart*7)+posdepart)) "1003 mb" \
-annotate +$bord+$(((ecart*8)+posdepart)) "Visibilité" -annotate +$pos2+$(((ecart*8)+posdepart)) "1 km U.V : 0" \
-annotate +$bord+$(((ecart*9)+posdepart)) "Levé / Couché" -annotate +$pos2+$(((ecart*9)+posdepart)) "08h03 / 17h13" \
-annotate +$bord+$(((ecart*10)+posdepart)) "Durée du jour" -annotate +$pos2+$(((ecart*10)+posdepart)) "9h10" \
-annotate +$bord+$(((ecart*11)+posdepart)) "Mise à jour à" -annotate +$pos2+$(((ecart*11)+posdepart)) "10h25" \
-annotate +$bord+$(((ecart*12)+posdepart)) "Prochaine à" -annotate +$pos2+$(((ecart*12)+posdepart)) "$resproch" \
$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 "3 %" \
-annotate +$bord+$(((ecart*1)+posdepart)) "Humidité" -annotate +$pos2+$(((ecart*1)+posdepart)) "74 %" \
-annotate +$bord+$(((ecart*2)+posdepart)) "Vent force" -annotate +$pos2+$(((ecart*2)+posdepart)) "6 km/h" \
-annotate +$bord+$(((ecart*3)+posdepart)) "Vent dir." -annotate +$pos2+$(((ecart*3)+posdepart)) "NNO" \
-annotate +$bord+$(((ecart*4)+posdepart)) "Raf Max" -annotate +$pos2+$(((ecart*4)+posdepart)) "6 Km/h " \
-annotate +$bord+$(((ecart*5)+posdepart)) "Pluie " -annotate +$pos2+$(((ecart*5)+posdepart)) "0 mm " \
-annotate +$bord+$(((ecart*6)+posdepart)) "Pression" -annotate +$pos2+$(((ecart*6)+posdepart)) "1003 mb" \
-annotate +$bord+$(((ecart*7)+posdepart)) "Visibilité" -annotate +$pos2+$(((ecart*7)+posdepart)) "1 km" \
-annotate +$bord+$(((ecart*8)+posdepart)) "U.V" -annotate +$pos2+$(((ecart*8)+posdepart)) "0" \
-annotate +$bord+$(((ecart*9)+posdepart)) "Levé / Couché" -annotate +$pos2+$(((ecart*9)+posdepart)) "08h03 / 17h13" \
-annotate +$bord+$(((ecart*10)+posdepart)) "Durée du jour" -annotate +$pos2+$(((ecart*10)+posdepart)) "9h10" \
-annotate +$bord+$(((ecart*11)+posdepart)) "Mise à jour à" -annotate +$pos2+$(((ecart*11)+posdepart)) "10h25" \
-annotate +$bord+$(((ecart*12)+posdepart)) "Prochaine à" -annotate +$pos2+$(((ecart*12)+posdepart)) "$resproch" \
$imagetemp
fi
#------------------------------------------------------------------------------
# ombres cartouche
convert $imagetemp -bordercolor None -border 10x10 \( +clone -background black -shadow 100x2 \) \
-compose DstOver -composite -compose Over $reptemp/actuel.png
# versions ---------------------------------------------------------------------
#convert -background none -fill orange -font $fonte -pointsize 10 \
#label:"Dernière mise à jour météo : Mer 23 Jan 2013 à 10h25" -trim \
#\( +clone -background grey19 -shadow 100x1 -channel A -level 0,5% +channel \) +swap +repage -gravity center -composite $reptemp/maj.png
convert -background none -fill orange -font $fonte -pointsize 10 \
label:"Météo-Lua v5 - Image-Météo v2.3c" -trim \
\( +clone -background grey19 -shadow 100x1 -channel A -level 0,5% +channel \) +swap +repage -gravity center -composite $reptemp/versions.png
# rose des vents --------------------------------------------------------------
# creation rose
# "/tmp/horgen/316407/Rose.png" # laisser commenté
convert $repertimages/Rose.png -bordercolor None -border 10x10 \( +clone -background black -shadow 60x3 \) -compose DstOver -composite -compose Over $reptemp/Rose.png
###############################################################################
# #
# #
#-----------------------------------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 1440x50 xc:none -fill none $imagetemp
# Prévisions HuitHeure --------------------------------------------------------
dep1=7 ; pos12=23
calen1[0]=`date +%^a%d --date '-30 days'`
calen1[1]=`date +%^a%d --date '-29 days'`
calen1[2]=`date +%^a%d --date '-28 days'`
calen1[3]=`date +%^a%d --date '-27 days'`
calen1[4]=`date +%^a%d --date '-26 days'`
calen1[5]=`date +%^a%d --date '-25 days'`
calen1[6]=`date +%^a%d --date '-24 days'`
calen1[7]=`date +%^a%d --date '-23 days'`
calen1[8]=`date +%^a%d --date '-22 days'`
calen1[9]=`date +%^a%d --date '-21 days'`
calen1[10]=`date +%^a%d --date '-20 days'`
calen1[11]=`date +%^a%d --date '-19 days'`
calen1[12]=`date +%^a%d --date '-18 days'`
calen1[13]=`date +%^a%d --date '-17 days'`
calen1[14]=`date +%^a%d --date '-16 days'`
calen1[15]=`date +%^a%d --date '-15 days'`
calen1[16]=`date +%^a%d --date '-14 days'`
calen1[17]=`date +%^a%d --date '-13 days'`
calen1[18]=`date +%^a%d --date '-12 days'`
calen1[19]=`date +%^a%d --date '-11 days'`
calen1[20]=`date +%^a%d --date '-10 days'`
calen1[21]=`date +%^a%d --date '-9 days'`
calen1[22]=`date +%^a%d --date '-8 days'`
calen1[23]=`date +%^a%d --date '-7 days'`
calen1[24]=`date +%^a%d --date '-6 days'`
calen1[25]=`date +%^a%d --date '-5 days'`
calen1[26]=`date +%^a%d --date '-4 days'`
calen1[27]=`date +%^a%d --date '-3 days'`
calen1[28]=`date +%^a%d --date '-2 days'`
calen1[29]=`date +%^a%d --date '-1 days'`
calen1[30]=`date +%^a%d --date '0 days'`
calen1[31]=`date +%^a%d --date '+1 days'`
calen1[32]=`date +%^a%d --date '+2 days'`
calen1[33]=`date +%^a%d --date '+3 days'`
calen1[34]=`date +%^a%d --date '+4 days'`
calen1[35]=`date +%^a%d --date '+5 days'`
calen1[36]=`date +%^a%d --date '+6 days'`
calen1[37]=`date +%^a%d --date '+7 days'`
calen1[38]=`date +%^a%d --date '+8 days'`
calen1[39]=`date +%^a%d --date '+9 days'`
calen1[40]=`date +%^a%d --date '+10 days'`
calen1[41]=`date +%^a%d --date '+11 days'`
calen1[42]=`date +%^a%d --date '+12 days'`
calen1[43]=`date +%^a%d --date '+13 days'`
calen1[44]=`date +%^a%d --date '+14 days'`
calen1[45]=`date +%^a%d --date '+15 days'`
calen1[46]=`date +%^a%d --date '+16 days'`
calen1[47]=`date +%^a%d --date '+17 days'`
calen1[48]=`date +%^a%d --date '+18 days'`
calen1[49]=`date +%^a%d --date '+19 days'`
calen1[50]=`date +%^a%d --date '+20 days'`
calen1[51]=`date +%^a%d --date '+21 days'`
calen1[52]=`date +%^a%d --date '+22 days'`
calen1[53]=`date +%^a%d --date '+23 days'`
calen1[54]=`date +%^a%d --date '+24 days'`
calen1[55]=`date +%^a%d --date '+25 days'`
calen1[56]=`date +%^a%d --date '+26 days'`
calen1[57]=`date +%^a%d --date '+27 days'`
calen1[58]=`date +%^a%d --date '+28 days'`
calen1[59]=`date +%^a%d --date '+29 days'`
calen1[60]=`date +%^a%d --date '+30 days'`
calen1[61]=`date +%^a%d --date '+31 days'`
for (( x=0 ; x<62 ; x++ ));do
cale1=`echo ${calen1[x]}`;calendar
echo ${calen1[x]} | 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
# ombres cartouche 5 ----------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background none -shadow 100x2 \) -compose DstOver -composite -compose Over $reptemp/cartouche5.png
###############################################################################
# Prévisions cartouche 6 huit heures ######################################################
###############################################################################
# Prévisions HuitHeure --------------------------------------------------------
dep1=7 ; pos12=23
convert -size 205x305 xc:none -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,204,304,10,10" $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,7% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite -gravity west -background transparent -geometry +4+0 -dissolve 65% $imagetemp1 $imagetemp $imagetemp
echo -n "Huit Heures" | 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,7% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite -gravity east -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 --------------------------------------
heure[1]=10;heure[2]=11;heure[3]=12;heure[4]=13;heure[5]=14;heure[6]=15;heure[7]=16;heure[8]=17
ventd[1]=N;ventd[2]=N;ventd[3]=NNE
ventd[4]=NNE;ventd[5]=NNE;ventd[6]=NNE
ventd[7]=N;ventd[8]=NNE
ventf[1]=3;ventf[2]=3;ventf[3]=3
ventf[4]=3;ventf[5]=5;ventf[6]=5
ventf[7]=3;ventf[8]=3;
for (( x=1 ; x<9 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte -pointsize 11 -fill $couleur6 \
-annotate +$((pos1))+$(((ecart*x-ecart)+posdepart)) "${heure[x]} heure" $imagetemp
convert $imagetemp -background transparent -gravity Northwest -font $fonte -pointsize 11 -fill $couleur5 \
-annotate +$((pos2))+$(((ecart*x-ecart)+posdepart)) "${ventd[x]}" $imagetemp
vent=${ventf[x]};coulvent1
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 -----------------------------------------------------------------
# temp max jour/nuit
tempheure[1]=-2;tempheure[2]=0;tempheure[3]=1
tempheure[4]=2;tempheure[5]=3;tempheure[6]=2
tempheure[7]=2;tempheure[8]=1
for (( x=1 ; x<9 ; x++ ));do
temp=${tempheure[x]};coultemp1
convert $imagetemp -background transparent -gravity Northeast -font $fonte -pointsize 11 -fill $coul \
-annotate +155+$(((ecart*x-ecart)+posdepart1)) "${tempheure[x]}°C" $imagetemp
done
# icones ----------------------------------------------------------------------
tailleic=51x30 ; pos=55 ; tailleic1=30x30 ; pos1=105 ; posdepart=17
icond2[1]=$IconesRep/jour/mc.png;icond2[2]=$IconesRep/jour/mc.png;icond2[3]=$IconesRep/jour/mc.png
icond2[4]=$IconesRep/jour/mc.png;icond2[5]=$IconesRep/jour/mc.png;icond2[6]=$IconesRep/jour/c.png;icond2[7]=$IconesRep/jour/c.png;icond2[8]=$IconesRep/jour/c.png
ivent2[1]=$IconesRep/vent/10.png;ivent2[2]=$IconesRep/vent/10.png;ivent2[3]=$IconesRep/vent/11.png;ivent2[4]=$IconesRep/vent/11.png;ivent2[5]=$IconesRep/vent/11.png;ivent2[6]=$IconesRep/vent/11.png;ivent2[7]=$IconesRep/vent/10.png;ivent2[8]=$IconesRep/vent/11.png
for (( x=1 ; x<9 ; x++ ));do
convert $imagetemp ${icond2[x]} -background transparent -geometry $tailleic+$pos+$(((ecart*x-ecart)+posdepart)) -composite \
${ivent2[x]} -background transparent -geometry $tailleic1+$pos1+$(((ecart*x-ecart)+posdepart)) -composite $imagetemp
done
# ombres cartouche 6 ----------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over $reptemp/cartouche6.png
# Prévisions cartouche 1 ------------------------------------------------------
convert -size 200x200 xc:none -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,5,199,195,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
jour[1]=Jeu;jour[2]=Ven;jour[3]=Sam;jour[4]=Dim;jour[5]=Lun
ventd[1]=NNE;ventd[2]=NE;ventd[3]=ENE
ventd[4]=ESE;ventd[5]=SO
ventf[1]=3;ventf[2]=2;ventf[3]=3
ventf[4]=5;ventf[5]=3
for (( x=1 ; x<6 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte -pointsize 11 -fill $couleur2 \
-annotate +$((pos1))+$(((ecart*x-ecart)+posdepart)) "${jour[x]}" \
-annotate +$((pos2))+$(((ecart*x-ecart)+posdepart)) "${ventd[x]}" $imagetemp
convert $imagetemp -background transparent -gravity Northwest -font $fonte -pointsize 11 -fill $couleur1 \
-annotate "$rot"x"$rot"+$pos3+$(((ecart*x-ecart)+posdepart1)) "${ventf[x]} km/h" $imagetemp
done
# températures -----------------------------------------------------------------
# slash
for (( x=0 ; x<5 ; 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]=1;tempjour[2]=-1;tempjour[3]=1
tempjour[4]=4;tempjour[5]=3
tempnuit[1]=-7;tempnuit[2]=-8;tempnuit[3]=-7
tempnuit[4]=-1;tempnuit[5]=-4
for (( x=1 ; x<6 ; 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]=$IconesRep/jour/fl.png;icond[2]=$IconesRep/jour/psu.png;icond[3]=$IconesRep/jour/msu.png
icond[4]=$IconesRep/jour/mc.png;icond[5]=$IconesRep/jour/c.png
ivent[1]=$IconesRep/vent/11.png;ivent[2]=$IconesRep/vent/12.png;ivent[3]=$IconesRep/vent/13.png;
ivent[4]=$IconesRep/vent/15.png;ivent[5]=$IconesRep/vent/04.png
for (( x=1 ; x<6 ; 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
# nettoyage -------------------------------------------------------------------
rm $imagetemp1; rm $imagetemp
# Mise en forme de l'image ----------------------------------------------------
# mise à l'echelle du fond
convert -resize $ecran! $repsauv/fond-base.png $repsauv/fond-base.png
# mise en forme ville
convert -resize $taille_ville% $reptemp/ville.png $reptemp/ville.png
# assemblage
## ajout couverture nuageuse et autres scripts##
$cheminref/scripts/imagesat-couvnuage.sh
~/développement/pgcrs-0.2.1/random-nasa-wallpaper.pl > /dev/null 2>&1
~/.conky/script/image_nasa_ghost.sh
~/.conky/script/detour_terre2.sh
# pour réglage positionnement si besoin jouez sur les nombre de -geometry -210+$((10+decalagehaut))
# -geometry ±posdroitegauche±hautbas
convert $fondbase \
~/wallpapers/image_nasa_ghost_blue.png -background transparent -gravity North -geometry -300+$((400+decalagehaut)) -composite \
~/image1.png -background transparent -gravity North -geometry +500+$((390+decalagehaut)) -composite \
/tmp/imagesat-couvnuage.png -background transparent -gravity North -geometry +490+$((45+decalagehaut)) -composite \
$reptemp/ico_cond.png -background transparent -gravity North -geometry -210+$((10+decalagehaut)) -composite \
$reptemp/lune.png -background transparent -gravity North -geometry +205+$((-2+decalagehaut)) -composite \
$reptemp/ville.png -background transparent -gravity center -geometry +0-$((400+position_ville-decalagehaut)) -composite \
$reptemp/condactuel.png -background transparent -gravity North -geometry -0+$((85+decalagehaut)) -composite \
$reptemp/temps.png -background transparent -gravity North -geometry -62+$((120+decalagehaut)) -composite \
$reptemp/Rose.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/versions.png -background transparent -gravity North -geometry +0+$((255+decalagehaut)) -composite \
$reptemp/cartouche5.png -background transparent -gravity North -geometry +0+$((320+decalagehaut)) -composite \
$reptemp/cartouche6.png -background transparent -gravity North -geometry -420+$((55+decalagehaut1)) -composite \
$fondtravail
################################################################################
# Changements
# v1.1 alignement Haut/bas
# v1.2 ajout couverture nuageuse
# v1.3 sources gérées par image-meteo
# v1.4 ajout temp la plus basse