def create_lookup_table(windows):
    """Create a lookup table from the given list of windows.

    The returned dict is in the format window title → X window id.
    """
    lookup = {}
    for window in windows:
        name = window.get('name')
        id_ = window.get('window')
        if id_ is None:
            continue
        if name.startswith('i3bar for output'):
            continue
        lookup[name] = id_
    return lookup
