0

I'm trying to add a keyboard shortcut to be able to automatically screenshot an active window to the clipboard I'm trying this line of code right now gnome-screenshot -w | xclip -selection clipboard but it doesn't work

ps: yes I am writing this line in the shortcut section of gnome

1

The gnome-screenshot -w command doesn't write anything to standard output, so you can't pipe it to another program. In any case, you don't need to, see man gnome-screenshot:

   -c, --clipboard
          Send the grab directly to the clipboard.

So all you need is gnome-screenshot -cw.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.