Skip to content

Support for copying image with correct targets #29

@dhanjit

Description

@dhanjit

This are the TARGETS when I do a simple right click -> copy image on firefox. The same goes for chrome.

❯ xclip -selection clipboard -t TARGETS -o
TIMESTAMP
TARGETS
MULTIPLE
SAVE_TARGETS
text/html
text/_moz_htmlinfo
text/_moz_htmlcontext
image/png
image/bmp
image/x-bmp
image/x-MS-bmp
image/x-icon
image/x-ico
image/x-win-bitmap
image/vnd.microsoft.icon
application/ico
image/ico
image/icon
text/ico
image/jpeg
image/tiff

This is what I get with xsel.

~/Pictures
❯ xsel -b < mpv-shot0001.jpg

~/Pictures
❯ xclip -selection clipboard -t TARGETS -o
TIMESTAMP
MULTIPLE
TARGETS
DELETE
INCR
TEXT
UTF8_STRING
STRING

And ofcourse pasting the image is something like hangouts doesn't work.

Sadly, currently xclip also doesn't correctly copy an image from file. Neither does any other such tool. CopyQ (https://github.com/hluk/CopyQ) is a heavy alternative to this but doesn't have a non-daemon mode.

It would be good to have xsel support it, as there are no lightweight alternatives currently. Also xsel is already used by many folk and other applications.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions