#!/bin/sh while read file do case "$1" in "d") trash-put "$file";; "r") convert -rotate 90 "$file" "$file" ;; "R") convert -rotate 270 "$file" "$file" ;; "c") xclip -sel c -t image/png -i "$file" ;; "s") setbg "$file";; "i") convert $file -channel RGB -negate /tmp/output.png && sxiv -f /tmp/output.png ;; esac done