mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
Interactive tool scripts for EmulationStation's OPTIONS menu at /opt/system/: system-info, wifi-setup, bluetooth-setup, performance-mode, suspend-mode, usb-mode, factory-reset. Uses shared menu-lib.sh with fbcon rendering. Gamepad configs: default.gptk (RetroArch), tools.gptk (menu navigation with D-pad arrows, A=enter, B=escape). Note: scripts need further testing on hardware — left disabled for now. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
672 B
Bash
29 lines
672 B
Bash
#!/bin/bash
|
|
# NAME: Factory Reset
|
|
. /usr/lib/archr/menu-lib.sh
|
|
tool_init
|
|
|
|
menu_select "Factory Reset" \
|
|
"Cancel" \
|
|
"Reset ALL settings" || exit 0
|
|
|
|
case "$MENU_RESULT" in
|
|
0) # Cancel
|
|
;;
|
|
1) # Reset
|
|
# Second confirmation
|
|
menu_select "Are you sure? ROMs/saves kept." \
|
|
"No, cancel" \
|
|
"Yes, reset everything" || exit 0
|
|
|
|
if [ "$MENU_RESULT" -eq 1 ]; then
|
|
clear
|
|
echo "Resetting..."
|
|
archr-factory-reset 2>/dev/null
|
|
echo "Done. Restarting..."
|
|
sleep 1
|
|
systemctl restart emulationstation 2>/dev/null || reboot
|
|
fi
|
|
;;
|
|
esac
|