Split code related to the detecting of window console size