-
Notifications
You must be signed in to change notification settings - Fork 4
/
6-parsec
34 lines (31 loc) · 1.04 KB
/
6-parsec
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
#!/bin/bash
if [[ -z $1 || -z $2 ]]; then
echo 'Need Parsec username and password like this: ./6-parsec username password'
exit 1
fi
echo "@/home/pi/start-touchscreen" | tee -a .config/lxsession/LXDE-pi/autostart
echo "@/home/pi/start-pi_power" | tee -a .config/lxsession/LXDE-pi/autostart
#install Parsec
wget https://s3.amazonaws.com/parsec-build/package/parsec-rpi.deb
sudo dpkg -i parsec-rpi.deb
echo "${1}
${2}
y
0" | parsec
# sign into parsec and save credentials
cat << 'EOF' > .parsec/controller.txt
050000007e0500000820000001000000,Joy-Con(s),platform:Linux,x:b3,a:b0,b:b1,y:b2,back:b8,guide:b10,start:b9,dpleft:b15,dpdown:b14,dpright:b16,dpup:b13,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b11,rightstick:b12,leftx:a2,lefty:a3,rightx:a4,righty:a5,
EOF
chmod +x ./start-parsec
chmod +x ./parsec
cat << 'EOF' > Desktop/Parsec.desktop
[Desktop Entry]
Name=Parsec
Comment=My custom Parsec launcher
Icon=/usr/share/pixmaps/openbox.xpm
Exec=/home/pi/parsec
Type=Application
Encoding=UTF-8
Terminal=false
Categories=None;
EOF