Selection to clipboard & file
1. Software
- maim
- xclip
I prefer maim over scrot due to some glitched lines appearing in the final screenshot.
2. Command
RAND=$(openssl rand -hex 16); maim -s ~/Media/Screenshots/$RAND.png; xclip -selection clipboard -t image/png ~/Media/Screenshots/$RAND.png
I prefer random hex strings than unix timestamps + smaller random data because having the exact timestamp in each screen image is… bad.
Yes, it’s stored in the filesystem timestamp, remove it when you want. With the timestamp you have to remove it and then change filenames.