Re: Utilities (aka, "how do you...")
Steve Folta <[email protected]> Mon, 6 Oct 2014 22:53:04 -0700
| Newsgroups | gmane.comp.window-managers.ratpoison.devel |
|---|---|
| Message-ID | <CAC89NcBAOCYhObrd0eFRmLnO97FZQJdwLm6aGXwvtmTVupiefA@mail.gmail.com> |
This is the script I use to get a screenshot of the active window,
using "import":
======
#!/bin/bash
SHOTSDIR="${HOME}/screenshots"
DATE="$(date +%Y.%m.%d-%H:%M:%S)"
FILENAME="${SHOTSDIR}/screenshot-${DATE}.png"
WINDOW_ID=$(ratpoison -c "windows %s%i" | grep '^\*')
WINDOW_ID=${WINDOW_ID/\*/}
import -window $WINDOW_ID -quality 90 "${FILENAME}"
======