update with binaries for bg and screenshot
[dotfiles.git] / x / .local / bin / scr
1 #!/bin/bash
2 [[ "$#" -eq 0 ]] && WINDOW=root || WINDOW="$(xdotool getwindowfocus -f)"
3 URL="$(date +%F_%H-%M-%S).png"
4 import -window "$WINDOW" -quality 90 png:- | curl -s\
5 -u "ftp@martlubbers.net:$(pass ftp.martlubbers.net/ftp@martlubbers.net)"\
6 -T- "ftp://martlubbers.net/public_html/scr/$URL"
7 echo "http://martlubbers.net/scr/$URL" | pee \
8 "xclip -selection clipboard" "xclip"\
9 "xargs -I{} notify-send {}"