-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtapLua.sh
More file actions
65 lines (31 loc) · 1.12 KB
/
tapLua.sh
File metadata and controls
65 lines (31 loc) · 1.12 KB
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
#!/bin/bash
set -e
FALLBACK="Themes/_fallback"; MODULES="Modules"; SCRIPT="tapLua/tapLua.lua"
# Check modules folder and assign code.
if [ -d "Appearance" ]; then
FALLBACK="Appearance/$FALLBACK"; MODULES="$FALLBACK/$MODULES"
CODE="LoadModule(\"$SCRIPT\")"
else
CODE="package.path = package.path .. \";./?/init.lua\"
dofile(\"$MODULES/$SCRIPT\")"
fi
SCRIPTS="$FALLBACK/Scripts"; BGANIMATIONS="$FALLBACK/BGAnimations"
# Clone repository.
REPOSITORY="https://github.com/EngineMachiner/tapLua.git"
git clone "$REPOSITORY" "$MODULES/tapLua/"
# Save the initialization script.
echo "Creating tapLua initialization script in $SCRIPTS"
cat << EOF > "$SCRIPTS/tapLua.lua"
$CODE
EOF
echo "Done."
# Open editor to add persistent actor.
cat << EOF
Add the persistent actors as children of _fallback's ScreenSystemLayer:
return tapLua.PersistentActors
EOF
read -p "Nano will open. Press any key to continue."
sudo nano "$BGANIMATIONS/ScreenSystemLayer aux.lua"
cat << EOF
Remember, if the theme overrides the ScreenSystemLayer you have to add the children there as well.
EOF