-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwallpapers.install
executable file
·81 lines (72 loc) · 2.13 KB
/
wallpapers.install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#! /bin/bash
cd apricity-wallpapers/
if [ $? -eq 0 ] ; then
sudo cp -var backgrounds/apricity/ /usr/share/backgrounds/ 1>/dev/null
cd /usr/share/backgrounds/
sudo chown root:root -R apricity
sudo chmod -x apricity/*
exec &> /usr/share/gnome-background-properties/apricity-backgrounds.xml
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE wallpapers SYSTEM \"gnome-wp-list.dtd\">
<wallpapers>"
for image in `ls apricity/ | grep -v '.xml'`; do
#statements
var1=$(echo $image | cut -f1 -d.)
echo ' <wallpaper deleted="false">'
echo " <name>$var1</name>"
echo " <filename>/usr/share/backgrounds/apricity/$image</filename>"
echo ' <options>zoom</options>'
echo ' <pcolor>#ffffff</pcolor>'
echo ' <scolor>#000000</scolor>'
echo ' </wallpaper>'
done
echo "</wallpapers>"
ls /usr/share/backgrounds/ubuntu-gnome 1>/dev/null
if [ $? -eq 0 ] ; then
#statements
cd /usr/share/backgrounds/
file=`ls ubuntu-gnome | grep '.xml'`
exec &> /usr/share/backgrounds/ubuntu-gnome/$file
echo "<background>
<starttime>
<year>2009</year>
<month>08</month>
<day>04</day>
<hour>00</hour>
<minute>00</minute>
<second>00</second>
</starttime>
<!-- This animation will start at midnight. -->"
i=0
firstIm=""
for image in `ls apricity/ | grep -v '.xml'`; do
#statements
if [[ $i -eq 0 ]]; then
#statements
echo " <static>
<duration>1295.0</duration>
<file>/usr/share/backgrounds/apricity/$image</file>
</static>
<transition>
<duration>5.0</duration>
<from>/usr/share/backgrounds/apricity/$image</from>"
i=1
firstIm=$image
else
echo " <to>/usr/share/backgrounds/apricity/$image</to>"
echo " </transition>"
echo " <static>"
echo " <duration>1295.0</duration>"
echo " <file>/usr/share/backgrounds/apricity/$image</file>"
echo " </static>"
echo " <transition>"
echo " <duration>5.0</duration>"
echo " <from>/usr/share/backgrounds/apricity/$image</from>"
fi
done
echo " <to>/usr/share/backgrounds/apricity/$firstIm</to>
</transition>
</background>
"
fi
fi