Change height calculation to use stty instead of tput

This commit is contained in:
BBaoVanC 2020-12-27 23:21:45 -06:00
parent e9f6e6185e
commit 6428c4cca1
No known key found for this signature in database
GPG key ID: 18089E4E3CCF1D3A

View file

@ -20,7 +20,7 @@ case "$1" in
;;
esac
height=${2:-$(($(tput lines) - 5))}
height=${2:-$(($(stty size | awk '{print $1}') - 5))}
echo "Using height $height"
url=$(curl -fsSL "$imgurl" | jq -r ".url")