Blueno_Termux/myTermux/.scripts/library/screen.sh
2022-04-01 08:36:29 -04:00

26 lines
513 B
Bash
Executable File

#!/usr/bin/env bash
function screenSize() {
COLS=$(echo $COLUMNS)
ROWS=$(echo $LINES)
if [[ -n ${COLS} && -n ${ROWS} ]]; then
if (( ${COLS} >= 101 & ${ROWS} >= 39 )); then
${1}
else
echo -e "[ ${COLOR_WARNING}ERROR${COLOR_BASED} ] > Please ${COLOR_WARNING}zoom out${COLOR_BASED} your Terminal Screen!"
fi
else
echo -e "[ ${COLOR_DANGER}ERROR${COLOR_BASED} ] > Please run '${COLOR_WARNING}export COLUMNS LINES${COLOR_BASED}' first and then run again!"
fi
}