tmux-plugins / tmux-urlview

Quickly open any url on your terminal window!
MIT License
262 stars 32 forks source link

Don't take the default browser #13

Closed wikimatze closed 8 years ago

wikimatze commented 8 years ago

Hi Brunno,

Using tmux-open and pressing o it will opens the default browser on my machine. And tmux-urlview takes chrome. How can I change this?

Bests

Matthias

jbnicolai commented 8 years ago

From the urlview manpage:

CONFIGURATION
urlview attempts to read ~/.urlview upon startup.  If this file doesn't
exist,   it   will   try   to   read   a   system    wide    file    in
/etc/urlview/system.urlview.   There  are  two  configuration  commands
(order does not matter):

COMMAND
If the specified command contains a %s, it  will  be  subsituted
with  the  URL that was requested, otherwise the URL is appended
to the COMMAND string.  The default COMMAND is:

/etc/urlview/url_handler.sh

ENVIRONMENT
If the environment variable BROWSER is set to a browser command,  or  a
colon-delimited  list of commands to try, then the specified browser is
used. %s is replaced with the quoted url to view. If %s is not part  of
a command, the url is appended to the command.

The BROWSER environment variable is honored only if the rc-file doesn't
contain the COMMAND option.  The rc-file provided by the Debian package
contains a COMMAND option.
wikimatze commented 8 years ago

Ahh, it depends on the tool, thank you very much.

jbnicolai commented 8 years ago

Yeah :)

Although I'm curious what Bruno did for it to default to the os default browser, as that would be a nice feature here as well

wikimatze commented 8 years ago

Here is my solution:

export BROWSER='/usr/bin/firefox'

Damn simple and no need to add this feature in this plugin. @bruno- maybe add FAQ to the README for this?