Fix screenshot and upload scripts Signed-off-by: Anirudh <icyph0x@pm.me>
Anirudh icyph0x@pm.me
Wed, 17 Jul 2019 18:58:50 +0530
2 files changed,
7 insertions(+),
9 deletions(-)
M
bin/icyup.sh
→
bin/icyup.sh
@@ -1,17 +1,14 @@
-#!/bin/zsh +#!/usr/bin/env bash -hash=`md5sum <<EOF -$RANDOM -EOF` - -fn=`echo $hash | awk '// { print $1 }'` +n=3; fn=$(tr -cd '[:alnum:]' < /dev/urandom | head -c$n) if [ "$1" != "" ]; then file=$1 ext="${file##*.}" fullname="$fn.$ext" - scp $1 emerald:icywww/stuff/$fullname + scp -P 443 "$1" emerald:icywww/stuff/"$fullname" echo "https://x.icyphox.sh/$fullname" + echo "https://x.icyphox.sh/$fullname" | xclip -selection clipboard else echo "no path specified :v" fi
M
bin/scr
→
bin/scr
@@ -1,6 +1,7 @@
#!/usr/bin/env bash +scr_path=~/pics/scrots n=6; output=$(tr -cd '[:alnum:]' < /dev/urandom | head -c$n) -import -window root ~/pics/scrots/$output.png +import -window root "$scr_path/$output.png" notify-send 'screenshot taken!' -xclip -selection clipboard -t image/png -i ~/pics/scrots/$output.png +xclip -selection clipboard -t image/png -i "$scr_path/$output.png"