浏览代码

Convert images to png when copying to clipboard from sxiv

Frans Bergman 5 年之前
父节点
当前提交
05136f58a4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      .config/sxiv/exec/key-handler

+ 1 - 1
.config/sxiv/exec/key-handler

@@ -24,7 +24,7 @@ rotate() {
 
 case "$1" in
 "C-x")      xclip -in -filter | tr '\n' ' ' | xclip -in -selection clipboard ;;
-"C-c")      while read file; do xclip -selection clipboard -target image/png "$file"; done ;;
+"C-c")      while read file; do convert "$file" png:- | xclip -selection clipboard -target "image/png"; 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-r")      while read file; do rawtherapee "$file" & done ;;