rework keybinds

This commit is contained in:
♥ Minnie ♥ 2024-02-06 20:18:20 +08:00
parent fa9d8884ff
commit e414c536da

View file

@ -87,29 +87,16 @@ config.colors = {
--| Key Assignments --| Key Assignments
config.disable_default_key_bindings = true config.disable_default_key_bindings = true
config.keys = {}
for i = 1, 8 do
--| CTRL+ALT + number to activate tab
table.insert(config.keys, {
key = tostring(i),
mods = 'CTRL|ALT',
action = act.ActivateTab(i - 1),
})
end
config.keys = { config.keys = {
--| Spawn Tab --| Spawn Tab
{ key = 'n', mods = 'ALT', action = act.SpawnTab 'CurrentPaneDomain', }, { key = 't', mods = 'ALT', action = act.SpawnTab 'CurrentPaneDomain', },
--| Tab Navigation --| Tab Navigation
{ key = 'LeftArrow', mods = 'ALT', action = act.ActivateTabRelative(-1) }, { key = 'LeftArrow', mods = 'ALT', action = act.ActivateTabRelative(-1) },
{ key = 'RightArrow', mods = 'ALT', action = act.ActivateTabRelative(1) }, { key = 'RightArrow', mods = 'ALT', action = act.ActivateTabRelative(1) },
--| Close Tab
{ key = 'w', mods = 'ALT|CTRL', action = act.CloseCurrentTab { confirm = false }, },
--| Split Panes --| Split Panes
{ key = 'v', mods = 'ALT', action = act.SplitVertical { domain = 'CurrentPaneDomain' }, }, { key = 'v', mods = 'ALT', action = act.SplitVertical { domain = 'CurrentPaneDomain' }, },
{ key = 'h', mods = 'ALT', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' }, }, { key = 's', mods = 'ALT', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' }, },
--| Adjust Pane Size --| Adjust Pane Size
{ key = 'PageDown', mods = 'ALT', action = act.AdjustPaneSize { 'Down', 5 } }, { key = 'PageDown', mods = 'ALT', action = act.AdjustPaneSize { 'Down', 5 } },
{ key = 'PageUp', mods = 'ALT', action = act.AdjustPaneSize { 'Up', 5 } }, { key = 'PageUp', mods = 'ALT', action = act.AdjustPaneSize { 'Up', 5 } },
@ -117,7 +104,7 @@ config.keys = {
{ key = 'DownArrow', mods = 'ALT', action = act.ActivatePaneDirection 'Next', }, { key = 'DownArrow', mods = 'ALT', action = act.ActivatePaneDirection 'Next', },
{ key = 'UpArrow', mods = 'ALT', action = act.ActivatePaneDirection 'Prev', }, { key = 'UpArrow', mods = 'ALT', action = act.ActivatePaneDirection 'Prev', },
--| Close Pane --| Close Pane
{ key = 'x', mods = "ALT", action = act.CloseCurrentPane { confirm = false }, }, { key = 'w', mods = "ALT|CTRL", action = act.CloseCurrentPane { confirm = false }, },
--| Copy Mode / Clipboard --| Copy Mode / Clipboard
{ key = 'X', mods = 'CTRL', action = act.ActivateCopyMode, }, { key = 'X', mods = 'CTRL', action = act.ActivateCopyMode, },