#!/bin/bash
bash $(realpath $(dirname $0))/maneki-logo
menu(){
    dialog --clear --title "Which GSConnect do you want?" \
        --menu "Choose one of the following options:" 15 40 2 \
        1 "gnome-shell-extension-gsconnect (AUR)" \
        2 "Exit" 2>&1 >/dev/tty
}

while true; do
    choice=$(menu)
    case $choice in
        1)
            echo "Downloading gnome-shell-extension-gsconnect (AUR)..."
            yay -S gnome-shell-extension-gsconnect --noconfirm
            echo -e "\n==> Downloaded and Installed gnome-shell-extension-gsconnect (AUR)."
            ;;
        2)
            echo "Exiting..."
            exit 0
            ;;
    esac
done
