summaryrefslogtreecommitdiffstats
path: root/.config/sxiv/exec/key-handler
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-04-05 18:31:43 -0400
committerLuke Smith <luke@lukesmith.xyz>2020-04-05 18:31:43 -0400
commit4a5ccb5eba28cef1ea8b3f02110345470eaeec42 (patch)
tree0a29877765c16f8b201cf98a11d5be6aeabf5d0d /.config/sxiv/exec/key-handler
parent6cb9c842c6691842d1bd34e495e84e12646d4991 (diff)
parent77ba6e73c64aebf9e4f35a217117fc3dafbde99c (diff)
downloadeibhear-4a5ccb5eba28cef1ea8b3f02110345470eaeec42.tar.gz
eibhear-4a5ccb5eba28cef1ea8b3f02110345470eaeec42.tar.zst
eibhear-4a5ccb5eba28cef1ea8b3f02110345470eaeec42.zip
Merge branch 'master' of github.com:LukeSmithxyz/voidrice
Diffstat (limited to '.config/sxiv/exec/key-handler')
-rwxr-xr-x.config/sxiv/exec/key-handler2
1 files changed, 2 insertions, 0 deletions
diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler
index d9f1825..73b572a 100755
--- a/.config/sxiv/exec/key-handler
+++ b/.config/sxiv/exec/key-handler
@@ -6,11 +6,13 @@ do
"c")
[ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/directories | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
[ -z "$destdir" ] && exit
+ [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." &
;;
"m")
[ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/directories | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
[ -z "$destdir" ] && exit
+ [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." &
;;
"r")