mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
System daemons: hotkeys (volume/brightness), automount, bluetooth agent, memory manager, sleep/suspend, USB gadget mode, save-config persistence. Boot splash: initramfs SVG renderer (fbsplash + svg_parser) for 0.7s splash. Panel tools: generate-panel-dtbos.sh rewrite, convert-panel.py for ROCKNIX panel data extraction, archr-dtbo.py for runtime overlay management. Input: archr-gptokeyb.c gamepad-to-keyboard mapper via uinput. Launch wrappers: emulationstation.sh and retroarch-launch.sh updated for KMS/DRM + Mesa 26 Panfrost environment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
63 lines
1.6 KiB
Bash
63 lines
1.6 KiB
Bash
#!/bin/bash
|
|
# Arch R — Factory Reset
|
|
# Resets all user configuration to defaults.
|
|
# Preserves ROMs and BIOS files.
|
|
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
NC='\033[0m'
|
|
|
|
echo -e "${RED}=== Arch R Factory Reset ===${NC}"
|
|
echo ""
|
|
echo "This will:"
|
|
echo " - Reset RetroArch config to defaults"
|
|
echo " - Reset EmulationStation config to defaults"
|
|
echo " - Reset audio/brightness/volume settings"
|
|
echo " - Remove SSH keys"
|
|
echo " - Remove WiFi saved networks"
|
|
echo ""
|
|
echo -e "${GREEN}This will NOT delete your ROMs or BIOS files.${NC}"
|
|
echo ""
|
|
|
|
# Require explicit confirmation
|
|
if [ "$1" != "--confirm" ]; then
|
|
echo "To proceed, run: archr-factory-reset --confirm"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Resetting..."
|
|
|
|
# RetroArch config
|
|
rm -rf /home/archr/.config/retroarch/retroarch.cfg
|
|
rm -rf /home/archr/.config/retroarch/retroarch-core-options.cfg
|
|
rm -rf /home/archr/.config/retroarch/saves/*
|
|
rm -rf /home/archr/.config/retroarch/states/*
|
|
rm -rf /home/archr/.config/retroarch/screenshots/*
|
|
|
|
# EmulationStation config
|
|
rm -rf /home/archr/.emulationstation/es_settings.cfg
|
|
rm -rf /home/archr/.emulationstation/gamelists
|
|
|
|
# User settings
|
|
rm -f /home/archr/.config/archr/brightness
|
|
rm -f /home/archr/.config/archr/volume
|
|
|
|
# SSH keys
|
|
rm -f /etc/ssh/ssh_host_*
|
|
|
|
# WiFi networks
|
|
rm -rf /etc/NetworkManager/system-connections/*
|
|
|
|
# Mesa shader cache
|
|
rm -rf /home/archr/.cache/mesa_shader_cache/*
|
|
|
|
# First-boot flag — will regenerate configs on next boot
|
|
rm -f /var/lib/archr/.first-boot-done
|
|
|
|
# Fix ownership
|
|
chown -R 1001:1001 /home/archr
|
|
|
|
echo ""
|
|
echo -e "${GREEN}Factory reset complete. Reboot to apply.${NC}"
|
|
echo " sudo reboot"
|