Skip to content

Instantly share code, notes, and snippets.

@broskees
Created August 17, 2024 18:30
Show Gist options
  • Save broskees/e809dd4ba95ed90f5b55d2faf02037bd to your computer and use it in GitHub Desktop.
Save broskees/e809dd4ba95ed90f5b55d2faf02037bd to your computer and use it in GitHub Desktop.
Streambian boot command
#!/usr/bin/bash
# Check if gum is installed, if not, install it
if ! command -v gum &> /dev/null; then
echo "gum could not be found, installing..."
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
sudo apt update && sudo apt install gum
fi
while true; do
echo "
_____ ___________ _____ ___ ___ _________ _____ ___ _ _
/ ___|_ _| ___ \ ___|/ _ \ | \/ || ___ \_ _|/ _ \ | \ | |
\ `--. | | | |_/ / |__ / /_\ \| . . || |_/ / | | / /_\ \| \| |
`--. \ | | | /| __|| _ || |\/| || ___ \ | | | _ || . ` |
/\__/ / | | | |\ \| |___| | | || | | || |_/ /_| |_| | | || |\ |
\____/ \_/ \_| \_\____/\_| |_/\_| |_/\____/ \___/\_| |_/\_| \_/
Pick an action to take:
1. Moonlight (Stream from Sunshine or NVIDA GameStream)
2. Manage Configuration
3. Launch Terminal
4. Reboot
5. Poweroff
"
ACTION=$(gum choose {1..5})
if [[ "$ACTION" == 1 ]]; then
echo "Starting Moonlight..."
moonlight-qt
elif [[ "$ACTION" == 2 ]]; then
echo "Launching Configuration Management Application..."
armbian-config
elif [[ "$ACTION" == 3 ]]; then
echo "Launching Terminal..."
exec bash
elif [[ "$ACTION" == 4 ]]; then
echo "Rebooting..."
reboot now
elif [[ "$ACTION" == 5 ]]; then
echo "Powering off..."
poweroff now
else
echo "Invalid option. Restarting..."
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment