-
Notifications
You must be signed in to change notification settings - Fork 96
Using sup to follow mailto: links
rthrd edited this page Nov 16, 2014
·
3 revisions
Following mailto://
links in HTML documents, the browser will call the mail
client that it is configured to use with the email address as sole command line
argument.
To follow these links with sup, we have to wrap sup in a little script to call it with a terminal emulator and fix the habit of some browsers to pass the mailto: prefix:
#!/usr/bin/env bash
# sup-wrapper -- shell script to wrap sup for browsers not able to use command
# line options like firefox
# usage:
# sup-wrapper [email protected]
xterm -e sup --compose ${1#mailto:}
Of course everybody's invited to use their favorite terminal emulater instead of xterm.
Living outside of an graphical environment you would have to use a terminal multiplexer like screen or tmux, or open sup on another virtual terminal using openvt.
Now, your favorite browser can be configured to call sup-wrapper (don't forget making the script executable).
Configuring the browser:
- firefox: https://support.mozilla.org/en-US/kb/change-program-used-open-email-links
-
uzbl: customize your scheme handler (default is
$UZBL_DATA_DIR/scripts/scheme.py
) -
elinks: add the following line to your elinks.conf:
set protocol.user.mailto.unix-xwin = "/home/ruthard/bin/sup-wrapper %u"