From 74495ab4c2aff7dc618b021990ce098dafbd22ad Mon Sep 17 00:00:00 2001 From: shmibs Date: Fri, 24 Jul 2015 17:19:29 -0700 Subject: ACTUALLY fix send (...i hope?) --- .config/sxiv/exec/key-handler | 2 +- .zshrc-linux | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler index b388078..aac647e 100755 --- a/.config/sxiv/exec/key-handler +++ b/.config/sxiv/exec/key-handler @@ -18,7 +18,7 @@ do if [[ $? -ne 0 ]]; then notify-send "uploading $(basename $file) to /tmp/ failed" else - ssh shmibbles.me "chmod o+r 'http/tmp/$file'" + ssh shmibbles.me "chmod o+r 'http/tmp/$(basename $file)'" name=$(echo "http://shmibbles.me/tmp/$(basename $file)" | sed 's/ /%20/g') echo "$name" | tr -d '\n' | xclip -i -selection clipboard echo "$name" | tr -d '\n' | xclip -i -selection primary diff --git a/.zshrc-linux b/.zshrc-linux index bf95ebe..0e7daa3 100644 --- a/.zshrc-linux +++ b/.zshrc-linux @@ -62,11 +62,12 @@ scap() { send() { if [[ "$1" ]]; then scp $@ shmibbles.me:http/tmp/ - ssh shmibbles.me "cd http/tmp; chmod o+r '$@'" if [[ $? -eq 0 ]]; then for name in "$@" do - name=$(echo "http://shmibbles.me/tmp/$(basename $name)"\ + basename=$(basename $name) + ssh shmibbles.me "cd http/tmp; chmod o+r '$basename'" + name=$(echo "http://shmibbles.me/tmp/$basename"\ | sed 's/ /%20/g') echo $name | tr -d '\n' | xclip -i -selection clipboard echo $name | tr -d '\n' | xclip -i -selection primary -- cgit v1.2.3