You are not logged in.
I'm trying to use import png:- | xclip -selection clipboard -t image/png, but when I execute the command, it will make the mouse into a crosshair, likely wanting me to select a region or window. I just want to take a screenshot of the whole desktop without extra user input.
I tried passing -window root with import -window root png:- | xclip -selection clipboard -t image/png but it ended up doing the same thing. I would use flameshot, but it has a slight delay, and I want to maybe try and change the data to image/jpeg instead of png, which flameshot doesn't support.
Last edited by coldreactive (2024-07-09 11:44:05)
Offline
-screen?
Offline
-screen?
import -screen png:- | xclip -selection clipboard -t image/pngWill also just change the mouse to a crosshair. Looks like the correct command is
import -silent -window root png:- | xclip -selection clipboard -t image/pngThanks to a reddit response. Keep in mind, if you change the image format to jpeg, it will not be able to paste into programs like discord, but will paste into gimp. This command, however, will not work with a keyboard shortcut. Nothing will be sent to the clipboard. In order to send it to the clipboard via a keyboard shortcut, wrap it in an sh -c command:
sh -c 'import -silent -window root png:- | xclip -selection clipboard -t image/png'Last edited by coldreactive (2024-07-09 12:07:20)
Offline