def generate_screen_id(screen):
    """generates a unique identifier for a screen

    Args:
        screen (QScreen):
            screen to be analysed

    Returns:
        str:
            unique ID describing the given screen
    """
    if screen.serialNumber():
        return screen.serialNumber()

    return f"screen-{screen.name()}-{int(screen.physicalDotsPerInch())}dpi"