In the olden days when I still used Windows, I loved having the ALT+PrintScreen keycombo around, it makes a screen capture of only the currently active window, nicely cropped and everything. This saves you the hassle of aligning it pixel-perfect in Paint. On Linux, at least using awesome, I haven’t been able to do this, so I wrote a quick script that allows me to do that and a bit more.
grabw is a bash script that allows you to
- Take a screenshot of a window by X window ID
- Take a screenshot of a window the user first has to click, using xwininfo
- The above two with or without asking for a filename using Zenity’s file selection dialogue window
Combine this with awesome’s ability to spawn processes on the fly and pass parameters (such as window IDs, *hint hint*) this is one feature I’m glad to have back
grabw 0.2 has been released into public domain, you can find it on my projects page.