# Link

Opens links in a browser.

## Installation

### First use case: local use

If you use poezio on your workstation, this is for you. You only have to load the plugin:

    /load link

### Second use case: remote use

If you use poezio through SSH, this is for you.

Note

Small explanation: Poezio will create a Unix FIFO and send the commands in, and you will have to run a dæmon locally with ssh, to get those commands.

First, set the exec_remote option in the config file to `true`. Then select the directory you want to put the fifo in (default is the current directory, `./`), the `poezio.fifo` file will be created there.

After that, load the plugin:

    /load link

And open a link with /link (as described below), this will create the FIFO.

You need to grab poezio’s sources on your client computer, or at least the daemon.py file.

Finally, on your client computer, run the ssh command:

    ssh toto@example.org "cat ~/poezio/poezio.fifo" | python3 daemon.py

## Usage

/link

  Usage: `/link [range] [command]`

  This plugin adds a /link command that will open the links in `firefox`. If you want to use another browser, or any other command, you can use the /set command to change the browser option. You can also specify the command to execute directly in the arguments. For example /link “mpv %s” will open the first link found using mpv, instead of the configured browser.

  /link without argument will open the last link found in the current tab, if any is found. An optional range argument can be given, to select one or more links to open. Examples: `/link 1` is equivalent to `/link` `/link 3` will open the third link found in the current tab, starting from the bottom. `/link 1:5` will open the last five links in the current tab `/link :2` will open the last two links

## Options

exec_remote

> To execute the command on your client

browser

  Set the default browser started by the plugin