Skip to content

Commit 66fda3a

Browse files
authored
Merge pull request #208 from mochouaaaaa/master
feat(mux): Use tmux inside kitty and compatible with window shortcuts
2 parents f5df5b6 + aa657c1 commit 66fda3a

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

kitty/neighboring_window.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ def handle_result(args, result, target_window_id, boss):
2929
keymap = args[2]
3030

3131
cmd = window.child.foreground_cmdline[0]
32-
if cmd == 'nvim':
32+
if cmd == 'tmux':
33+
keymap = args[2]
3334
encoded = encode_key_mapping(window, keymap)
3435
window.write_to_child(encoded)
35-
elif cmd == 'tmux':
36-
pass
3736
else:
3837
boss.active_tab.neighboring_window(args[1])

kitty/relative_resize.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,10 @@ def handle_result(args, result, target_window_id, boss):
8585
amount = int(args[2])
8686
window = boss.window_id_map.get(target_window_id)
8787

88-
keymap = args[3]
89-
9088
cmd = window.child.foreground_cmdline[0]
91-
if cmd == 'nvim':
89+
if cmd == 'tmux':
90+
keymap = args[3]
9291
encoded = encode_key_mapping(window, keymap)
9392
window.write_to_child(encoded)
94-
elif cmd == 'tmux':
95-
pass
9693
else:
9794
relative_resize_window(direction, amount, target_window_id, boss)

kitty/split_window.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,10 @@ def handle_result(args, result, target_window_id, boss):
2323
return
2424

2525
direction = args[1]
26-
split_window(boss, direction)
26+
cmd = window.child.foreground_cmdline[0]
27+
if cmd == 'tmux':
28+
keymap = args[2]
29+
encoded = encode_key_mapping(window, keymap)
30+
window.write_to_child(encoded)
31+
else:
32+
split_window(boss, direction)

0 commit comments

Comments
 (0)