Update-Flatpacks-Menu

This commit is contained in:
Tyleo Dv. Delaware 2025-05-29 17:33:21 +02:00
parent 60799790e8
commit d6cc192188

View file

@ -23,11 +23,11 @@ MENU_OPTIONS=()
for SCRIPT in "${SCRIPTS[@]}"; do for SCRIPT in "${SCRIPTS[@]}"; do
# Remove underscores and capitalize first letter of each word # Remove underscores and capitalize first letter of each word
DISPLAY_NAME=$(echo "$SCRIPT" | sed 's/_/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) substr($i,2)} 1') DISPLAY_NAME=$(echo "$SCRIPT" | sed 's/_/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) substr($i,2)} 1')
MENU_OPTIONS+=("Flatpackage" "$DISPLAY_NAME") MENU_OPTIONS+=("$SCRIPT" "$DISPLAY_NAME")
done done
# Show menu with the new title # Show menu with the new title
SELECTED_SCRIPT=$(whiptail --title "TyOS Flatpak Selections" --menu "Choose a script to run:" 20 60 10 "${MENU_OPTIONS[@]}" 3>&1 1>&2 2>&3) SELECTED_SCRIPT=$(whiptail --title "TyOS Flatpacks Selections" --noitem --menu "Choose a script to run:" 20 60 10 "${MENU_OPTIONS[@]}" 3>&1 1>&2 2>&3)
# Check if a script was selected # Check if a script was selected
if [[ -n "$SELECTED_SCRIPT" ]]; then if [[ -n "$SELECTED_SCRIPT" ]]; then