all repos — dotfiles @ 9eb4feb5c854245a686a15ef900a0edfbca402d2

my *nix dotfiles

Fix screenshot and upload scripts

Signed-off-by: Anirudh <icyph0x@pm.me>
Anirudh icyph0x@pm.me
Wed, 17 Jul 2019 18:58:50 +0530
commit

9eb4feb5c854245a686a15ef900a0edfbca402d2

parent

cdc5b4278329e2b00daefca290bb29df5d32a1f8

2 files changed, 7 insertions(+), 9 deletions(-)

jump to
M bin/icyup.shbin/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/scrbin/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"