From 920e85d97b09b45b03756ca268b7a7cd73fc4283 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Fri, 19 Sep 2025 20:40:54 -0400 Subject: [PATCH] Make HEY the default mailto handler --- bin/omarchy-webapp-handler-hey | 11 +++++++++++ install/config/mimetypes.sh | 3 +++ install/packaging/webapps.sh | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 bin/omarchy-webapp-handler-hey diff --git a/bin/omarchy-webapp-handler-hey b/bin/omarchy-webapp-handler-hey new file mode 100755 index 0000000..37f4cf2 --- /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 48bb8cf..ee662f5 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 df20bd3..c5f7350 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"