From c6938c90390b123c57f0080ba8cbee990ad706b7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 2 Jul 2021 21:43:18 +0530 Subject: [PATCH] Add some missed actions --- kitty/actions.py | 6 ++++++ kitty/boss.py | 3 +++ kitty/tabs.py | 1 + 3 files changed, 10 insertions(+) diff --git a/kitty/actions.py b/kitty/actions.py index 6b1afb780..70289e1ba 100644 --- a/kitty/actions.py +++ b/kitty/actions.py @@ -57,6 +57,12 @@ def get_all_actions() -> Dict[str, List[Action]]: if ac.name not in seen: ans.setdefault(ac.group, []).append(ac) seen.add(ac.name) + for i, which in enumerate('first second third fourth fifth sixth seventh eighth ninth tenth'.split()): + name = f'{which}_window' + if name not in seen: + seen.add(name) + ans['win'].append(Action(name, 'win', f'Focus the {which} window', '')) + return ans diff --git a/kitty/boss.py b/kitty/boss.py index 0880efc38..d0987df21 100755 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -332,6 +332,7 @@ class Boss: return self.add_os_window(startup_session) def new_os_window(self, *args: str) -> None: + '@ac:win: New OS Window' self._new_os_window(args) @property @@ -499,6 +500,7 @@ class Boss: self.child_monitor.mark_for_close(window.id) def close_tab(self, tab: Optional[Tab] = None) -> None: + '@ac:tab: Close the current tab' tab = tab or self.active_tab if tab: self.confirm_tab_close(tab) @@ -1901,6 +1903,7 @@ class Boss: tab.remove_window(w) def debug_config(self) -> None: + '@ac:misc: Show the effective configuration kitty is running with' from .debug_config import debug_config w = self.active_window if w is not None: diff --git a/kitty/tabs.py b/kitty/tabs.py index 0026bcd70..4a09b09f3 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -301,6 +301,7 @@ class Tab: # {{{ self.relayout() def layout_action(self, action_name: str, args: Sequence[str]) -> None: + '@ac:lay: Perform a layout specific action. See :doc:`layouts` for details' ret = self.current_layout.layout_action(action_name, args, self.windows) if ret is None: ring_bell()