summaryrefslogtreecommitdiffstats
path: root/.config/sxiv/exec/key-handler
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2022-04-10 15:01:22 -0400
committerLuke Smith <luke@lukesmith.xyz>2022-04-10 15:01:22 -0400
commit35316c9c001ba155e160ba70e68fd71143457f55 (patch)
tree2c7a1ddce7c3bc186af288845599a661fe3d55d7 /.config/sxiv/exec/key-handler
parent081809780646e2957972de2d099ed70a044ddfa3 (diff)
downloadeibhear-35316c9c001ba155e160ba70e68fd71143457f55.tar.gz
eibhear-35316c9c001ba155e160ba70e68fd71143457f55.tar.zst
eibhear-35316c9c001ba155e160ba70e68fd71143457f55.zip
close #1106
Diffstat (limited to '.config/sxiv/exec/key-handler')
-rwxr-xr-x.config/sxiv/exec/key-handler4
1 files changed, 2 insertions, 2 deletions
diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler
index 3d9565f..f3dd7dc 100755
--- a/.config/sxiv/exec/key-handler
+++ b/.config/sxiv/exec/key-handler
@@ -1,5 +1,5 @@
#!/bin/sh
-while read file
+while read -r file
do
case "$1" in
"w") setbg "$file" & ;;
@@ -20,7 +20,7 @@ do
"f")
convert -flop "$file" "$file" ;;
"y")
- echo -n "$file" | tr -d '\n' | xclip -selection clipboard &&
+ printf "%s" "$file" | tr -d '\n' | xclip -selection clipboard &&
notify-send "$file copied to clipboard" & ;;
"Y")
readlink -f "$file" | tr -d '\n' | xclip -selection clipboard &&