1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-23 07:18:07 +00:00

Even with no detected screen size, it should presume 80x24

This commit is contained in:
Eric Warnke 2016-10-26 10:08:23 -04:00
parent fc776921d5
commit ac8d24a1ce

View File

@ -32,9 +32,10 @@ useUpdateVars=false
IPv4_address="" IPv4_address=""
IPv6_address="" IPv6_address=""
# Find the rows and columns # Find the rows and columns will default to 80x24 is it can not be detected
rows=$(stty size | awk '{print $1}') screen_size=$(stty size 2>/dev/null || echo 24 80)
columns=$(stty size | awk '{print $2}') rows=$(echo $screen_size | awk '{print $1}')
columns=$(echo $screen_size | awk '{print $2}')
# Divide by two so the dialogs take up half of the screen, which looks nice. # Divide by two so the dialogs take up half of the screen, which looks nice.
r=$(( rows / 2 )) r=$(( rows / 2 ))