4 if [ -z "$DISPLAY" ]; then
5 if [ "$OSTYPE" = "freebsd" ]; then
15 if [ -f "$img" ]; then
16 # rudimentary attempt to prevent multiple locks
17 # XXX: could block lock and replace with malicious locker to grab password
18 echo "Lock file exists at '$img', exiting"
21 res="$(xdpyinfo | grep dimensions | awk '{print $2}')"
23 ffmpeg -y -loglevel 0 \
24 -s "$res" -f x11grab -i $DISPLAY -i ~/share/lck/overlay.png \
27 scale=iw * $scale:ih * $scale,
29 scale=`echo $res | tr x :`:flags=neighbor,
34 [1] overlay=x=(main_w - overlay_w) / 2 + 0.5:
35 y=(main_h - overlay_h) / 2
37 -map "[out]" -vframes 1 "$img"