mirror of
https://github.com/aljazceru/omakub.git
synced 2025-12-17 04:24:20 +01:00
Make it even easier to add web apps
This commit is contained in:
@@ -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" ;;
|
||||
|
||||
32
install/desktop/optional/select-web-apps.sh
Normal file
32
install/desktop/optional/select-web-apps.sh
Normal file
@@ -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
|
||||
27
uninstall/select-web-apps.sh
Normal file
27
uninstall/select-web-apps.sh
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user