ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] Utilities (aka, "how do you...")


From: Steve Folta
Subject: Re: [RP] Utilities (aka, "how do you...")
Date: Mon, 6 Oct 2014 22:53:04 -0700

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}"
======



reply via email to

[Prev in Thread] Current Thread [Next in Thread]