1 |
On 07/31/2017 07:23 AM, Grant Edwards wrote: |
2 |
> On 2017-07-30, tuxic@××××××.de <tuxic@××××××.de> wrote: |
3 |
> |
4 |
>> I found this: |
5 |
>> |
6 |
>> "This is a basic, but useful command that simply screenshots the current active window. |
7 |
>> $ maim -i $(xdotool getactivewindow) ~/mypicture.jpg |
8 |
>> " |
9 |
> |
10 |
> [...] |
11 |
> |
12 |
>> For what such a command is good for? |
13 |
> |
14 |
> It's only an example. If you don't want a screenshot of the active |
15 |
> window, then specify a different one. You could also delay that |
16 |
> command like this: |
17 |
> |
18 |
> $ sleep 10; maim -i $(xdotool getactivewindow) ~/mypicture.jpg |
19 |
> |
20 |
> Then you've got 10 seconds to activate whatever the widow you do want |
21 |
> a screenshot of. |
22 |
> |
23 |
media-gfx/scrot is another good utility for that. Has a mode to |
24 |
interactively choose the window you want to capture (-s), too. I've got |
25 |
it hooked up to a bash function: |
26 |
|
27 |
# Add '-s' to interactively set the window to be captured. |
28 |
screenie() { |
29 |
local curdir=$(pwd) |
30 |
local shotname=$(date +%Y-%m-%d_%H-%M).png |
31 |
echo "5 seconds! Go go go!" |
32 |
cd ~/img/screens/comp/ |
33 |
scrot -d 5 -q 70 "$shotname" ${@} |
34 |
echo "Screen taken! Find it under ~/img/screens/comp." |
35 |
cd $curdir |
36 |
} |
37 |
|
38 |
(now that I'm looking at it, it could use a spruce up to use pushd/popd |
39 |
instead of storing the starting dir in a variable...) |
40 |
-- |
41 |
Daniel Campbell - Gentoo Developer |
42 |
OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net |
43 |
fpr: AE03 9064 AE00 053C 270C 1DE4 6F7A 9091 1EA0 55D6 |