Re: [Slightly OT] Allow for choosing browser to follow a link
- To: mutt-users@xxxxxxxx
- Subject: Re: [Slightly OT] Allow for choosing browser to follow a link
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Wed, 29 Aug 2007 09:42:26 -0600
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=0.5; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=received:received:date:from:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; q=dns/txt; s=default; bh=69YLharGkgfyEf7sh7axXsVyaPQ=; b=g9C/D4UzFPIaG7rdSCmneKQ4QVgcGOzNCS5rHC1cMerRDMQlEp/ddIpPWc7ZPSZm8sYk/ylwsFBaqA/bHhktzoQ35Tl47g9FUDHCwwrBLJn8j6KkskE04aP9/Llcb/6IfrDlymvMlDwRre1nBJ59F891m3FqrIL/JCEi1jcATKM=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=mC+TRQRtMNS/I6DSwWrcJcXm6Pdmqv8QP/hx9hmC8ipV+PBoL0BQUQn5NHX+6M+fXgj/9ruqNvw2HU6isY1X5nJHHCM3TBr1uAoxulBl2U5I0iR1cKQ2B+LHjRB3TQVNTBhJVQtxogD2Gkq9p+ftN0pKHquRoic/rGCmeN5PNLI=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent;
- In-reply-to: <20070829143031.GF6402@xxxxxxxxxxxxxxxxxxxxxxxx>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- References: <20070829113500.GC6402@xxxxxxxxxxxxxxxxxxxxxxxx> <20070829115517.GU20719@xxxxxxxxxxxxxxx> <20070829143031.GF6402@xxxxxxxxxxxxxxxxxxxxxxxx>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.16 (2007-08-28)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday, August 29 at 04:30 PM, quoth Kai Grossjohann:
>Actually, what I want is a list of URLs just like that provided by
>urlview, but when selecting an http or https URL I should be able to
>choose a browser. Or perhaps choose a browser globally before selecting
>a URL to view.
One way to do it would be to configure urlview to use a script as a
browser. Then in this script, you can do something like:
#!/bin/sh
choice=""
while [ "$choice" != 1 -a "$choice" != 2 ] ; do
echo "Options:"
echo "1. Firefox"
echo "2. w3m"
read -p "-> " choice
done
if [ "$choice" -eq 1 ] ; then
firefox "$1"
else
w3m "$1"
fi
... OR you could have your script decide based on an environment
variable, like so:
#!/bin/sh
$BROWSER "$1"
Then all you'd need to do is set BROWSER before calling urlview, like
so:
macro index,pager \cb '<pipe-message>env BROWSER=firefox urlview<enter>'
macro index,pager \cn '<pipe-message>env BROWSER=w3m urlview<enter>'
~Kyle
- --
Human beings are the only creatures that allow their children to come
back home.
-- Bill Cosby
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iD8DBQFG1ZPiBkIOoMqOI14RAuKdAJ9QNA/xw9VNJNcZo7/Me4EJEBYUQQCfYmK2
EtVuHofB+ejws59CZSs8COI=
=vHzW
-----END PGP SIGNATURE-----