Remarque: Grand frêre de startup1 avec une variante: Une boule d'attente. tant que pas blackbox sleep 1. Si ça avait-été l'attente d'une fin d'execution un wait aurait été bien plus intéressant
#!/bin/bash
PROGS[1]=
"/usr/bin/xscreensaver -no-splash -display :0.0 &"
PROGS[2]=
"/usr/bin/parcellite -d -n"
PROGS[3]=
"/usr/bin/idesk &"
PROGS[4]=
"sleep 1; /usr/bin/conky -q -d -c /home/thomas/.idesktop/conkyrc"
while [
-z "$(pidof blackbox)" ];
do
sleep 1;
done;
for screen
in ":0.0" ":0.1";
do
DISPLAY=$screen bbkeys -c /home/thomas/.idesktop/bbkeysrc &
case $screen in
":0.0")
BG="/home/thomas/.idesktop/backgrounds/tux-life.jpg"
;;
":0.1")
BG="/home/thomas/.idesktop/backgrounds/zinzins.espace.jpg"
;;
esac
/usr/bin/xsetbg \
-onroot \
-xzoom $(DISPLAY=$screen xrandr |
sed -r -e '/current/! d' -e "s/.*current ([0-9]+) x ([0-9]+),.*/\1*101\/$(identify $BG |
sed -r 's/.*JPEG ([0-9]+)x.*/\1/g')/g" |
bc) \
-yzoom $(DISPLAY=$screen xrandr |
sed -r -e '/current/! d' -e "s/.*current ([0-9]+) x ([0-9]+),.*/\2*101\/$(identify $BG |
sed -r 's/.*JPEG [0-9]+x([0-9]+).*/\1/g')/g" |
bc) \
-center \
-display $screen $BG;
done
for i
in $(seq
${#PROGS[*]});
do
bash -c "${PROGS[$i]}" &
done