def simple_render() -> Do: layout = yield TS.inspect(_.layout) yield render(P=SimplePane, L=SimpleLayout)(StrIdent('main'), StrIdent('main'), layout).transform_s_lens(lens.views)
def pane_by_id(id: str) -> TS[Views, Either[str, Pane]]: return TS.inspect(__.panes.find(__.id.contains(id)).to_either(lambda: f'no tmux pane for `{id}`'))