update screenshot and i3
[dotfiles.git] / x / .local / bin / scr
1 #!/bin/bash
2 set -e
3 [[ "$#" -eq 1 ]] && CROP="$(slop -t 0 f '-crop %g')"
4 URL="$(date +%F_%H-%M-%S).png"
5 import -window root $CROP -quality 90 png:- | curl -s\
6 -u "ftp@martlubbers.net:$(pass ftp.martlubbers.net/ftp@martlubbers.net)"\
7 -T- "ftp://martlubbers.net/public_html/scr/$URL"
8 echo "https://martlubbers.net/scr/$URL" |\
9 xclip -f -sel c | xclip -f | xargs -I{} notify-send {}