Make matching of web apps to install more robust

Closes #458, #460
This commit is contained in:
David Heinemeier Hansson
2025-05-20 12:47:06 +02:00
parent bc18827e73
commit 86fc37bc62
2 changed files with 11 additions and 9 deletions

View File

@@ -1,24 +1,25 @@
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 7 --header "Select web apps")
apps=$(gum choose "${AVAILABLE_WEB_APPS[@]}" --no-limit --height 6 --header "Select web apps")
if [[ -n "$apps" ]]; then
IFS=$'\n'
for app in $apps; do
case $app in
Chat)
"Chat GPT")
web2app 'Chat GPT' https://chatgpt.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/chatgpt.png
app2folder 'Chat GPT.desktop' WebApps
;;
Photos)
"Google 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)
"Google 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)
"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
;;

View File

@@ -4,21 +4,22 @@ 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
IFS=$'\n'
for app in $apps; do
case $app in
Chat)
"Chat GPT")
web2app-remove 'Chat GPT'
app2folder-remove 'Chat GPT.desktop' WebApps
;;
Photos)
"Google Photos")
web2app-remove 'Google Photos'
app2folder-remove 'Google Photos.desktop' WebApps
;;
Contacts)
"Google Contacts")
web2app-remove 'Google Contacts'
app2folder-remove 'Google Contacts.desktop' WebApps
;;
Tailscale)
"Tailscale")
web2app-remove 'Tailscale'
app2folder-remove 'Tailscale.desktop' WebApps
;;