diff --git a/bin/omakub-sub/install.sh b/bin/omakub-sub/install.sh index f5958a9..26a6161 100644 --- a/bin/omakub-sub/install.sh +++ b/bin/omakub-sub/install.sh @@ -15,11 +15,12 @@ CHOICES=( "Steam Play games from Valve's store" "VirtualBox Virtual machines to run Windows/Linux" "Zoom Attend and host video chat meetings" + "Web Apps Install web apps with their own icon and shell" "> All Re-run any of the default installers" "<< Back " ) -CHOICE=$(gum choose "${CHOICES[@]}" --height 20 --header "Install application") +CHOICE=$(gum choose "${CHOICES[@]}" --height 21 --header "Install application") if [[ "$CHOICE" == "<< Back"* ]] || [[ -z "$CHOICE" ]]; then # Don't install anything @@ -36,6 +37,7 @@ else case "$INSTALLER" in "dev-editor") INSTALLER_FILE="$OMAKUB_PATH/bin/omakub-sub/install-dev-editor.sh" ;; + "web-apps") INSTALLER_FILE="$OMAKUB_PATH/install/desktop/optional/select-web-apps.sh" ;; "dev-language") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/select-dev-language.sh" ;; "dev-database") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/select-dev-storage.sh" ;; "ollama") INSTALLER_FILE="$OMAKUB_PATH/install/terminal/optional/app-ollama.sh" ;; diff --git a/install/desktop/optional/select-web-apps.sh b/install/desktop/optional/select-web-apps.sh new file mode 100644 index 0000000..973c3b6 --- /dev/null +++ b/install/desktop/optional/select-web-apps.sh @@ -0,0 +1,32 @@ +source $OMAKUB_PATH/defaults/bash/functions + +# Install default web apps +if [[ -v OMAKUB_FIRST_RUN_WEB_APPS ]]; then + apps=$OMAKUB_FIRST_RUN_WEB_APPS +else + AVAILABLE_WEB_APPS=("Chat GPT" "Google Photos" "Google Contacts" "Tailscale") + apps=$(gum choose "${AVAILABLE_WEB_APPS[@]}" --no-limit --height 7 --header "Select web apps") +fi + +if [[ -n "$apps" ]]; then + for app in $apps; do + case $app in + Chat) + web2app 'Chat GPT' https://chatgpt.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/chatgpt.png + app2folder 'Chat GPT.desktop' WebApps + ;; + Photos) + web2app 'Google Photos' https://photos.google.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/google-photos.png + app2folder 'Google Photos.desktop' WebApps + ;; + Contacts) + web2app 'Google Contacts' https://contacts.google.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/google-contacts.png + app2folder 'Google Contacts.desktop' WebApps + ;; + Tailscale) + web2app 'Tailscale' https://login.tailscale.com/admin/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/tailscale-light.png + app2folder 'Tailscale.desktop' WebApps + ;; + esac + done +fi diff --git a/uninstall/select-web-apps.sh b/uninstall/select-web-apps.sh new file mode 100644 index 0000000..970c44a --- /dev/null +++ b/uninstall/select-web-apps.sh @@ -0,0 +1,27 @@ +source $OMAKUB_PATH/defaults/bash/functions + +AVAILABLE_WEB_APPS=("Chat GPT" "Google Photos" "Google Contacts" "Tailscale") +apps=$(gum choose "${AVAILABLE_WEB_APPS[@]}" --no-limit --height 6 --header "Select web apps to uninstall") + +if [[ -n "$apps" ]]; then + for app in $apps; do + case $app in + Chat) + web2app-remove 'Chat GPT' + app2folder-remove 'Chat GPT.desktop' WebApps + ;; + Photos) + web2app-remove 'Google Photos' + app2folder-remove 'Google Photos.desktop' WebApps + ;; + Contacts) + web2app-remove 'Google Contacts' + app2folder-remove 'Google Contacts.desktop' WebApps + ;; + Tailscale) + web2app-remove 'Tailscale' + app2folder-remove 'Tailscale.desktop' WebApps + ;; + esac + done +fi