def bool_from_user_str(bool_string):
    """Parse a string description of a hlwm boolean to
    a python boolean"""
    if bool_string.lower() in ['true', 'on']:
        return True
    if bool_string.lower() in ['false', 'off']:
        return False
    raise Exception(f'"{bool_string}" is not a boolean')