get rows and cols in a tty