Add some missed actions

This commit is contained in:
Kovid Goyal 2021-07-02 21:43:18 +05:30
parent 7a8fb8f430
commit c6938c9039
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 10 additions and 0 deletions

View File

@ -57,6 +57,12 @@ def get_all_actions() -> Dict[str, List[Action]]:
if ac.name not in seen: if ac.name not in seen:
ans.setdefault(ac.group, []).append(ac) ans.setdefault(ac.group, []).append(ac)
seen.add(ac.name) 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 return ans

View File

@ -332,6 +332,7 @@ class Boss:
return self.add_os_window(startup_session) return self.add_os_window(startup_session)
def new_os_window(self, *args: str) -> None: def new_os_window(self, *args: str) -> None:
'@ac:win: New OS Window'
self._new_os_window(args) self._new_os_window(args)
@property @property
@ -499,6 +500,7 @@ class Boss:
self.child_monitor.mark_for_close(window.id) self.child_monitor.mark_for_close(window.id)
def close_tab(self, tab: Optional[Tab] = None) -> None: def close_tab(self, tab: Optional[Tab] = None) -> None:
'@ac:tab: Close the current tab'
tab = tab or self.active_tab tab = tab or self.active_tab
if tab: if tab:
self.confirm_tab_close(tab) self.confirm_tab_close(tab)
@ -1901,6 +1903,7 @@ class Boss:
tab.remove_window(w) tab.remove_window(w)
def debug_config(self) -> None: def debug_config(self) -> None:
'@ac:misc: Show the effective configuration kitty is running with'
from .debug_config import debug_config from .debug_config import debug_config
w = self.active_window w = self.active_window
if w is not None: if w is not None:

View File

@ -301,6 +301,7 @@ class Tab: # {{{
self.relayout() self.relayout()
def layout_action(self, action_name: str, args: Sequence[str]) -> None: 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) ret = self.current_layout.layout_action(action_name, args, self.windows)
if ret is None: if ret is None:
ring_bell() ring_bell()