summaryrefslogtreecommitdiffstats
path: root/.config/sxiv/exec/key-handler
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-11-18 17:05:13 -0500
committerLuke Smith <luke@lukesmith.xyz>2020-11-18 17:05:13 -0500
commitc22f0482da9d954e2302d9e7fe5dda57a202fdf3 (patch)
tree1dc52839aef4ad4154639c2b0cfa30bfa05bb442 /.config/sxiv/exec/key-handler
parentc7e3d61753201d48835cdc819dcd6557bc2cffe7 (diff)
downloadeibhear-c22f0482da9d954e2302d9e7fe5dda57a202fdf3.tar.gz
eibhear-c22f0482da9d954e2302d9e7fe5dda57a202fdf3.tar.zst
eibhear-c22f0482da9d954e2302d9e7fe5dda57a202fdf3.zip
do not copy newline; sxiv changes
Diffstat (limited to '.config/sxiv/exec/key-handler')
-rwxr-xr-x.config/sxiv/exec/key-handler9
1 files changed, 5 insertions, 4 deletions
diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler
index dc68313..3d99109 100755
--- a/.config/sxiv/exec/key-handler
+++ b/.config/sxiv/exec/key-handler
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/bin/sh
while read file
do
case "$1" in
@@ -22,13 +22,14 @@ do
"f")
convert -flop "$file" "$file" ;;
"y")
- echo -n "$file" | xclip -selection clipboard &&
+ echo -n "$file" | tr -d '\n' | xclip -selection clipboard &&
notify-send "$file copied to clipboard" & ;;
"Y")
- readlink -f "$file" | xclip -selection clipboard &&
+ readlink -f "$file" | tr -d '\n' | xclip -selection clipboard &&
notify-send "$(readlink -f "$file") copied to clipboard" & ;;
"d")
[ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
- "g") ifinstalled gimp && gimp "$file" & ;;
+ "g") ifinstalled gimp && setsid -f gimp "$file" ;;
+ "i") notify-send "File information" "$(mediainfo "$file")" ;;
esac
done