1 |
On 2017-08-01 03:00, Daniel Campbell wrote: |
2 |
|
3 |
> # Add '-s' to interactively set the window to be captured. |
4 |
> screenie() { |
5 |
> local curdir=$(pwd) |
6 |
> local shotname=$(date +%Y-%m-%d_%H-%M).png |
7 |
> echo "5 seconds! Go go go!" |
8 |
> cd ~/img/screens/comp/ |
9 |
> scrot -d 5 -q 70 "$shotname" ${@} |
10 |
> echo "Screen taken! Find it under ~/img/screens/comp." |
11 |
> cd $curdir |
12 |
> } |
13 |
> |
14 |
> (now that I'm looking at it, it could use a spruce up to use pushd/popd |
15 |
> instead of storing the starting dir in a variable...) |
16 |
|
17 |
pushd and popd are bashisms, your current way works with any POSIX shell. |
18 |
|
19 |
-- |
20 |
Please don't Cc: me privately on mailing lists and Usenet, |
21 |
if you also post the followup to the list or newsgroup. |
22 |
Do obvious transformation on domain to reply privately _only_ on Usenet. |