-
Notifications
You must be signed in to change notification settings - Fork 1
/
FE-Switcheroo.sh
593 lines (541 loc) · 21.4 KB
/
FE-Switcheroo.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
#!/bin/bash
AUTOSTART="/opt/retropie/configs/all/autostart.sh"
function fe_menu() {
mode_check
local choice
while true; do
choice=$(dialog --backtitle "Front End Switcheroo Currently using $fe" --title " FE SWITCHEROO MENU V 2.5" \
--ok-label OK --cancel-label Back \
--menu "Please Select A Option Below" 25 75 20 \
+ "<--------->FRONTENDS<--------->" \
1 "use ATTRACT MODE as FRONTEND" \
2 "use PIXEL DESKTOP as FRONTEND" \
3 "use EMU STATION as FRONTEND" \
4 "use PEGASUS FE as FRONTEND" \
+ "<--------->HELPERS<---------->" \
5 "Attract Mode WORK IN PROGRESS" \
6 "Emulation Station Helper" \
7 "Pegasus FE Helper" \
+ "<--------->UPDATE<----------->" \
7 "Update FE Switcheroo" \
2>&1 > /dev/tty)
case "$choice" in
+) none ;;
1) AT_FE ;;
2) DE_FE ;;
3) ES_FE ;;
4) PE_FE ;;
5) attract_helper ;;
6) es_helper ;;
7) pegasus_helper ;;
8) update-switcheroo ;;
*) break ;;
esac
done
}
function AT_FE() {
if [ ! -d /opt/retropie/configs/all/attractmode ]; then
dialog --sleep 1 --title "ATTRACT MODE NOT INSTALLED !! " --msgbox "
INSTALLING NOW" 0 0
cd $HOME/RetroPie-Setup
sudo ./retropie_packages.sh attractmode
dialog --sleep 1 --title "HELP/POSSIBLE ERROR!! " --msgbox "
IF INSTALL FAILS PRESS CONTROL+C TO CANCEL THEN
TYPE EMULATIONSTATION GO TO RETROPIE TOOLS
THEN MANAGE PACKAGES/EXPERIMENTAL PACKAGES/ATTRACT MODE
THEN INSTALL FROM PRECOMPLIEDED BINARY" 0 0
AT_FE;
else
if grep -q 'emulationstation \#auto' "$AUTOSTART"; then
sudo sed -i 's/emulationstation \#auto/attract \#auto/g' $AUTOSTART
echo "Attract Mode Set"
sleep 2
pgrep -f emulationstation|xargs sudo kill -9 > /dev/null 2>&1 &
attract 2>&1
elif grep -q 'pegasus-fe \#auto' "$AUTOSTART"; then
sudo sed -i 's/pegasus-fe \#auto/attract \#auto/g' $AUTOSTART
echo "Attract Mode Set"
sleep 2
pgrep -f pegasus-fe|xargs sudo kill -9 > /dev/null 2>&1 &
attract 2>&1
elif grep -q 'startx \#auto' "$AUTOSTART"; then
sudo sed -i 's/startx \#auto/attract \#auto/g' $AUTOSTART
echo "Attract Mode Set"
sleep 2
pgrep -f startx|xargs sudo kill -9 > /dev/null 2>&1 &
attract 2>&1
elif grep -q 'attract \#auto' "$AUTOSTART"; then
echo "Attract Mode Already Set"
sleep 2
fi
fi
mode_check
}
function DE_FE() {
if [ ! -f /usr/bin/startx ]; then
dialog --sleep 1 --title "PIXEL DESKTOP NOT INSTALLED !! " --msgbox "
INSTALLING NOW" 0 0
cd $HOME/RetroPie-Setup
sudo ./retropie_packages.sh raspbiantools lxde
DE_FE;
else
if grep -q 'attract \#auto' "$AUTOSTART"; then
sudo sed -i 's/attract \#auto/startx \#auto/g' $AUTOSTART
echo "Desktop Mode Set"
sleep 2
pgrep -f attract|xargs sudo kill -9 > /dev/null 2>&1 &
sudo openvt -c 1 -s -f startx 2>&1
elif grep -q 'pegasus-fe \#auto' "$AUTOSTART"; then
sudo sed -i 's/pegasus-fe \#auto/startx \#auto/g' $AUTOSTART
echo "Desktop Mode Set"
sleep 2
pgrep -f pegasus-fe|xargs sudo kill -9 > /dev/null 2>&1 &
sudo openvt -c 1 -s -f startx 2>&1
elif grep -q 'emulationstation \#auto' "$AUTOSTART"; then
sudo sed -i 's/emulationstation \#auto/startx \#auto/g' $AUTOSTART
echo "Desktop Mode Set"
sleep 2
pgrep -f emulationstation|xargs sudo kill -9 > /dev/null 2>&1 &
sudo openvt -c 1 -s -f startx 2>&1
elif grep -q 'startx \#auto' "$AUTOSTART"; then
echo "Desktop Mode Already Set"
sleep 2
fi
fi
mode_check
}
function ES_FE() {
if grep -q 'attract \#auto' "$AUTOSTART"; then
sudo sed -i 's/attract \#auto/emulationstation \#auto/g' $AUTOSTART
echo "EmulationStation Mode Set"
sleep 2
pgrep -f attract|xargs sudo kill -9 > /dev/null 2>&1 &
sudo openvt -c 1 -s -f emulationstation 2>&1
elif grep -q 'pegasus-fe \#auto' "$AUTOSTART"; then
sudo sed -i 's/pegasus-fe \#auto/emulationstation \#auto/g' $AUTOSTART
echo "EmulationStation Mode Set"
sleep 2
pgrep -f pegasus-fe|xargs sudo kill -9 > /dev/null 2>&1 &
sudo openvt -c 1 -s -f emulationstation 2>&1
elif grep -q 'startx \#auto' "$AUTOSTART"; then
sudo sed -i 's/startx \#auto/emulationstation \#auto/g' $AUTOSTART
echo "EmulationStation Mode Set"
sleep 2
pgrep -f startx|xargs sudo kill -9 > /dev/null 2>&1 &
sudo openvt -c 1 -s -f emulationstation 2>&1
elif grep -q 'emulationstation \#auto' "$AUTOSTART"; then
echo "EmulationStation Mode Already Set"
sleep 2
fi
mode_check
}
function PE_FE() {
if [ ! -d /opt/retropie/configs/all/pegasus-fe/ ]; then
dialog --sleep 1 --title "PEGASUS NOT INSTALLED !! " --msgbox "
INSTALLING NOW" 0 0
cd "$HOME"/RetroPie-Setup
sudo ./retropie_packages.sh pegasus-fe
PE_FE;
else
if grep -q 'attract \#auto' "$AUTOSTART"; then
sudo sed -i 's/attract \#auto/pegasus-fe \#auto/g' $AUTOSTART
echo "Pegasus Mode Set"
sleep 2
pgrep -f attract|xargs sudo kill -9 > /dev/null 2>&1 &
sudo openvt -c 1 -s -f pegasus-fe 2>&1
elif grep -q 'emulationstation \#auto' "$AUTOSTART"; then
sudo sed -i 's/emulationstation \#auto/pegasus-fe \#auto/g' $AUTOSTART
echo "Pegasus Mode Set"
sleep 2
pgrep -f emulationstation|xargs sudo kill -9 > /dev/null 2>&1 &
sudo openvt -c 1 -s -f pegasus-fe 2>&1
elif grep -q 'startx \#auto' "$AUTOSTART"; then
sudo sed -i 's/pegasus-fe \#auto/pegasus-fe \#auto/g' $AUTOSTART
echo "Pegasus Mode Set"
sleep 2
pgrep -f pegasus-fe|xargs sudo kill -9 > /dev/null 2>&1 &
sudo openvt -c 1 -s -f emulationstation 2>&1
elif grep -q 'pegasus-fe \#auto' "$AUTOSTART"; then
echo "Pegasus Mode Already Set"
sleep 2
fi
fi
mode_check
}
function mode_check() {
if grep -q 'emulationstation \#auto' "$AUTOSTART"; then
fe="Emulationstation Mode"
elif grep -q 'attract \#auto' "$AUTOSTART"; then
fe="Attract Mode"
elif grep -q 'pegasus-fe \#auto' "$AUTOSTART"; then
fe="Pegasus Mode"
elif grep -q 'startx \#auto' "$AUTOSTART"; then
fe="Desktop Mode"
fi
}
#------------------------------------------------------------------------------------------#
#-----------------HELPERS------------------------HELPERS------------------HELPERS----------#
#------------------------------------------------------------------------------------------#
function es_helper() {
local choice
while true; do
choice=$(dialog --backtitle "$BACKTITLE" --title "ES HELPER " \
--ok-button Select --cancel-button Exit \
--menu "Version 0.9" 15 30 30 \
1 "Collections Maker" \
2 "Devils Themes" \
3 "ES Theme Menu" \
4 "Hurstys Themes" \
2>&1 >/dev/tty)
case "$choice" in
1) collections ;;
2) devils-themes ;;
3) es-themes ;;
4) hursty-themes ;;
*) break ;;
esac
done
}
#------------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------------#
function collections() {
bash "$HOME"/Devils-Box/helpers/emulationstation/Collections.sh
}
#------------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------------#
function es-themes () {
sudo /home/pi/RetroPie-Setup/retropie_packages.sh retropiemenu launch /home/pi/RetroPie/retropiemenu/esthemes.rp
}
function hursty-themes () {
if [ -f "/home/pi/RetroPie/retropiemenu/hurstythemes.sh" ]; then
/home/pi/RetroPie/retropiemenu/hurstythemes.sh
else
wget https://raw.githubusercontent.com/RetroHursty69/HurstyThemes/master/install.sh
chmod +x "install.sh"
./install.sh
fi
}
function devil-themes() {
local choice
while true; do
choice=$(dialog --backtitle "$BACKTITLE" --title " DEVILS THEMES MENU " \
--ok-label Select --cancel-label Main-Menu \
--menu "SELECT THEME AND PRESS A " 20 50 30 \
1 "Devil Chromey " \
2 "Neon I.B.A.D " \
2>&1 >/dev/tty)
case "$choice" in
1) devil-chromey ;;
2) neon-ibad ;;
*) break ;;
esac
done
}
function devil-chromey() {
wget https://archive.org/download/devils-themes/devil-chromey.zip -P ${HOME}/
unzip -o "$HOME"/devil-chromey.zip -d /home/pi/.emulationstation/themes/
sudo rm -R "$HOME"/devil-chromey.zip
}
function neon-ibad() {
wget https://archive.org/download/devils-themes/NEON-IBAD.zip -P ${HOME}/
unzip -o "$HOME"/NEON-IBAD.zip -d /home/pi/.emulationstation/themes/
sudo rm -R "$HOME"/NEON-IBAD.zip
}
#------------------------------------------------------------------------------------------#
#----PEGASUS FRONTEND----PEGASUS--FRONTEND--------PEGASUS FRONTEND----PEGASUS--FRONTEND----#
#------------------------------------------------------------------------------------------#
function pegasus_helper() {
local choice
while true; do
choice=$(dialog --backtitle "$BACKTITLE" --title "PEGASUS HELPER " \
--ok-button Select --cancel-button Exit \
--menu "Version 0.9" 15 30 30 \
1 "Theme Installer Menu" \
2 "Theme Converter Menu" \
3 "Help With Pegasus" \
2>&1 >/dev/tty)
case "$choice" in
1) peg-theme_menu ;;
2) peg-convert_theme ;;
3) peg-help ;;
+) none ;;
*) break ;;
esac
done
}
function peg-theme_menu() {
local choice
while true; do
choice=$(dialog --backtitle "$BACKTITLE" --title "PEGASUS HELPER PI4" \
--ok-button Select --cancel-button Exit \
--menu "Theme Installer Menu" 20 40 40 \
1 "ES2---------------Nils Boneberger" \
2 "Flixnet------------Mátyás Mustoha" \
3 "NeoRetro Dark------Valentin MEZIN" \
4 "SkylineOS-------------RbertoCases" \
- "----------PREVIEWS---------------" \
5 "NeoRetro Preview-----------------" \
6 "SwitchOS Preview-----------------" \
2>&1 >/dev/tty)
case "$choice" in
1) es2 ;;
2) flixnet ;;
3) neo_dark ;;
4) skyline ;;
-) none ;;
5) view_neo ;;
6) view_switchos ;;
*) break ;;
esac
done
}
#--PEGASUS THEME INSTALLER--#
function es2() {
sudo wget https://archive.org/download/devils-themes/Pegasus-Themes/Pegasus_es2.zip -P /opt/retropie/configs/all/pegasus-fe/
sudo unzip -o /opt/retropie/configs/all/pegasus-fe/Pegasus_es2.zip -d /opt/retropie/configs/all/pegasus-fe/themes/ &&
sudo rm -R /opt/retropie/configs/all/pegasus-fe/themes/Pegasus_es2.zip
sudo chmod 755 /opt/retropie/configs/all/pegasus-fe/themes/es2
}
function skyline() {
sudo wget https://archive.org/download/devils-themes/Pegasus-Themes/Pegasus_skylineOS.zip -P /opt/retropie/configs/all/pegasus-fe/
sudo unzip -o /opt/retropie/configs/all/pegasus-fe/Pegasus_skylineOS.zip -d /opt/retropie/configs/all/pegasus-fe/themes/ &&
sudo rm -R /opt/retropie/configs/all/pegasus-fe/themes/Pegasus_skylineOS.zip
sudo chmod 755 /opt/retropie/configs/all/pegasus-fe/themes/skylineOS
}
function neo_dark() {
sudo wget https://archive.org/download/devils-themes/Pegasus-Themes/Pegasus_neoretro-dark.zip -P /opt/retropie/configs/all/pegasus-fe/
sudo unzip -o /opt/retropie/configs/all/pegasus-fe/Pegasus_neoretro-dark.zip -d /opt/retropie/configs/all/pegasus-fe/themes/ &&
sudo rm -R /opt/retropie/configs/all/pegasus-fe/themes/Pegasus_neoretro-dark.zip
sudo chmod 755 /opt/retropie/configs/all/pegasus-fe/themes/neoretro-dark
}
function flixnet() {
sudo wget https://archive.org/download/devils-themes/Pegasus-Themes/Pegasus_flixnet.zip -P /opt/retropie/configs/all/pegasus-fe/
sudo unzip -o /opt/retropie/configs/all/pegasus-fe/Pegasus_flixnet.zip -d /opt/retropie/configs/all/pegasus-fe/themes/ &&
sudo rm -R /opt/retropie/configs/all/pegasus-fe/themes/Pegasus_flixnet.zip
sudo chmod 755 /opt/retropie/configs/all/pegasus-fe/themes/flixnet
}
#------------------------------------------------------------------------------------------#
#-------PREVIEWS----#
#------------------------------------------------------------------------------------------#
#function preview_pegasus() {
#dialog --sleep 1 --title "PREVIEW FRONTEND" --msgbox "
#This will play a 30-45 second preview video.
#Press any button to continue " 0 0
#omxplayer "$HOME"/Devils-Box/helpers/pegasusfe/previews/pegasus-fe.mp4
#}
#function preview_attractmode() {
#dialog --sleep 1 --title "PREVIEW FRONTEND" --msgbox "
#This will play a 30-45 second preview video.
#Press any button to continue " 0 0
#omxplayer "$HOME"/Devils-Box/helpers/attractmode/previews/attractmode.mp4
#}
#------------------------------------------------------------------------------------------#
#-PEGASUS PREVIEWS-#
#------------------------------------------------------------------------------------------#
function view_neo() {
dialog --sleep 1 --title "PREVIEW PEGASUS THEME" --msgbox "
This will play a 30-45 second preview video.
Press any button to continue " 0 0
omxplayer "$HOME"/Devils-Box/helpers/pegasusfe/previews/neoretro-preview.mp4
}
function view_switchos() {
dialog --sleep 1 --title "PREVIEW PEGASUS THEME" --msgbox "
This will play a 30-45 second preview video.
Press any button to continue " 0 0
omxplayer "$HOME"/Devils-Box/helpers/pegasusfe/previews/switchOS-preview.mp4
}
#------------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------------#
function peg-help() {
local choice
while true; do
choice=$(dialog --backtitle "$BACKTITLE" --title "PEGASUS HELPER PI4" \
--ok-button Select --cancel-button Exit \
--menu "Help Menu" 20 40 40 \
1 "Offical " \
2 "Unoffical " \
2>&1 >/dev/tty)
case "$choice" in
1) peg-help-of ;;
2) peg-help-un ;;
*) break ;;
esac
done
}
function peg-help-of() {
dialog --sleep 1 --title "OFFICAL HELP " --msgbox "
-*A cross platform, customizable graphical frontend for launching emulators and managing your game collection.*-
-*All your games, in one place*-
Pegasus is a graphical frontend for browsing your game library (especially retro games) and launching them from one place. It's focusing on customizability, cross platform support (including embedded devices) and high performance.
-*A modern retro-gaming setup*-
Instead of launching different games with different emulators one by one manually, you can add them to Pegasus and launch the games from a friendly graphical screen from your couch. You can add all kinds of artworks, metadata or video previews for each game to make it look even better!
-*Full control over the UI*-
With additional themes, you can completely change everything that is on the screen. Add or remove UI elements, menu screens, whatever. Want to make it look like Kodi? Steam? Any other launcher? No problem. You can add animations and effects, 3D scenes, or even run your custom shader code.
-*Open source, cross platform, compatible with others*-
Pegasus can run on Linux, Windows, Mac, Raspberry Pi, Odroid and Android devices. It's compatible with EmulationStation metadata and gamelist files, and instantly recognizes your Steam games!
More info Visit:
https://pegasus-frontend.org/" 0 0
}
function peg-help-un() {
dialog --sleep 1 --title "UNOFFICAL HELP " --msgbox "
--TO RUN--
Open Terminal & Type
pegasus-fe
--AUTOSTART AT BOOT--
Open autostart.sh text edit to say. File located at
/opt/retropie/configs/all/autostart.sh
Change emulationstation to pegasus-fe
Save & reboot.
--TO SWITCH FRONTEND EASY--
Install Frontend Switcher to switch easy.
A few teams have fe-switcher. We Devils Building one now." 0 0
}
#------------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------------#
function peg-convert_theme() {
local choice
while true; do
choice=$(dialog --backtitle "$BACKTITLE" --title " PEGASUS HELPER " \
--ok-label Select --cancel-label Back \
--menu "THEME CONVERTER MENU" 25 40 40 \
1 "List Installed ES Themes " \
2 "Select Theme To Convert " \
2>&1 > /dev/tty)
case "$choice" in
1) list-themes ;;
2) convert ;;
*) break ;;
esac
done
}
function list-themes() {
clear
cd "/home/pi/.emulationstation/themes/"
ls
read -n 1 -s -r -p "Above Is A List Of Installed Themes-----Press any key to Continue"
}
function convert() {
if [ ! -d /home/pi/es-pegasus-theme-converter ]; then
echo -e "$(tput setaf 2)ES Pegasus Theme Converter Missing Will Download Now! $(tput sgr0)"
sleep 3
if [ $NETCONNECTED = 1 ]; then
dialog --sleep 1 --title "OFFLINE?" --msgbox "
Your Offline. Please Connect To The Internet And Try Again! Now Backing Out To Main Menu!" 0 0
quit
else
git clone -b master "https://github.com/mmatyas/es-pegasus-theme-converter.git"
clear
cd
fi
fi
cd "/home/pi/.emulationstation/themes/"
echo "Please type theme name and press Enter"
read theme
/home/pi/es-pegasus-theme-converter/convert.py /etc/emulationstation/themes/$theme /opt/retropie/configs/all/pegasus-fe/theme/$theme
read -n 1 -s -r -p "Above Is Converting Results-----Press any key to Continue"
cd
}
#------------------------------------------------------------------------------------------#
#----ATTRACT MODE ATTRACT MODE -------------------ATTRACT MODE ATTRACT MODE ---------------#
#------------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------------#
#------------ATTRACT MODE PREVIEWS--------------#
#------------------------------------------------------------------------------------------#
#function view_devilspin() {
#dialog --sleep 1 --title "PREVIEW ATTRACTMODE THEME" --msgbox "
#This will play a 30-45 second preview video.
#Press any button to continue " 0 0
#omxplayer "$HOME"/Devils-Box/helpers/attractmode/previews/devilspin.mp4
#}
function attract-helper() {
local choice
while true; do
choice=$(dialog --backtitle "$BACKTITLE" --title "ATTRACT MODE HELPER " \
--ok-button Select --cancel-button Exit \
--menu "Version 0.9" 15 30 30 \
1 "Attract Mode Themes" \
2 "Attract Mode Tools (WORK IN PROGRESS)" \
2>&1 >/dev/tty)
case "$choice" in
1) attract-themes ;;
2) attract-tools ;;
*) break ;;
esac
done
}
#------------------------------------------------------------------------------------------#
#-----------ATTRACT THEME INSTALLER---------ATTRACT THEME INSTALLER-------------INSTALLER--#
#------------------------------------------------------------------------------------------#
function attract-themes() {
local choice
while true; do
choice=$(dialog --backtitle "$BACKTITLE" --title " ATTRACT MODE THEMES MENU " \
--ok-label Select --cancel-label Main-Menu \
--menu "SELECT THEME AND PRESS A " 20 50 30 \
1 "DevilsSpin " \
2>&1 >/dev/tty)
case "$choice" in
1) devilsspin ;;
*) break ;;
esac
done
}
function devilspin() {
wget https://archive.org/download/attractmode/devilspin.zip -P "$HOME"/.am-temp
unzip -o "$HOME"/.am-temp/devilspin.zip -d "$HOME"/.am-temp/
sudo rm -R "$HOME"/devilspin.zip
mv
}
function attract-tools() {
local choice
while true; do
choice=$(dialog --backtitle "$BACKTITLE" --title " ATTRACT MODE TOOLS MENU " \
--ok-label Select --cancel-label Main-Menu \
--menu "SELECT THEME AND PRESS A " 20 50 30 \
1 "tool 1 " \
2>&1 >/dev/tty)
case "$choice" in
1) tool-1 ;;
*) break ;;
esac
done
}
#------------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------------#
function update-switcheroo() {
if [ -f "$HOME"/RetroPie/retropiemenu/FE-Switcheroo.sh ]; then
echo "---UPDATING FE SWITCHEROO NOW---"
sleep 5
sudo rm -r "$HOME"/RetroPie/retropiemenu/icons/FE-Switcheroo.png
sudo rm -R "$HOME"/RetroPie/retropiemenu/FE-Switcheroo.sh
sudo rm -R /usr/local/bin/switcheroo
sudo rm -r "$HOME"/.attract/tools/FE-Switcheroo.sh
wget https://raw.githubusercontent.com/Retro-Devils/FE-Switcheroo/main/FE-Switcheroo.sh -P "$HOME"/RetroPie/retropiemenu/
wget https://github.com/Retro-Devils/FE-Switcheroo/blob/main/FE-Switcheroo.png -P "$HOME"/RetroPie/retropiemenu/icons/
sudo wget https://raw.githubusercontent.com/Retro-Devils/FE-Switcheroo/main/switcheroo -P /usr/local/bin
chmod 755 "$HOME"/RetroPie/retropiemenu/FE-Switcheroo.sh
chmod 755 "$HOME"/.attract/tools/FE-Switcheroo.sh
sudo chmod 755 /usr/local/bin/switcheroo
cp "$HOME"/RetroPie/retropiemenu/FE-Switcheroo.sh -P "$HOME"/.attract/tools/
echo "UPDATE COMPLETE LAUNCHING SWITCHEROO"
"$HOME"/RetroPie/retropiemenu/FE-Switcheroo.sh
sleep 2
else
echo "---INSTALLING FE SWITCHEROO NOW---"
sleep 5
wget https://raw.githubusercontent.com/Retro-Devils/FE-Switcheroo/main/FE-Switcheroo.sh -P "$HOME"/RetroPie/retropiemenu/
sudo wget https://raw.githubusercontent.com/Retro-Devils/FE-Switcheroo/main/switcheroo -P /usr/local/bin
wget https://github.com/Retro-Devils/FE-Switcheroo/blob/main/FE-Switcheroo.png -P "$HOME"/RetroPie/retropiemenu/icons/
chmod 755 "$HOME"/RetroPie/retropiemenu/FE-Switcheroo.sh
sudo chmod 755 /usr/local/bin/switcheroo
mkdir "$HOME"/.attract/tools/
cp "$HOME"/RetroPie/retropiemenu/FE-Switcheroo.sh -P "$HOME"/.attract/tools/
cp "$HOME"/RetroPie/retropiemenu/Devils-Box.sh -P "$HOME"/.attract/tools/
chmod 755 "$HOME"/.attract/tools/
echo "INSTALL COMPLETE LAUNCHING SWITCHEROO"
sleep 2
"$HOME"/RetroPie/retropiemenu/FE-Switcheroo.sh
fi
}
fe_menu