Krolyxon
Commit c2560f8

Branches

Refs →

nsxivc2560f8

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
Author
Bert Münnich
Date
2017-09-02 22:18 +0200
Committer
Bert Münnich · 2017-09-02 22:19 +0200
Parent
52c57f5
Commit
c2560f8d0beb4650a19168b9a49c5b2a16388246

+2 −1

1 file changed

  1. M exec/key-handler +2 −1
M exec/key-handler View
@@ -44,7 +44,8 @@ tag_del() {
4444 }
4545
4646 case "$KEY" in
47−"C-c") tr '\n' ' ' | xsel -i ;;
47+"y") tr '\n' ' ' | xclip -i ;;
48+"C-c") while read file; do xclip -selection clipboard -target image/png "$file"; done ;;
4849 "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 ;;
4950 "C-g") tr '\n' '\0' | xargs -0 gimp & ;;
5051 "C-comma") rotate 270 ;;