Skip to content

Instantly share code, notes, and snippets.

@DazWorrall
Last active June 26, 2019 13:10
Show Gist options
  • Save DazWorrall/a83d9fb49ebd0dd0bd7a8291891585c5 to your computer and use it in GitHub Desktop.
Save DazWorrall/a83d9fb49ebd0dd0bd7a8291891585c5 to your computer and use it in GitHub Desktop.
Figuring out kitty stack layout with borders
def main(args):
pass
def enable_borders(tab):
tm = tab.tab_manager_ref()
if tm is None:
return
w = tab.active_window
tab.borders(
[w], w, tab.current_layout, tm.blank_rects, True
)
def handle_result(args, answer, target_window_id, boss):
tab = boss.active_tab
if tab is not None:
if tab.current_layout.name == 'stack':
tab.last_used_layout()
tab.enabled_layouts.remove('stack')
else:
tab.enabled_layouts.append('stack')
tab.goto_layout('stack')
enable_borders(tab)
handle_result.no_ui = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment