dshoreman / nextshot

A simple tool for taking screenshots on Linux and sharing via Nextcloud
GNU General Public License v2.0
42 stars 3 forks source link

Ability to paste from GNOME Files application #19

Open dshoreman opened 5 years ago

dshoreman commented 5 years ago

Could also affect other GUI file managers, no idea.

When you copy an image in Nautilus/GNOME Files, the result of xclip -selection c -o is something like this:

x-special/nautilus-clipboard
copy
file:///run/media/dshoreman/data/pictures/foo.jpg

To be able to paste from Nautilus we'd need some way of detecting and parsing that syntax. xclip doesn't seem to offer any image targets, and none of the given options are obviously distinct:

$ xclip -selection clipboard -o -t TARGETS
TIMESTAMP
TARGETS
MULTIPLE
text/uri-list
UTF8_STRING
COMPOUND_TEXT
TEXT
STRING
text/plain;charset=utf-8
text/plain