Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > d9e53d8c55a76a5f6c46ba473848d671 > files > 10

feh-2.12-3.mga5.i586.rpm

#!/usr/bin/env zsh
# Recursively find images below a certain resolution
#
# Usage: find-lowres [-r] [directory [dimension]]
#
# directory defaults to . (the current working directory),
# dimension defaults to 1000x800 pixels
#
# With -r: removes images instead of just listing them. Use at your own risk.

remove=0

while [[ $1 == -* ]]; do
	case $1 in
		-r) remove=1 ;;
		-|--) shift; break ;;
	esac
	shift
done

base=${1-.}
dimension=${2-1000x800}

if (( remove ))
then
	feh --action 'rm %F' -rlV --max-dim ${dimension} ${base}
else
	feh -rlV --max-dim ${dimension} ${base}
fi