diff --git a/.local/bin/scripts/b b/.local/bin/scripts/b index 89c841e..caa7e1c 100755 --- a/.local/bin/scripts/b +++ b/.local/bin/scripts/b @@ -97,15 +97,16 @@ done if test "$timg"; then $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 - tput setaf 6 - for img in "${timg[@]}" - - 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#* }" - done - tput sgr0 + if test $# -lt 15; then + tput setaf 6 + for img in "${timg[@]}" + 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#* }" + done + tput sgr0 + fi fi if test "$bat"; then