naelstrof / maim

maim (make image) takes screenshots of your desktop. It has options to take only a region, and relies on slop to query for regions. maim is supposed to be an improved scrot.
Other
2.15k stars 78 forks source link

Repeat last capture #228

Closed pglira closed 3 years ago

pglira commented 3 years ago

Is there any way to repeat the last capture using the previously selected area?

foxpy commented 3 years ago

You can remember previously selected area by calling slop manually.

pglira commented 3 years ago

Works great, thank you!

Save region:

#!/bin/bash
geometry=$(slop -b 3)
echo ${geometry} > /tmp/geometry.txt
maim -g ${geometry}

Load region to repeat capture:

#!/bin/bash
geometry=$(</tmp/geometry.txt)
maim -g ${geometry}