X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=x%2F.local%2Fbin%2Fscr;h=32e550c806bee61f89151d9011c44e4da544de0f;hb=2218de46f7dae92722654e53d86d81254a208cc5;hp=85bca8592361699ae86ed7114dac08f2a42aa498;hpb=115bb77f3b3c1ff8f4fdeb3a792a64d2aa8b9d80;p=dotfiles.git diff --git a/x/.local/bin/scr b/x/.local/bin/scr index 85bca85..32e550c 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" | cloo.gl | xclip -f | xargs -I{} notify-send {}