From c8016a3181d182a01b68c11d0810fd542bb754b3 Mon Sep 17 00:00:00 2001 From: Blallo Date: Fri, 30 Jul 2021 09:37:48 +0200 Subject: [PATCH] Toggle zoom --- kitty.conf | 1 + zoom_toggle.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 zoom_toggle.py diff --git a/kitty.conf b/kitty.conf index 0711633..b1925d4 100644 --- a/kitty.conf +++ b/kitty.conf @@ -26,6 +26,7 @@ scrollback_pager bat map ctrl+tab previous_window map ctrl+shift+tab next_window +map ctrl+shift+z kitten zoom_toggle.py # remote control allow_remote_control yes diff --git a/zoom_toggle.py b/zoom_toggle.py new file mode 100644 index 0000000..425dcdd --- /dev/null +++ b/zoom_toggle.py @@ -0,0 +1,17 @@ +#! encoding: utf-8 + + +def main(args): + pass + + +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() + else: + tab.goto_layout("stack") + + +handle_result.no_ui = True