wangp / bower

A curses terminal client for the Notmuch email system
Other
119 stars 11 forks source link

How can I set bower as the default mail client when I click on a 'mailto' in a webpage? #105

Open jgarte opened 2 years ago

jgarte commented 2 years ago

I tried this but as you can see it defaults to emacs for some reason on my system:

xdg-mime default bower.desktop 'x-scheme-handler/mailto'

xdg-mime query default 'x-scheme-handler/mailto'
emacs-mail.desktop

Have you ever needed to set this up on your system for bower?

My use case is clicking on the "reply to thread" link here: https://lists.sr.ht/~whereiseveryone/guixrus/patches/32491

It currently opens in emacs (by default it was opening in protonmail web client ;()).

I'd like to be able to click on the link and it open in bower to reply...

wangp commented 2 years ago

Sorry, I can't help you with xdg-mime. The Arch wiki probably explains that mess.

I have an untested branch to support mailto: arguments on the command line; I'll take another look at it. For now, the best you can do is probably to set the mailto handler to a script that copies the link into the X11 clipboard, e.g.

#!/bin/sh
printf "%s" "mailto:$@" | xclip

then open bower, press m then paste the mailto link.

jgarte commented 2 years ago

Thank you! I'll test and try out your suggestion soon. The help is much appreciated!