[sxiv] Add shotcut to copy a single image

The first image marked in sxiv will be the only one copied
This commit is contained in:
Lucien Cartier-Tilet 2021-04-02 19:30:25 +02:00
parent 3de5254050
commit 6f8e85c65f
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -21,4 +21,8 @@ switch "$argv[1]"
for f in $FILES
convert -rotate 270 "$f" "$f"
end
case "y"
set FILE $FILES[1]
set TYPE (file -i $FILE | sed -r 's|.*(image/[a-z]+);.*|\1|')
xclip -sel clip -t "$TYPE" -i "$FILE"
end