def convert_xrandr_to_index(xrandr_val: float):

    """
    :param xrandr_val: usually comes from the
    config value directly, as a string (it's
    just the nature of directly retrieving
    information from a .ini file)
    :return: an index representation
    of the current brightness level, useful
    for switch functions (where we switch
    based on indexes and not string values)
    Example: 0.2 is converted to 1
    """

    return int(xrandr_val * 10 - 1)