On 07/31/2017 07:23 AM, Grant Edwards wrote:
> On 2017-07-30, [email protected] <[email protected]> wrote:
> 
>> I found this:
>>
>>     "This is a basic, but useful command that simply screenshots the current 
>> active window.
>>      $ maim -i $(xdotool getactivewindow) ~/mypicture.jpg
>>     "
> 
> [...]
> 
>> For what such a command is good for?
> 
> It's only an example.  If you don't want a screenshot of the active
> window, then specify a different one. You could also delay that
> command like this:
> 
>  $ sleep 10; maim -i $(xdotool getactivewindow) ~/mypicture.jpg
> 
> Then you've got 10 seconds to activate whatever the widow you do want
> a screenshot of.
> 
media-gfx/scrot is another good utility for that. Has a mode to
interactively choose the window you want to capture (-s), too. I've got
it hooked up to a bash function:

# Add '-s' to interactively set the window to be captured.
screenie() {
        local curdir=$(pwd)
        local shotname=$(date +%Y-%m-%d_%H-%M).png
        echo "5 seconds! Go go go!"
        cd ~/img/screens/comp/
        scrot -d 5 -q 70 "$shotname" ${@}
        echo "Screen taken! Find it under ~/img/screens/comp."
        cd $curdir
}

(now that I'm looking at it, it could use a spruce up to use pushd/popd
instead of storing the starting dir in a variable...)
-- 
Daniel Campbell - Gentoo Developer
OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net
fpr: AE03 9064 AE00 053C 270C  1DE4 6F7A 9091 1EA0 55D6

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to