aboutsummaryrefslogtreecommitdiffstats
path: root/.config/sxiv
diff options
context:
space:
mode:
authorkatherine <shmibs@shmibbles.me>2016-03-19 22:17:28 -0700
committerkatherine <shmibs@shmibbles.me>2016-03-19 22:17:28 -0700
commite92af1f7088cc5b6b40a5ceba275a197c305de62 (patch)
tree5d92832f1ecdaff44ca61a15f3c3d11b49fb2d79 /.config/sxiv
parentb351865a2b3678708d70c6e088c70ae8f7fd923f (diff)
downloaddotfiles-e92af1f7088cc5b6b40a5ceba275a197c305de62.tar.gz
snapshot
lots of random things changed; forgot to update for a while again. moving things to .config/init/funcs is one important thing; means being able to use those shell scripts anywhere, like ranger or whatever
Diffstat (limited to '.config/sxiv')
-rwxr-xr-x.config/sxiv/exec/key-handler27
1 files changed, 6 insertions, 21 deletions
diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler
index 6668c36..7b5b3d1 100755
--- a/.config/sxiv/exec/key-handler
+++ b/.config/sxiv/exec/key-handler
@@ -11,7 +11,6 @@ while read line; do
files=( "${files[@]}" "$line" )
done
-
if [[ "${#files[@]}" -eq 1 ]]; then
case "$1" in
"y")
@@ -31,26 +30,12 @@ case "$1" in
"C-d") rm "${files[@]}" ;;
"g") gimp "${files[@]}" & ;;
"s")
- for file in "${files[@]}"; do
- scp "$file" shmibbles.me:http/tmp/
- basename=$(basename $file)
- if [[ $? -ne 0 ]]; then
- notify-send "uploading $basename to /tmp/ failed"
- else
- 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
- done
- ;;
- "n")
- for file in "${files[@]}"; do
- notify-send "$file"
- done
- notify-send "${#files[@]}"
+ send "${files[@]}"
+ if [[ $? -ne 0 ]]; then
+ notify-send "sxiv: send to /tmp/ failed"
+ else
+ notify-send "sxiv: sent to /tmp/"
+ fi
;;
*)
notify-send "sxiv: command not recognised" ;;