Closed dshoreman closed 5 years ago
After some testing in Wayland/Sway, the import
command does work, but only partially.
Running import /tmp/foo.png
and clicking on an XWayland window (e.g. Firefox) yields a screenshot of the window as expected.
Dragging fails to draw the selection box at all - even when over an X window running through XWayland. When selection ends, import
fails with the following error:
import: unable to read X window image '': Resource temporarily unavailable @ error/xwindow.c/XImportImage/5044.
import: '/tmp/foo.png' @ error/import.c/ImportImageCommand/1288.
It's looking increasingly like Wayland will need env-specific toolsets. Regardless of whether shooting an XWayland window or a native Wayland one, maim
is always producing a transparent image.
slop
slurp
While NextShot is able to copy share links via
wl-copy
, it is highly likely thatimport
is either only capable of capturingXWayland
windows or simply won't work at all.We'd probably need to use a different tool depending on the WM/DE being used, because each compositor has their own way of doing things. Or so I gather...
gnome-screenshot
.swaygrab
built in, but that got removed. The wiki suggests usinggrim
.slurp
can replaceslop
/maim
.gnome-screenshot
has the-a
flag to select an area