~nabijaczleweli/urlview-ng#8: 
Feature Request: Copy URL to X Selection Buffer(s)

Occasionally, I want to open a URL in a browser different from the "primary" one. As such, it would be nice if there were a key binding that instead copied the selected URL to the X11 primary or clipboard selection buffer, readying it for pasting in to the alternate browser (or editor, or wherever). I have no sense of how difficult it would be to implement this.

Thanks for your time,
Schwab

Status
RESOLVED IMPLEMENTED
Submitter
Leo L. Schwab
Assigned to
No-one
Submitted
2 months ago
Updated
2 months ago
Labels
No labels applied.

~nabijaczleweli 2 months ago

Directly? "Fundamentally infeasible." (do keep in mind that urlview isn't an X program at all)
Indirectly (running xclip)? "Not very."

I do this on occasion but I just double-click the URL to select it and then copy it. But I suppose the convenience factor of having a binding is certainly something to be said for. Mouse button 2 and y (yank, like in vi) can be probably bound to do this. Watch this space as I draft an implementation.

~nabijaczleweli REPORTED IMPLEMENTED 2 months ago

наб referenced this ticket in commit 33199b7.

~nabijaczleweli 2 months ago

Can you try current trunk? You should be able to press y (or RMB) to copy the URL to primary (set XSELECTION clipboard for clipboard).

Leo L. Schwab (edited) 2 months ago* · edit

On Sat, Oct 05, 2024 at 11:11:57PM +0000, ~nabijaczleweli wrote:

Can you try current trunk? You should be able to press y (or RMB) to copy the URL to primary (set XSELECTION clipboard for clipboard).

An interesting coding approach. Obviously, the Debian packager will need to add xclip | xsel to the package's "Recommends" or "Suggests" list.

Tested both new modes on some email messages from inside Mutt. Did exactly what I was hoping for. Thank you very kindly!

Schwab

~nabijaczleweli 2 months ago

Conveniently, that's me, and I already have Suggests: xclip | xsel | wl-clipboard staged locally :)

Register here or Log in to comment, or comment via email.