def blockify_separator(): block = StatusBlock('separator') block.set_full_text(' ') block.set_separator(False, 0) return block
] filter(partial(is_not, None), blocks) custom_bg_blocks = [] idx = 1 while idx < len(blocks): if blocks[idx] != None : if blocks[idx].get_background() != colors['bg']: custom_bg_blocks.append(idx) idx += 1 i = 0 for idx in custom_bg_blocks: before = StatusBlock('before_separator') before.set_full_text('') before.set_color(blocks[idx + i].get_background()) before.set_separator(False, 0) blocks.insert(idx+i, before) after = StatusBlock('after_separator') after.set_full_text('') after.set_background(blocks[idx+1+i].get_background()) after.set_color(colors['bg']) after.set_separator(False, 10) blocks.insert(idx+2+i, after) i += 2 json = ",".join(block.to_json() for block in blocks if block)
def blockify_separator(): block = StatusBlock('separator') block.set_full_text(' ') block.set_color(colors['yellow']) block.set_separator(False, 0) return block.to_json()
def blockify_separator(): block = StatusBlock('separator') block.set_full_text('\uE0B3') block.set_color(colors['blue']) block.set_background(colors['lime']) block.set_separator(False, 0) block.set_min_width(25, "center") return block.to_json()
def blockify_initiator(): block = StatusBlock('separator') block.set_full_text('\uE0B2') block.set_color(colors['lime']) block.set_separator(False, -1) return block.to_json()