From 0c0b8f71bd248f9bb8ab70b1307ade021efd631d Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Mon, 4 Jan 2021 20:46:28 -0600 Subject: [PATCH] If height argument isn't a number, automatically choose size --- pkgroot/usr/bin/nekofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgroot/usr/bin/nekofetch b/pkgroot/usr/bin/nekofetch index 4b8bff3..60f4645 100755 --- a/pkgroot/usr/bin/nekofetch +++ b/pkgroot/usr/bin/nekofetch @@ -24,7 +24,7 @@ case "$1" in ;; esac -height=${2:-$(($(stty size | awk '{print $1}') - 5))} +echo "$2" | grep -qE '^[0-9]+$' && height="$2" || height="$(($(stty size | awk '{print $1}') - 5))" echo "Using height $height" url=$(curl -fsSL "$imgurl" | jq -r ".url")