Skip to content

Commit 0e625d4

Browse files
committed
kitty: add basic modal bindings
1 parent d90cb2d commit 0e625d4

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

apps/shell/kitty.nix

+25
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,31 @@
4545

4646
};
4747

48+
# Modal bindings for managing tabs
49+
hm.programs.kitty.extraConfig =
50+
/* bash */
51+
''
52+
map --new-mode mt ctrl+k --on-unknown end
53+
54+
map --mode mt t combine : new_tab : pop_keyboard_mode
55+
map --mode mt d combine : close_window : pop_keyboard_mode
56+
57+
map --mode mt h previous_tab
58+
map --mode mt l next_tab
59+
map --mode mt shift+h move_tab_backward
60+
map --mode mt shift+l move_tab_forward
61+
62+
map --mode mt k scroll_line_up
63+
map --mode mt j scroll_line_down
64+
map --mode mt shift+k scroll_to_prompt -1
65+
map --mode mt shift+j scroll_to_prompt 1
66+
67+
# Exit mode
68+
map --mode mt i pop_keyboard_mode
69+
map --mode mt esc pop_keyboard_mode
70+
71+
'';
72+
4873
# Open terminal with Super+T
4974
hm.dconf.settings."org/gnome/settings-daemon/plugins/media-keys".custom-keybindings =
5075
[

0 commit comments

Comments
 (0)