-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
executable file
·75 lines (64 loc) · 1.33 KB
/
entrypoint.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
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env bash
SETTINGS="/home/user/.local/share/chatterino/Settings"
function tabs {
FIRST="true"
while [ "$1" ]; do
CHANNEL="$1"; shift;
cat <<EOF
{
`[ "$FIRST" ] && echo \"selected\": true,`
"splits2": {
"data": {
"name": "$CHANNEL",
"type": "twitch"
},
"flexh": 1,
"flexv": 1,
"type": "split"
}
}`[ "$1" ] && echo ,`
EOF
unset FIRST
done
}
mkdir -p $SETTINGS
cat > $SETTINGS/window-layout.json <<EOF
{
"windows": [
{
"height": 500,
"tabs": [
` tabs $CHANNELS`
],
"type": "main",
"width": 600,
"x": 236,
"y": 99
}
]
}
EOF
cat > $SETTINGS/settings.json <<EOF
{
"misc": {
"startUpNotification": 1,
"currentVersion": "2.0.4"
},
"highlighting": {
"blacklistedUsers": "\n"
},
"emotes": {
"scale": 1.0,
"enableGifAnimations": false
},
"logging": {
"enabled": true,
"path": "/logs"
}
}
EOF
xpra start :100
export DISPLAY=:100
sleep 5
exec $@
xpra stop :100