If I understand your question correctly, you want to have a command to capture a specific area of your desktop without having to subsequently crop the image.
For example, you want to capture a rectangle 500px wide and 300px high. And this rectangle is 200px from the left edge of your screen and 10px from the top of your screen.
You can do so with maim
which can be installed with sudo apt install maim
.
Assign a keyboard shortcut to the following code:
maim --geometry=500x300+200+10 ~/Pictures/$(date +%Y%m%d%H%S.png)
Now, each time you press the keyboard shortcut, an image of the specified size and position will be saved in ~/Pictures
with a timestamp and .png
as the extension. (You can use the jpeg
format if you prefer). Check man maim for other options and visit the project's homepage for more ideas.
maim --geometry=100x300-5+0 --delay=10 ~/Pictures/$(date +%s).png
. See maim's man page (link in my previous comment) for an explanation. – DK Bose Feb 26 '20 at 13:52