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
master
Bert Münnich 2017-09-02 22:18:07 +02:00
parent 52c57f5d61
commit c2560f8d0b
1 changed files with 2 additions and 1 deletions

View File

@ -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 ;;