Comment by homebrewer
1 day ago
What kind of URLs does it use? If it's anything with a unique prefix (like Telegram's tg://), you can add it to the desktop file:
MimeType=x-scheme-handler/foobar;
and run `update-mime-database`.
If not, I would write a shell wrapper and set it as the default browser; something to the effect of:
#!/usr/bin/bash
set -eu
for arg in "$@"; do
if [[ $arg == *whatever-url-teams-uses.com* ]]; then
exec gtk-launch teams "$@"
fi
done
exec gtk-launch firefox "$@"
(gtk-launch uses flags from the .desktop file so you don't have to repeat them)
No comments yet
Contribute on Hacker News ↗