public static function getWindowSize ( ) {
        $terminal = exec('echo $TERM_PROGRAM');
        if ( $terminal === 'Apple_Terminal' ) {
            $windowWidth = exec('tput cols');
            $windowHeight = exec('tput lines');
        }
        $windowWidth = ( $windowWidth > 0 ) ? $windowWidth : self::DEFAULT_WINDOW_WIDTH;
        $windowHeight = ( $windowHeight > 0 ) ? $windowHeight : self::DEFAULT_WINDOW_HEIGHT;
        return array($windowWidth, $windowHeight);
    }