mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-04 20:13:17 +00:00
Even with no detected screen size, it should presume 80x24
This commit is contained in:
parent
e099603ca8
commit
3bcc93d921
1 changed files with 4 additions and 3 deletions
|
@ -32,9 +32,10 @@ useUpdateVars=false
|
|||
IPv4_address=""
|
||||
IPv6_address=""
|
||||
|
||||
# Find the rows and columns
|
||||
rows=$(stty size | awk '{print $1}')
|
||||
columns=$(stty size | awk '{print $2}')
|
||||
# Find the rows and columns will default to 80x24 is it can not be detected
|
||||
screen_size=$(stty size 2>/dev/null || echo 24 80)
|
||||
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.
|
||||
r=$(( rows / 2 ))
|
||||
|
|
Loading…
Reference in a new issue