def window_maker(list_name, filled_list, window_size, slide_size):
    """Make a bed file of sliding windows."""
    for scaffold, start, end in filled_list:
        width = window_size
        step = slide_size

        if width <= end:
            list_name.append((scaffold, start, width))
        else:
            list_name.append((scaffold, start, end))

        while width <= end:
            start += step
            width += step
            if width >= end:
                list_name.append((scaffold, start, end))
            else:
                list_name.append((scaffold, start, width))
    return list_name