Get rows/cols with stty instead of tput

This commit is contained in:
Kaladin Light 2016-11-07 22:49:00 -05:00
parent 6858805d9f
commit 7c64afdc92
2 changed files with 4 additions and 4 deletions

View file

@ -18,8 +18,8 @@ pivpnFilesDir="/etc/.pivpn"
# Find the rows and columns
rows=$(tput lines)
columns=$(tput cols)
rows=$(stty size | awk '{print $1}')
columns=$(stty size | awk '{print $2}')
# Divide by two so the dialogs take up half of the screen, which looks nice.
r=$(( rows / 2 ))

View file

@ -23,8 +23,8 @@ PORT=$(cat /etc/pivpn/INSTALL_PORT)
PROTO=$(cat /etc/pivpn/INSTALL_PROTO)
# Find the rows and columns
rows=$(tput lines)
columns=$(tput cols)
rows=$(stty size | awk '{print $1}')
columns=$(stty size | awk '{print $2}')
# Divide by two so the dialogs take up half of the screen, which looks nice.
r=$(( rows / 2 ))