1 #!/usr/bin/env bash 2 slop=$(slop -f "%x %y %w %h %g %i") || exit 1 3 read -r X Y W H G ID <<< $slop 4 ffmpeg -f x11grab -s "$W"x"$H" -i :0.0+$X,$Y ${1:-"${HOME}/$(date +%s).gif"}