aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkatherine <shmibs@shmibbles.me>2016-01-14 10:40:28 +0000
committerkatherine <shmibs@shmibbles.me>2016-01-14 10:40:28 +0000
commit263e556e523ca5817efa4f717d532a5cc1035a5e (patch)
tree12fd11d0b87542fc1e1e8086b8ffca185d9f3b16
parentf4cb82b99daf3e2f848a504b4acfe809a7ae5970 (diff)
parente34698116a493c34fa4b584e500e9c6b5f5dd74a (diff)
downloaddotfiles-263e556e523ca5817efa4f717d532a5cc1035a5e.tar.gz
Merge branch 'master' of github.com:shmibs/dotfiles
-rwxr-xr-x.config/sxiv/exec/key-handler14
-rw-r--r--.zshrc-linux-desktop4
2 files changed, 10 insertions, 8 deletions
diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler
index aac647e..43163c3 100755
--- a/.config/sxiv/exec/key-handler
+++ b/.config/sxiv/exec/key-handler
@@ -15,14 +15,16 @@ do
gimp "$file" & ;;
"s")
scp "$file" shmibbles.me:http/tmp/
+ basename=$(basename $file)
if [[ $? -ne 0 ]]; then
- notify-send "uploading $(basename $file) to /tmp/ failed"
+ notify-send "uploading $basename to /tmp/ failed"
else
- 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
- notify-send "uploaded $(basename $file) to /tmp/"
+ ssh shmibbles.me "cd http/tmp; chmod o+r '$basename'"
+ name=$(echo "https://shmibbles.me/tmp/$basename"\
+ | sed -e 's/ /%20/g' -e 's/?/%3f/g')
+ echo $name | tr -d '\n' | xclip -i -selection clipboard
+ echo $name | tr -d '\n' | xclip -i -selection primary
+ notify-send "uploaded $basename to /tmp/"
fi
;;
*)
diff --git a/.zshrc-linux-desktop b/.zshrc-linux-desktop
index aee3aa5..ac3f992 100644
--- a/.zshrc-linux-desktop
+++ b/.zshrc-linux-desktop
@@ -33,8 +33,8 @@ send() {
do
basename=$(basename $name)
ssh shmibbles.me "cd http/tmp; chmod o+r '$basename'"
- name=$(echo "http://shmibbles.me/tmp/$basename"\
- | sed 's/ /%20/g')
+ name=$(echo "https://shmibbles.me/tmp/$basename"\
+ | sed -e 's/ /%20/g' -e 's/?/%3f/g')
echo $name | tr -d '\n' | xclip -i -selection clipboard
echo $name | tr -d '\n' | xclip -i -selection primary
done