2021-11-06 23:28:57 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Compare select terminal image viewers
|
|
|
|
# Args: <height> [images]...
|
|
|
|
runti() {
|
|
|
|
which "$1" >/dev/null &&
|
|
|
|
highlight "$*" && "$@"
|
|
|
|
}
|
|
|
|
cols="$(expr $(tput cols) / $1 / 4 \| 1)"
|
2021-11-11 19:45:58 +00:00
|
|
|
runti timg --title --grid=${cols} -g $(tput cols)x$(expr $1 \* $cols) "${@:2}"
|
2021-11-06 23:28:57 +00:00
|
|
|
runti viu --name -h $1 "${@:2}"
|
|
|
|
runti tiv -h $1 -c $cols "${@:2}"
|