2021-09-26 21:05:58 +00:00
|
|
|
#!/bin/bash
|
2021-09-25 22:40:55 +00:00
|
|
|
|
|
|
|
# Screen prepare
|
|
|
|
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 ))
|
|
|
|
c=$(( columns / 2 ))
|
|
|
|
# Unless the screen is tiny
|
|
|
|
r=$(( r < 20 ? 20 : r ))
|
|
|
|
c=$(( c < 70 ? 70 : c ))
|
|
|
|
|
|
|
|
if [ -f ./functions.sh ]; then
|
|
|
|
. ./functions.sh
|
|
|
|
else
|
|
|
|
echo "functions.sh does not exists"
|
|
|
|
exit 1
|
2021-09-26 21:05:58 +00:00
|
|
|
fi
|
|
|
|
echo "yes"
|