def get_terminal_columns():
    """Determine the amount of available columns in the terminal

    Returns
    -------
    int
        Terminal width
    """
    terminal_size = get_terminal_size()

    # If column size is 0 either we are not connected
    # to a terminal or something else went wrong. Fallback to 80.
    if terminal_size.columns == 0:
        return 80
    else:
        return terminal_size.columns
Determine the amount of available columns in the terminal

    Returns
    -------
    int
        Terminal width
    
halo/_utils.py