4 if [ -z "$DISPLAY" ]; then
11 if [ -f "$img" ]; then
12 # rudimentary attempt to prevent multiple locks
13 # XXX: could block lock and replace with malicious locker
14 echo "Lock file exists at '$img', exiting"
17 res="$(xdpyinfo | grep dimensions | awk '{print $2}')"
19 ffmpeg -y -loglevel 0 \
20 -s "$res" -f x11grab -i $DISPLAY -i ~/share/l/overlay.png \
23 scale=iw * $scale:ih * $scale,
25 scale=`echo $res | tr x :`:flags=neighbor,
30 [1] overlay=x=(main_w - overlay_w) / 2 + 0.5:
31 y=(main_h - overlay_h) / 2
33 -map "[out]" -vframes 1 "$img"