Spectacle takes too long to send to clipboard when in a fullscreen application

When playing a borderless full-screen video game, such as Final Fantasy XIV (but it happens on all full-screen and borderless full-screen programs), spectacle will take far too long to send a full-screen screenshot to the clipboard, sometimes 3-5 or more seconds. In fact, sometimes, it will completely fail to send a screenshot to the clipboard, as evidence to both discord pasting a blank image and gimp saying there’s no image data in the clipboard.

Is there a way around this? Because flameshot does something similar (and in fact, when running flameshot from the terminal, flameshot takes a second or more to send a screenshot directly to the clipboard without opening), not that I want a bouncing KDE icon near my mouse while in-game when I hit the print screen button.

I just want an experience similar to Windows/Xorg/X11 where when I hit Print screen, it immediately sends to the clipboard. But I also want to utilize wayland. I’ve heard that wlroots doesn’t have this problem, and you can use something similar to this command that I normally use in X11/Xorg with imagemagick’s import:

sh -c 'import -silent -window root png:- | xclip -selection clipboard -t image/png'

The labwc github told me how to do that by using grim:

grim -t png - | wl-copy -t image/png

However, using grim in this way on KDE, will not allow it to work, as it states that it’s not allowed to take a full screen capture or something. (From what I understand, it’s because KDE uses xdg-portal and not wlroots.) My hardware configuration is as follows:

AMD Ryzen 7 9800X3D
NVIDIA GeForce RTX 3060 (12 GB)
48 GB of RAM
2 TB NVME SSD

Distribution: Arch Linux (EndeavourOS)
Kernel: Linux 6.18.7-arch1-1
Plasma: 6.5.5

And for those who are wondering, I don’t want spectacle to open, either. I want it to do this in the background without showing a dialogue.

Have you tried binding your screenshot key to “Capture Current Monitor” or “Capture Entire Desktop” instead of “Open Spectacle”?

In that case, it should dump a screenshot directly to the clipboard without opening spectacle. Assuming “Copy Image to Clipboard” is set in settings.

Yep. it still takes too long, and potentially fails.