diff --git a/bin/omarchy-webapp-handler-hey b/bin/omarchy-webapp-handler-hey new file mode 100755 index 00000000..37f4cf2d --- /dev/null +++ b/bin/omarchy-webapp-handler-hey @@ -0,0 +1,11 @@ +#!/bin/bash +url="$1" +web_url="https://app.hey.com" + +# Handle mailto: URLs +if [[ $url =~ ^mailto: ]]; then + email=$(echo "$url" | sed 's/mailto://') + web_url="https://app.hey.com/messages/new?to=$email" +fi + +exec omarchy-launch-webapp "$web_url" diff --git a/install/config/mimetypes.sh b/install/config/mimetypes.sh index 48bb8cfa..ee662f55 100644 --- a/install/config/mimetypes.sh +++ b/install/config/mimetypes.sh @@ -33,3 +33,6 @@ xdg-mime default mpv.desktop video/x-ms-asf xdg-mime default mpv.desktop video/x-ogm+ogg xdg-mime default mpv.desktop video/x-theora+ogg xdg-mime default mpv.desktop application/ogg + +# Use Hey for mailto: links +xdg-mime default HEY.desktop x-scheme-handler/mailto diff --git a/install/packaging/webapps.sh b/install/packaging/webapps.sh index df20bd3e..c5f7350b 100644 --- a/install/packaging/webapps.sh +++ b/install/packaging/webapps.sh @@ -1,4 +1,4 @@ -omarchy-webapp-install "HEY" https://app.hey.com HEY.png +omarchy-webapp-install "HEY" https://app.hey.com HEY.png "omarchy-webapp-handler-hey %u" "x-scheme-handler/mailto" omarchy-webapp-install "Basecamp" https://launchpad.37signals.com Basecamp.png omarchy-webapp-install "WhatsApp" https://web.whatsapp.com/ WhatsApp.png omarchy-webapp-install "Google Photos" https://photos.google.com/ "Google Photos.png"