|
Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
#!/bin/sh
# (find-angg ".fvwm/edrx-menus.fvwm")
# (find-angg ".zshrc" "myincr")
# (find-man "1 import")
# Experimental - called by fvwm
# Edrx, 2006aug13
mkdir -p /tmp/screenshots
cd /tmp/screenshots || exit 1
if [ ! -e n ]; then
echo 0 > n
fi
# (find-man "1 fvwm")
# (find-man "1 fvwm" "ThisWindow [(conditions)] command")
# (find-man "1 fvwm" "$[w.x] $[w.y] $[w.width] $[w.height]")
# (find-angg "bin/Xscreenshot")
# (find-angg "bin/Xscreenshot-rect")
# (find-man "1 import")
# (find-man "1 import" "import -window root -crop 512x256-0+0")
# (find-anggfile ".fvwm/nokeys.fvwm")
# (find-anggfile ".fvwm/keys.fvwm")
# (find-angg "bin/Xscreenshot-rect")
# (find-angg "bin/Xscreenshot-window")
# (eefvwm0 "Key w A 4 ThisWindow Exec sh -c 'echo $[w.x] $[w.y] $[w.width] $[w.height] > /tmp/foo'")
# (eefvwm0 "Key w A 4 ThisWindow Exec Xscreenshot-window $[w.x] $[w.y] $[w.width] $[w.height]")
# (find-man "X" "GEOMETRY SPECIFICATIONS")
# (find-fline "/tmp/screenshots/")
X=$1
Y=$2
WIDTH=$3
HEIGHT=$4
N=$[$(<n)+1]
import -window root -crop ${WIDTH}x$HEIGHT+$X+$Y ss$(printf %02d $N).png
echo $N > n