aboutsummaryrefslogtreecommitdiff
path: root/exec/key-handler
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2017-09-02 22:18:07 +0200
committerBert Münnich <ber.t@posteo.de>2017-09-02 22:19:00 +0200
commitc2560f8d0beb4650a19168b9a49c5b2a16388246 (patch)
treeb7bd9b737d8c98c64729cf13444c6e32763644ce /exec/key-handler
parent52c57f5d6114b78c44b232ff349605def07eb524 (diff)
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
Diffstat (limited to 'exec/key-handler')
-rw-r--r--exec/key-handler3
1 files changed, 2 insertions, 1 deletions
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 ;;