From c2560f8d0beb4650a19168b9a49c5b2a16388246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Sat, 2 Sep 2017 22:18:07 +0200 Subject: Add key-handler action to copy image to clipboard Thanks ploth for coming up with this: https://github.com/muennich/sxiv/issues/247#issuecomment-321316306 Replaces optional dependency on xsel(1) to xclip(1) as it supports this. Fixes issue #247 --- exec/key-handler | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exec/key-handler b/exec/key-handler index dd4d1bb..b470c72 100644 --- a/exec/key-handler +++ b/exec/key-handler @@ -44,7 +44,8 @@ tag_del() { } case "$KEY" in -"C-c") tr '\n' ' ' | xsel -i ;; +"y") tr '\n' ' ' | xclip -i ;; +"C-c") while read file; do xclip -selection clipboard -target image/png "$file"; done ;; "C-e") while read file; do urxvt -bg "#444" -fg "#eee" -sl 0 -title "$file" -e sh -c "exiv2 pr -q -pa '$file' | less" & done ;; "C-g") tr '\n' '\0' | xargs -0 gimp & ;; "C-comma") rotate 270 ;; -- cgit v1.2.3