It seems to be possible with a the -l
flag for screencapture
, a flag which isn't documented in the man
as of 10.11.1 ...
The flag has to get the window ID as a parameter, and the ID can be found using https://apple.stackexchange.com/questions/56561/how-do-i-find-the-windowid-to-pass-to-screencapture-l