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>
28 lines
717 B
Bash
28 lines
717 B
Bash
#!/bin/bash
|
|
# NAME: USB Mode
|
|
. /usr/lib/archr/menu-lib.sh
|
|
tool_init
|
|
|
|
while true; do
|
|
if [ -d /sys/kernel/config/usb_gadget/archr ]; then
|
|
STATUS="Gadget (file transfer)"
|
|
else
|
|
STATUS="Host (default)"
|
|
fi
|
|
|
|
menu_select "USB Mode — Current: $STATUS" \
|
|
"Host Mode (USB devices)" \
|
|
"Gadget Mode (file transfer)" || break
|
|
|
|
case "$MENU_RESULT" in
|
|
0)
|
|
archr-usbgadget stop 2>/dev/null
|
|
msg_show "USB Mode" "Host mode enabled.\nConnect USB controllers or drives."
|
|
;;
|
|
1)
|
|
archr-usbgadget start 2>/dev/null
|
|
msg_show "USB Mode" "Gadget mode enabled.\nConnect USB cable to PC."
|
|
;;
|
|
esac
|
|
done
|