refactor "dumb" terminal determination