Files
Arch-R/scripts/opt-system/factory-reset.sh
Douglas Teles c8e7fe99e9 Add ES Tools menu scripts and gptokeyb configs (WIP)
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>
2026-03-04 17:22:49 -03:00

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