Closed cmprmsd closed 2 years ago
I don't have an immediate answers as to why clipboard pasting via CLI in Wayland does not work. I'm not sure how to go about triaging that issue, but I'll try.
I have gone ahead and created a new issue for the undo pasting issue -- that would be a bug/oversight on my part. #66
I have committed a change to the master branch that adds support for reading an image to annotate from standard input.
As for the --use-clipboard issue, what is the image filetype that is being copied to the clipboard? I think that on X systems, the default filetype for images is image/png. I see that Annotator is specifically looking for image/png filetypes for images. I'm wondering if that is not sufficient for Wayland.
One more thing, in regards to the Control-V issue. I'm wondering how to best deal with this from a UX perspective. I'm proposing a couple of options in regards to how to fix the issue:
Your thoughts?
I have come up with an implementation for the Control-V issue. See #66 for details.
Thanks I'll test it asap!
Ctrl+V is fixed, great :+1:
The clipboard image type is: image/png
according to CopyQ.
Both ways that I would expect to work currently fail.
wl-paste | com.github.phase1geo.annotator
com.github.phase1geo.annotator --use-clipboard
Opening Annotator and then ctrl+v works. Annotator is started with Wayland.
Edit: I missed the parameter -i
. No 1. actually works now!
The --use-clipboard option should work if the image type copied to the clipboard is image/png (that is what the Annotator clipboard is looking for and that is what Control-V uses as well). Not sure why that doesn't work. On elementary (which still uses X), the --use-clipboard option works as expected. I'll need to do some investigation in that regard. I believe that Fedora uses Wayland these days, so I'll use that for a test environment.
@phase1geo I just noticed, that the buttons to export the image are greyed out, when you pipe to annotator with -i.
Workaround is currently to press ctrl+c and ctrl+v which seems to activate the buttons.
I will take a look at that and get it fixed. Thanks!
The latest master branch has this UI issue fixed when loading from standard input. Good catch!
Nice! Thank you 👍👍👍
Hey, great tool!
There is
com.github.phase1geo.annotator --use-clipboard
in order to get an image from clipboard and edit it directly. This method does not work on Wayland. Alsowl-paste | com.github.phase1geo.annotator
won't work as there is no flag for stdin.When you open Annotator and paste an image it will be opened in the editor. However, this is one step that could be skipped.
Also the way how image pasting works, while working on an annotation is quite disturbing. E.g. I annotate an image with 20+ elements and accidentally press
ctrl+v
. All work is gone, as the revert button does not revertpaste
but the changes within the editor. This might be worth another issue though.Keep up the good work!