1234567891011121314151617181920212223242526 |
- #!/bin/sh --
- set -ue
- exif_cmd='exiv2 -q -pa'
- while IFS='' read -r file; do
- case "${1:?}" in
- 'n')
- basename "${file}" | xclip -sel c -r
- ;;
- 'p')
- realpath "${file}" | xclip -sel c -r
- ;;
- 'd')
- exec dragon -x "${file}"
- ;;
- 'y')
- convert "${file}" png:- | xclip -sel c -t image/png
- ;;
- 'e')
- # shellcheck disable=2016
- exec swallow "${TERMINAL:-st}" -t "${file}" -e sh -c \
- "${exif_cmd}"' -- "${0}" | less -RS' "${file}"
- ;;
- esac
- done
|