The language does not matter, the libraries either, I just need the fastest way to specify the window (name or descriptor).
Try:
import // man import for options
Take a snapshot of my pidgin client.
import -screen -window Kompislista foo.jpg // Kompislista is in swedish.
You can specify many parameters, such as a frame or window identifier.
see man xwd
xwd takes screenshots
gnome-screenshot.
gnome-screenshot --help
-w.