lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] copy URL to clipboard shortcut


From: Fadi Barbàra
Subject: Re: [Lynx-dev] copy URL to clipboard shortcut
Date: Mon, 20 Apr 2020 22:25:21 +0200
User-agent: Mutt/1.12.2 (2019-09-21)

Hi,
I do not know what is the use case, but I assume something like:
- you are in a page P
- you want to copy the url of the page you are in
- you want to paste that URL in an external application

For that to work with external you need a file `$HOME/.lynx/external` in your 
PC _if_ your lynx has been compiled with the option external.

I post here my externals file for example:

```
EXTERNAL:http:echo -n %s|xclip -i:TRUE
EXTERNAL:http:wget %s:TRUE
EXTERNAL:http:mpv %s:TRUE
EXTERNAL:http:git clone %s:TRUE
EXTERNAL:http:links -g %s:TRUE
EXTERNAL:http:chrome %s:TRUE

EXTERNAL:gopher:lynx -dump %s|urlview:TRUE
EXTERNAL:gopher:echo -n %s|xclip -i:TRUE
EXTERNAL:gopher:wget %s:TRUE

EXTERNAL:ftp:wget %s:TRUE
```

When you are in page P, you press ',' (default keybinding) and a pop up menu 
will appear with all the possible externals given the protocol. E.g. if you are 
in a http/https page you would see the options of the first group, i.e. from 
`echo` to `chrome`. if you select the `echo -n ...` option, it will copy the 
url of P into clipboard, no other actions needed. To paste it you have to use 
the shortcut of your terminal or application you want to paste that link into.

Note that you can use those externals also on the highlighted/selected link in 
a page, by pressing '.' instead of ',' .

Best,
Fadi

On Mon, Apr 20, 2020 at 08:43:33PM +0530, address@hidden wrote:
> hi fadi
> On 4/20/20 4:08 PM, Fadi Barbàra wrote:
> > Hi
> > On Mon, Apr 20, 2020 at 12:11:11PM +0530, address@hidden wrote:
> >> hi
> >> it would be greath to have a shortcut for copying the URL of the file
> >> currently viewing INTO clipboard.
> > Have you tried using externals? 
> > 
> > If you compiled enabling them (I think the debian version has it compiled 
> > that way by default) you can use a command like `echo %s|xclip -i 
> > -selection clipboard` as an external. 
> > 
> > External can be accessed via '.' and ',' by default.
> 
> do i understand it correct: the external command is doing something with
> selected text? select URL then '.'?
> if so, the problem isn't solved with long URL. when using 'G' the URL is
> truncated and can't be selected in whole.
> 
> or do i miss something?
> thanks
> 
> _______________________________________________
> Lynx-dev mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lynx-dev



reply via email to

[Prev in Thread] Current Thread [Next in Thread]