#1 Le 13/05/2011, à 13:40
- reivillo
BACKGROUND.Script de montage DIAPORAMA pour fond d'ecran.
Bonjour à tous.
Pour créer votre arrière-plan animé de bureau,
agir comme suit, dans votre dossier personnel:
0: Créer un DOSSIER et renommer-le en test,
et y coller vos images .jpg.
1: Créer un FICHIER texte, et renommer-le en test.sh.
2: Y copier/coller le SCRIPT ci-dessous.
3: Le rendre exécutable comme ceci:
Clic droit sur son ICONE;
Puis: Propriééts, Permissions, et enfin cocher la case,
Exécution: Autoriser l'exécution du fichier comme un programme
et Fermer la fenềtre.
ou dans le TERMINAL chmod u+x test.sh
(Commande de LANCEMENT)./test.sh test
Après tests, si OK, RENOMMER fichier et dossier a votre convenance.
A+.
Reivillo.
#!/bin/bash
tbk=$1/background-1.xml
> $tbk
tpt=$1/temptest.txt
tss=10.0 # =10 secondes pour tester, après, changer en 1795.0 pour 30 minutes.
tts=5.0
find $1 -name "*.jpg" > $tpt
w=0; while read aLine; do myarray[$w]=$aLine; w=$(($w+1)); done < $tpt
rm $tpt
myarray[$w]=${myarray[0]}
echo "<background>" > $tbk
for ((f=0 ; $w - $f ; f++)) do
echo " <static>" >> $tbk
echo " <duration>$tss</duration>" >> $tbk
echo " <file>${myarray[$f]}</file>" >> $tbk
echo " </static>" >> $tbk
echo " <transition>" >> $tbk
echo " <duration>$tts</duration>" >> $tbk
echo " <from>${myarray[$f]}</from>" >> $tbk
echo " <to>${myarray[$(($f+1))]}</to>" >> $tbk
echo " </transition>done" >> $tbk
done
echo "</background>" >> $tbk
Dernière modification par reivillo (Le 19/05/2011, à 13:16)
Version LinuxMint 13 (maya-mate(32-bit)) LTS Noyau 3.2.0-39-generic (06-04-2013)
Sur http://www.linuxmint.com/edition.php?id=103
Hors ligne