This commit is contained in:
Kovid Goyal 2021-10-14 12:19:40 +05:30
parent d417aedde0
commit 3a247be758
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 2 deletions

View File

@ -815,13 +815,14 @@ class Boss:
return
pending_sequences: SubSequenceMap = {}
count = 0
fmap = get_name_to_functional_number_map()
for idx, window in tab.windows.iter_windows_with_number(only_visible=True):
count += 1
window.screen.set_window_number(idx + 1)
ac = KeyAction('focus_visible_window_trigger', (idx,))
for mods in (0, GLFW_MOD_CONTROL, GLFW_MOD_CONTROL | GLFW_MOD_SHIFT, GLFW_MOD_SUPER, GLFW_MOD_ALT, GLFW_MOD_SHIFT):
pending_sequences[(SingleKey(mods=mods, key=ord(str(idx + 1))),)] = ac
pending_sequences[(SingleKey(mods=mods, key=get_name_to_functional_number_map()[f'KP_{idx+1}']),)] = ac
pending_sequences[(SingleKey(mods=mods, key=fmap[f'KP_{idx+1}']),)] = ac
if count > 1:
self.set_pending_sequences(pending_sequences, default_pending_action=KeyAction('focus_visible_window_trigger'))
else:

View File

@ -171,7 +171,8 @@ def real_main(global_opts: RCOptions) -> None:
if awid is not None:
print('The ID of the previously active window is: {}'.format(awid))
pre_prompt = '\x1b]133;A\x1b\\' + set_window_title('The kitty shell') + set_cursor_shape('bar')
pre_prompt = set_window_title('The kitty shell') + set_cursor_shape('bar')
pre_prompt += '\x1b]133;A\x1b\\'
while True:
try:
try: