-
Notifications
You must be signed in to change notification settings - Fork 1
/
background.sh
63 lines (46 loc) · 1.53 KB
/
background.sh
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
#!/bin/bash
if [[ -d /tmp/greeter ]]
then
echo "/greeter exists within /tmp/, deleting."
rm -rf /tmp/greeter
fi
# Clones greeter into tmp
cd /tmp/
git clone https://github.com/elementary/greeter.git
cd /tmp/greeter/data
# Deletes default grey background tile.
rm -rf texture.png
# Copies new image used for background.
cp /home/"$SUDO_USER"/Pictures/texture.png /tmp/greeter/data/texture.png
cd /tmp/greeter/compositor
# Settings file used in greeter to indicate which file it is using.
filename=SystemBackground.vala
# Replace path to new texture's path.
sed -i "s/resource\:\/\/\/io\/elementary\/desktop\/gala\/texture\.png/resource\:\/\/\/io\/elementary\/greeter\/texture\.png/" $filename
cd /tmp/greeter
# Build greeter
meson _build --prefix=/usr
ninja install -C _build
#!/bin/bash
if [[ -d /tmp/greeter ]]
then
echo "/greeter exists within /tmp/, deleting."
rm -rf /tmp/greeter
fi
# Clones greeter into tmp
cd /tmp/
git clone https://github.com/elementary/greeter.git
cd /tmp/greeter/data
# Deletes default grey background tile.
rm -rf texture.png
# Copies new image used for background.
cp /home/"$SUDO_USER"/Pictures/texture.png /tmp/greeter/data/texture.png
cd /tmp/greeter/compositor
# Settings file used in greeter to indicate which file it is using.
filename=SystemBackground.vala
# Replace path to new texture's path.
sed -i "s/resource\:\/\/\/io\/elementary\/desktop\/gala\/texture\.png/resource\:\/\/\/io\/elementary\/greeter\/texture\.png/" $filename
cd /tmp/greeter
# Build greeter
meson _build --prefix=/usr
ninja install -C _build