#!/bin/sh
#author:furtherchan
#set -x
draw()
{
tput clear
P=`pwd`
#L=`tput lines`
#C=`tput cols`
STRING_A='top-left'
STRING_B='top-right'
STRING_C='bottom-left'
STRING_D='bottom-right'
LEN_P=`expr length $P / 2`
LEN_A=`expr length $STRING_A`
LEN_B=`expr length $STRING_B`
LEN_C=`expr length $STRING_C`
LEN_D=`expr length $STRING_D`
tput cup 0 0
echo -n "$STRING_A"
tput cup 0 `expr $C - $LEN_B`
echo -n "$STRING_B"
tput cup $L 0
echo -n "$STRING_C"
tput cup $L `expr $C - $LEN_D`
echo -n "$STRING_D"
tput cup `expr $L / 2` `expr $C / 2 - $LEN_P`
#read i
}
L=`tput lines`
C=`tput cols`
draw
while true
do
if [ $L = `tput lines` -a $C = `tput cols` ]
then
continue
else
unset L
unset C
L=`tput lines`
C=`tput cols`
draw
sleep 0.3
fi
done