Skip to content

Commit

Permalink
Merge pull request #208 from mochouaaaaa/master
Browse files Browse the repository at this point in the history
feat(mux): Use tmux inside kitty and compatible with window shortcuts
  • Loading branch information
mrjones2014 authored Jun 5, 2024
2 parents f5df5b6 + aa657c1 commit 66fda3a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
5 changes: 2 additions & 3 deletions kitty/neighboring_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ def handle_result(args, result, target_window_id, boss):
keymap = args[2]

cmd = window.child.foreground_cmdline[0]
if cmd == 'nvim':
if cmd == 'tmux':
keymap = args[2]
encoded = encode_key_mapping(window, keymap)
window.write_to_child(encoded)
elif cmd == 'tmux':
pass
else:
boss.active_tab.neighboring_window(args[1])
7 changes: 2 additions & 5 deletions kitty/relative_resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,10 @@ def handle_result(args, result, target_window_id, boss):
amount = int(args[2])
window = boss.window_id_map.get(target_window_id)

keymap = args[3]

cmd = window.child.foreground_cmdline[0]
if cmd == 'nvim':
if cmd == 'tmux':
keymap = args[3]
encoded = encode_key_mapping(window, keymap)
window.write_to_child(encoded)
elif cmd == 'tmux':
pass
else:
relative_resize_window(direction, amount, target_window_id, boss)
8 changes: 7 additions & 1 deletion kitty/split_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@ def handle_result(args, result, target_window_id, boss):
return

direction = args[1]
split_window(boss, direction)
cmd = window.child.foreground_cmdline[0]
if cmd == 'tmux':
keymap = args[2]
encoded = encode_key_mapping(window, keymap)
window.write_to_child(encoded)
else:
split_window(boss, direction)

0 comments on commit 66fda3a

Please sign in to comment.