Hello, On Sat, 21 Mar 2020, Carlos E. R. wrote:
El 2020-03-21 a las 16:06 -0400, Felix Miata escribió:
You can use import from ImageMagick in a script. I don't remember if I ever figured out how to determine the window ID needed, but I'm sure there's an answer to that on the web somewhere if you can't decipher the man page better than me.
I thought ImageMagick could do it, but looking at the man I could not find which of the tools.
==== trap 'exit 0' HUP INT EXIT while true; do wid=$(wmctrl -l | awk '$($NF) ~ /Firefox/ { print $0; }') date=$(date +%Y%m%d-%H%M%S) import -window "$wid" "Firefox_screenshot_${date}.png" sleep 3 done ==== Depending on the program, you'd need a bit more awk programming to find the window required. It just happens, that Firefox has that string in the last field of the window title, which is fields 5-END (aka "$($NF)") in the output of 'wmctrl -l'... HTH, -dnh -- I know I can't see sanity in the rear view mirror any more. -- stevo -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org