bin/b: adapt image display to number of args
This commit is contained in:
parent
10536a6b1b
commit
5c32cd94fc
|
@ -97,15 +97,16 @@ done
|
||||||
|
|
||||||
if test "$timg"; then
|
if test "$timg"; then
|
||||||
$elevate timg -V --rotate=exif -g $(tput cols)x$(expr $(tput lines) / 2) \
|
$elevate timg -V --rotate=exif -g $(tput cols)x$(expr $(tput lines) / 2) \
|
||||||
$(test $# -gt 1 && echo "-t0.2 --center --title --grid=$(expr $(tput cols) / 20)x2") \
|
$(test $# -gt 1 && echo "-t0.2 --center --title --grid=$(expr $(tput cols) / \( 30 - $# \& $# \< 20 \| 10 \))x2") \
|
||||||
"${timg[@]}" "${timga[@]}" 2>/dev/null
|
"${timg[@]}" "${timga[@]}" 2>/dev/null
|
||||||
|
if test $# -lt 15; then
|
||||||
tput setaf 6
|
tput setaf 6
|
||||||
for img in "${timg[@]}"
|
for img in "${timg[@]}"
|
||||||
|
|
||||||
do ident="$(identify -ping -precision 3 -format "%wx%h %b %m %[bit-depth]-bit %[colorspace]" "$img")"
|
do ident="$(identify -ping -precision 3 -format "%wx%h %b %m %[bit-depth]-bit %[colorspace]" "$img")"
|
||||||
printf "%11s %-30s %s\n" "${ident%% *}" "$(basename "$img")" "${ident#* }"
|
printf "%11s %-30s %s\n" "${ident%% *}" "$(basename "$img")" "${ident#* }"
|
||||||
done
|
done
|
||||||
tput sgr0
|
tput sgr0
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$bat"; then
|
if test "$bat"; then
|
||||||
|
|
Loading…
Reference in New Issue