protected function getDimensionsFromTput() : ?array
    {
        if (empty($output = $this->execute('tput cols && tput lines'))) {
            return null;
        }

        // tput will have returned the values on separate lines, so let's just explode.
        $output = explode("\n", $output);

        return [
            'width' => (int) $output[0],
            'height'=> (int) $output[1]
        ];
    }