How can I save and copy a screenhot at the same time?
The -f is cancelled by the -c:
OPTIONS
-c, --clipboard
Send the grab directly to the clipboard.
-f, --file=FILENAME
Save screenshot directly to this file.
The file will be stored in memory, not on disk, when -c is used: if you open Libreoffice writer and paste you will see your image.
How can I save and copy a screenshot at the same time?
edit1: bugreport #1446650 but nobody bothered to follow up on this. edit2: I found a way around it by using xclip. Install with ...
sudo apt install xclip
and expand your command with a variable holding date and time and 2 commands:
DATE=`date '+%Y-%m-%d_%H:%M:%S'`
sleep 5 && gnome-screenshot -af $DATE && xclip -selection clipboard -t image/png -i $DATE