diff options
author | Bert Münnich <ber.t@posteo.de> | 2017-09-02 22:18:07 +0200 |
---|---|---|
committer | Bert Münnich <ber.t@posteo.de> | 2017-09-02 22:19:00 +0200 |
commit | c2560f8d0beb4650a19168b9a49c5b2a16388246 (patch) | |
tree | b7bd9b737d8c98c64729cf13444c6e32763644ce | |
parent | 52c57f5d6114b78c44b232ff349605def07eb524 (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
-rw-r--r-- | exec/key-handler | 3 |
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 ;; |