use ioctl:TIOCGWINSZ for getting window size