What I want is to press the "Print Screen" key, and get the screenshot saved in a sortable file named like
snapshot-2016-01-19_18-33-44.jpg
That's so easy if you combine
Here is how I do it.
For KDE
First I open a console and call the command systemsettings. Now select "Shortcuts and Gestures" -> "Custom Shortcuts" -> "Edit" -> "New" -> "Global Shortcut" -> "Command/URL" -> enter "PrintScreen"
Click on Trigger -> "None". Type the PrintScreen key. Click on "Reassign" -> "Action". Enter as "Command/URL":
import -window root snapshot-$(date +%Y-%m-%d_%H-%M-%S).jpg
Done :) Every time when I type the PrintScreen key, I now find a file in my home directory with a screenshot :)
Done :) Every time when I type the PrintScreen key, I now find a file in my home directory with a screenshot :)
TroubleShooting
If you follow my instructions, nothing can possibly go wrung. Well, except:- you do not have the "import" command installed. In this case install the "graphviz" software package.
- you do not have KDE as Desktop Environment. In this case you may find sensible ways how to accomplish this with your respective Desktop Environment; you can still use the "import" command as outlined above.
For Ubuntu 19.10
For Ubuntu 19.10, by default, you can just type ALT_Print and you will find your screenshot in your home directory under Pictures. But there is much more you can do:
Key Combination | Result |
---|---|
Complete screen content will be saved to a file ~/Pictures/Screenshot from <timestamp> | |
SHIFT_Print | You will be asked to select a screen area. Result will be saved to a file ~/Pictures/Screenshot from <timestamp> |
Alt_Print | Save current Window to a file ~/Pictures/Screenshot from <timestamp> |
CTRL_Print | Copy complete screen to clipboard |
CTRL_SHIFT_Print | You will be asked to select a screen area. Result will be copied to clipboard. |
CTRL_Alt_Print | Copy current Window to clipboard |