From 6a4668974b118e0b76792f58b38a5f94760c3b4b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 1 Jul 2021 17:38:26 +0530 Subject: [PATCH] Forgot to mark layout actions --- kitty/actions.py | 1 + kitty/tabs.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/kitty/actions.py b/kitty/actions.py index a6b788187..6b1afb780 100644 --- a/kitty/actions.py +++ b/kitty/actions.py @@ -25,6 +25,7 @@ groups = { 'tab': 'Tab management', 'mouse': 'Mouse actions', 'mk': 'Marks', + 'lay': 'Layouts', 'misc': 'Miscellaneous', } group_title = groups.__getitem__ diff --git a/kitty/tabs.py b/kitty/tabs.py index ab5adc549..a992af4bb 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -223,6 +223,7 @@ class Tab: # {{{ return create_layout_object_for(name, self.os_window_id, self.id) def next_layout(self) -> None: + '@ac:lay: Go to the next enabled layout' if len(self.enabled_layouts) > 1: for i, layout_name in enumerate(self.enabled_layouts): if layout_name == self.current_layout.full_name: @@ -235,11 +236,19 @@ class Tab: # {{{ self.relayout() def last_used_layout(self) -> None: + '@ac:lay: Go to the previously used layout' if len(self.enabled_layouts) > 1 and self._last_used_layout and self._last_used_layout != self._current_layout_name: self._set_current_layout(self._last_used_layout) self.relayout() def goto_layout(self, layout_name: str, raise_exception: bool = False) -> None: + ''' + @ac:lay: Switch to the named layout + + For example:: + + map f1 goto_layout tall + ''' layout_name = layout_name.lower() if layout_name not in self.enabled_layouts: if raise_exception: