[file_previewer.sh]: Get terminal dimensions if not provided

Increase usability as standalone script, not just in lf
This commit is contained in:
2024-09-22 15:09:08 +01:00
parent 9455c36cb3
commit b0cb21449f

View File

@ -4,8 +4,8 @@
preview_image="/tmp/lf_preview_image.png"
file=$1
width=$2
height=$3
width="${2:-$(tput cols)}"
height="${3:-$(tput lines)}"
x=$4
y=$5