Flameshot and xfce4 were not working for me, so after some digging here is what I came up with. From the gnome discussion, here is a simple code that will copy screenshots to clipboard without saving.
While creating a custom keyboard shortcut in settings, add the following code in Command
section:
bash -c "gnome-screenshot -af ~/Pictures/Screenshots/_custom_screenshot && xclip ~/Pictures/Screenshots/_custom_screenshot -selection clipboard -target image/png; rm ~/Pictures/Screenshots/_custom_screenshot"
Make sure you have gnome-screenshot
and xclip
installed.