X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=x%2F.local%2Fbin%2Fscr;h=5197c212384ac2f74c75cee71f13e1bad24a85ef;hb=24f79ae54474da832222c3910a7ca9d4f9abe3ae;hp=85bca8592361699ae86ed7114dac08f2a42aa498;hpb=115bb77f3b3c1ff8f4fdeb3a792a64d2aa8b9d80;p=dotfiles.git diff --git a/x/.local/bin/scr b/x/.local/bin/scr index 85bca85..5197c21 100755 --- a/x/.local/bin/scr +++ b/x/.local/bin/scr @@ -1,9 +1,6 @@ -#!/bin/bash -[[ "$#" -eq 0 ]] && WINDOW=root || WINDOW="$(xdotool getwindowfocus -f)" -URL="$(date +%F_%H-%M-%S).png" -import -window "$WINDOW" -quality 90 png:- | curl -s\ - -u "ftp@martlubbers.net:$(pass ftp.martlubbers.net/ftp@martlubbers.net)"\ - -T- "ftp://martlubbers.net/public_html/scr/$URL" -echo "http://martlubbers.net/scr/$URL" | pee \ - "xclip -selection clipboard" "xclip"\ - "xargs -I{} notify-send {}" +#!/bin/sh -e +[ "$#" -eq 1 ] && CROP="$(slop -t 0 -f "-crop %g")" +URL="scr/$(date +%F_%H-%M-%S).png" +import -window root $CROP png:- | \ + ssh ygdrassil ssh martlubbers.net "cat \> public_html/$URL" +echo "http://martlubbers.net/$URL" | xclip -f | xargs -I{} notify-send {}