Remove navigation keymaps, format

This commit is contained in:
Evie Litherland-Smith 2023-02-14 09:47:49 +00:00
parent c13195cb26
commit 3ee946324a

View file

@ -1,240 +1,258 @@
local wezterm = require('wezterm') local wezterm = require("wezterm")
local act = wezterm.action local act = wezterm.action
wezterm.on('update-right-status', function(window, pane) wezterm.on("update-right-status", function(window, pane)
local name = window:active_key_table() local name = window:active_key_table()
if name then if name then
name = 'TABLE: ' .. name name = "TABLE: " .. name
end end
window:set_right_status(name or '') window:set_right_status(name or "")
end) end)
local function isViProcess(pane) local function isViProcess(pane)
-- get_foreground_process_name On Linux, macOS and Windows, -- get_foreground_process_name On Linux, macOS and Windows,
-- the process can be queried to determine this path. Other operating systems -- the process can be queried to determine this path. Other operating systems
-- (notably, FreeBSD and other unix systems) are not currently supported -- (notably, FreeBSD and other unix systems) are not currently supported
return pane:get_foreground_process_name():find('n?vim') ~= nil return pane:get_foreground_process_name():find("n?vim") ~= nil
-- return pane:get_title():find("n?vim") ~= nil -- return pane:get_title():find("n?vim") ~= nil
end end
local function conditionalActivatePane(window, pane, pane_direction, vim_direction) local function conditionalActivatePane(window, pane, pane_direction, vim_direction)
if isViProcess(pane) then if isViProcess(pane) then
window:perform_action( window:perform_action(
-- This should match the keybinds you set in Neovim. -- This should match the keybinds you set in Neovim.
act.SendKey({ key = vim_direction, mods = 'ALT' }), act.SendKey({ key = vim_direction, mods = "ALT" }),
pane pane
) )
else else
window:perform_action(act.ActivatePaneDirection(pane_direction), pane) window:perform_action(act.ActivatePaneDirection(pane_direction), pane)
end end
end end
wezterm.on('ActivatePaneDirection-right', function(window, pane) wezterm.on("ActivatePaneDirection-right", function(window, pane)
conditionalActivatePane(window, pane, 'Right', 'l') conditionalActivatePane(window, pane, "Right", "l")
end) end)
wezterm.on('ActivatePaneDirection-left', function(window, pane) wezterm.on("ActivatePaneDirection-left", function(window, pane)
conditionalActivatePane(window, pane, 'Left', 'h') conditionalActivatePane(window, pane, "Left", "h")
end) end)
wezterm.on('ActivatePaneDirection-up', function(window, pane) wezterm.on("ActivatePaneDirection-up", function(window, pane)
conditionalActivatePane(window, pane, 'Up', 'k') conditionalActivatePane(window, pane, "Up", "k")
end) end)
wezterm.on('ActivatePaneDirection-down', function(window, pane) wezterm.on("ActivatePaneDirection-down", function(window, pane)
conditionalActivatePane(window, pane, 'Down', 'j') conditionalActivatePane(window, pane, "Down", "j")
end) end)
local keys = { local keys = {
{ key = 'h', mods = 'ALT', action = act.EmitEvent('ActivatePaneDirection-left') }, { key = "Tab", mods = "CTRL", action = act.ActivateTabRelative(1) },
{ key = 'j', mods = 'ALT', action = act.EmitEvent('ActivatePaneDirection-down') }, { key = "Tab", mods = "SHIFT|CTRL", action = act.ActivateTabRelative(-1) },
{ key = 'k', mods = 'ALT', action = act.EmitEvent('ActivatePaneDirection-up') }, { key = "Enter", mods = "SUPER", action = act.ToggleFullScreen },
{ key = 'l', mods = 'ALT', action = act.EmitEvent('ActivatePaneDirection-right') }, { key = ")", mods = "CTRL", action = act.ResetFontSize },
{ key = 'Tab', mods = 'CTRL', action = act.ActivateTabRelative(1) }, { key = ")", mods = "SHIFT|CTRL", action = act.ResetFontSize },
{ key = 'Tab', mods = 'SHIFT|CTRL', action = act.ActivateTabRelative(-1) }, { key = "0", mods = "CTRL", action = act.ResetFontSize },
{ key = 'Enter', mods = 'SUPER', action = act.ToggleFullScreen }, { key = "0", mods = "SHIFT|CTRL", action = act.ResetFontSize },
{ key = '1', mods = 'ALT', action = act.ActivateTab(0) }, { key = "+", mods = "CTRL", action = act.IncreaseFontSize },
{ key = '2', mods = 'ALT', action = act.ActivateTab(1) }, { key = "+", mods = "SHIFT|CTRL", action = act.IncreaseFontSize },
{ key = '3', mods = 'ALT', action = act.ActivateTab(2) }, { key = "-", mods = "CTRL", action = act.DecreaseFontSize },
{ key = '4', mods = 'ALT', action = act.ActivateTab(3) }, { key = "-", mods = "SHIFT|CTRL", action = act.DecreaseFontSize },
{ key = '5', mods = 'ALT', action = act.ActivateTab(4) }, { key = "=", mods = "CTRL", action = act.IncreaseFontSize },
{ key = '6', mods = 'ALT', action = act.ActivateTab(5) }, { key = "=", mods = "SHIFT|CTRL", action = act.IncreaseFontSize },
{ key = '7', mods = 'ALT', action = act.ActivateTab(6) }, { key = "C", mods = "CTRL", action = act.CopyTo("Clipboard") },
{ key = '8', mods = 'ALT', action = act.ActivateTab(7) }, { key = "C", mods = "SHIFT|CTRL", action = act.CopyTo("Clipboard") },
{ key = '9', mods = 'ALT', action = act.ActivateTab(8) }, { key = "F", mods = "CTRL", action = act.Search("CurrentSelectionOrEmptyString") },
{ key = '0', mods = 'ALT', action = act.ActivateTab(-1) }, { key = "F", mods = "SHIFT|CTRL", action = act.Search("CurrentSelectionOrEmptyString") },
{ key = 'Enter', mods = 'ALT', action = act.SplitVertical{ domain = 'CurrentPaneDomain' } }, { key = "K", mods = "CTRL", action = act.ClearScrollback("ScrollbackOnly") },
{ key = 'Enter', mods = 'SHIFT|ALT', action = act.SplitHorizontal{ domain = 'CurrentPaneDomain' } }, { key = "K", mods = "SHIFT|CTRL", action = act.ClearScrollback("ScrollbackOnly") },
{ key = ')', mods = 'CTRL', action = act.ResetFontSize }, { key = "L", mods = "CTRL", action = act.ShowDebugOverlay },
{ key = ')', mods = 'SHIFT|CTRL', action = act.ResetFontSize }, { key = "L", mods = "SHIFT|CTRL", action = act.ShowDebugOverlay },
{ key = '0', mods = 'CTRL', action = act.ResetFontSize }, { key = "M", mods = "CTRL", action = act.Hide },
{ key = '0', mods = 'SHIFT|CTRL', action = act.ResetFontSize }, { key = "M", mods = "SHIFT|CTRL", action = act.Hide },
{ key = '+', mods = 'CTRL', action = act.IncreaseFontSize }, { key = "N", mods = "CTRL", action = act.SpawnWindow },
{ key = '+', mods = 'SHIFT|CTRL', action = act.IncreaseFontSize }, { key = "N", mods = "SHIFT|CTRL", action = act.SpawnWindow },
{ key = '-', mods = 'CTRL', action = act.DecreaseFontSize }, { key = "P", mods = "CTRL", action = act.PaneSelect({ alphabet = "", mode = "Activate" }) },
{ key = '-', mods = 'SHIFT|CTRL', action = act.DecreaseFontSize }, { key = "P", mods = "SHIFT|CTRL", action = act.PaneSelect({ alphabet = "", mode = "Activate" }) },
{ key = '=', mods = 'CTRL', action = act.IncreaseFontSize }, { key = "R", mods = "CTRL", action = act.ReloadConfiguration },
{ key = '=', mods = 'SHIFT|CTRL', action = act.IncreaseFontSize }, { key = "R", mods = "SHIFT|CTRL", action = act.ReloadConfiguration },
{ key = 'C', mods = 'CTRL', action = act.CopyTo 'Clipboard' }, { key = "T", mods = "CTRL", action = act.SpawnTab("CurrentPaneDomain") },
{ key = 'C', mods = 'SHIFT|CTRL', action = act.CopyTo 'Clipboard' }, { key = "T", mods = "SHIFT|CTRL", action = act.SpawnTab("CurrentPaneDomain") },
{ key = 'F', mods = 'CTRL', action = act.Search 'CurrentSelectionOrEmptyString' }, {
{ key = 'F', mods = 'SHIFT|CTRL', action = act.Search 'CurrentSelectionOrEmptyString' }, key = "U",
{ key = 'K', mods = 'CTRL', action = act.ClearScrollback 'ScrollbackOnly' }, mods = "CTRL",
{ key = 'K', mods = 'SHIFT|CTRL', action = act.ClearScrollback 'ScrollbackOnly' }, action = act.CharSelect({ copy_on_select = true, copy_to = "ClipboardAndPrimarySelection" }),
{ key = 'L', mods = 'CTRL', action = act.ShowDebugOverlay }, },
{ key = 'L', mods = 'SHIFT|CTRL', action = act.ShowDebugOverlay }, {
{ key = 'M', mods = 'CTRL', action = act.Hide }, key = "U",
{ key = 'M', mods = 'SHIFT|CTRL', action = act.Hide }, mods = "SHIFT|CTRL",
{ key = 'N', mods = 'CTRL', action = act.SpawnWindow }, action = act.CharSelect({ copy_on_select = true, copy_to = "ClipboardAndPrimarySelection" }),
{ key = 'N', mods = 'SHIFT|CTRL', action = act.SpawnWindow }, },
{ key = 'P', mods = 'CTRL', action = act.PaneSelect{ alphabet = '', mode = 'Activate' } }, { key = "V", mods = "CTRL", action = act.PasteFrom("Clipboard") },
{ key = 'P', mods = 'SHIFT|CTRL', action = act.PaneSelect{ alphabet = '', mode = 'Activate' } }, { key = "V", mods = "SHIFT|CTRL", action = act.PasteFrom("Clipboard") },
{ key = 'R', mods = 'CTRL', action = act.ReloadConfiguration }, { key = "W", mods = "CTRL", action = act.CloseCurrentTab({ confirm = true }) },
{ key = 'R', mods = 'SHIFT|CTRL', action = act.ReloadConfiguration }, { key = "W", mods = "SHIFT|CTRL", action = act.CloseCurrentTab({ confirm = true }) },
{ key = 'T', mods = 'CTRL', action = act.SpawnTab 'CurrentPaneDomain' }, { key = "X", mods = "CTRL", action = act.ActivateCopyMode },
{ key = 'T', mods = 'SHIFT|CTRL', action = act.SpawnTab 'CurrentPaneDomain' }, { key = "X", mods = "SHIFT|CTRL", action = act.ActivateCopyMode },
{ key = 'U', mods = 'CTRL', action = act.CharSelect{ copy_on_select = true, copy_to = 'ClipboardAndPrimarySelection' } }, { key = "Z", mods = "CTRL", action = act.TogglePaneZoomState },
{ key = 'U', mods = 'SHIFT|CTRL', action = act.CharSelect{ copy_on_select = true, copy_to = 'ClipboardAndPrimarySelection' } }, { key = "Z", mods = "SHIFT|CTRL", action = act.TogglePaneZoomState },
{ key = 'V', mods = 'CTRL', action = act.PasteFrom 'Clipboard' }, { key = "[", mods = "SHIFT|SUPER", action = act.ActivateTabRelative(-1) },
{ key = 'V', mods = 'SHIFT|CTRL', action = act.PasteFrom 'Clipboard' }, { key = "]", mods = "SHIFT|SUPER", action = act.ActivateTabRelative(1) },
{ key = 'W', mods = 'CTRL', action = act.CloseCurrentTab{ confirm = true } }, { key = "_", mods = "CTRL", action = act.DecreaseFontSize },
{ key = 'W', mods = 'SHIFT|CTRL', action = act.CloseCurrentTab{ confirm = true } }, { key = "_", mods = "SHIFT|CTRL", action = act.DecreaseFontSize },
{ key = 'X', mods = 'CTRL', action = act.ActivateCopyMode }, { key = "c", mods = "SHIFT|CTRL", action = act.CopyTo("Clipboard") },
{ key = 'X', mods = 'SHIFT|CTRL', action = act.ActivateCopyMode }, { key = "c", mods = "SUPER", action = act.CopyTo("Clipboard") },
{ key = 'Z', mods = 'CTRL', action = act.TogglePaneZoomState }, { key = "f", mods = "SHIFT|CTRL", action = act.Search("CurrentSelectionOrEmptyString") },
{ key = 'Z', mods = 'SHIFT|CTRL', action = act.TogglePaneZoomState }, { key = "f", mods = "SUPER", action = act.Search("CurrentSelectionOrEmptyString") },
{ key = '[', mods = 'SHIFT|SUPER', action = act.ActivateTabRelative(-1) }, { key = "k", mods = "SHIFT|CTRL", action = act.ClearScrollback("ScrollbackOnly") },
{ key = ']', mods = 'SHIFT|SUPER', action = act.ActivateTabRelative(1) }, { key = "k", mods = "SUPER", action = act.ClearScrollback("ScrollbackOnly") },
{ key = '_', mods = 'CTRL', action = act.DecreaseFontSize }, { key = "l", mods = "SHIFT|CTRL", action = act.ShowDebugOverlay },
{ key = '_', mods = 'SHIFT|CTRL', action = act.DecreaseFontSize }, { key = "m", mods = "SHIFT|CTRL", action = act.Hide },
{ key = 'c', mods = 'SHIFT|CTRL', action = act.CopyTo 'Clipboard' }, { key = "m", mods = "SUPER", action = act.Hide },
{ key = 'c', mods = 'SUPER', action = act.CopyTo 'Clipboard' }, { key = "n", mods = "SHIFT|CTRL", action = act.SpawnWindow },
{ key = 'f', mods = 'SHIFT|CTRL', action = act.Search 'CurrentSelectionOrEmptyString' }, { key = "n", mods = "SUPER", action = act.SpawnWindow },
{ key = 'f', mods = 'SUPER', action = act.Search 'CurrentSelectionOrEmptyString' }, { key = "p", mods = "SHIFT|CTRL", action = act.PaneSelect({ alphabet = "", mode = "Activate" }) },
{ key = 'k', mods = 'SHIFT|CTRL', action = act.ClearScrollback 'ScrollbackOnly' }, { key = "r", mods = "SHIFT|CTRL", action = act.ReloadConfiguration },
{ key = 'k', mods = 'SUPER', action = act.ClearScrollback 'ScrollbackOnly' }, { key = "r", mods = "SUPER", action = act.ReloadConfiguration },
{ key = 'l', mods = 'SHIFT|CTRL', action = act.ShowDebugOverlay }, { key = "t", mods = "SHIFT|CTRL", action = act.SpawnTab("CurrentPaneDomain") },
{ key = 'm', mods = 'SHIFT|CTRL', action = act.Hide }, { key = "t", mods = "SUPER", action = act.SpawnTab("CurrentPaneDomain") },
{ key = 'm', mods = 'SUPER', action = act.Hide }, {
{ key = 'n', mods = 'SHIFT|CTRL', action = act.SpawnWindow }, key = "u",
{ key = 'n', mods = 'SUPER', action = act.SpawnWindow }, mods = "SHIFT|CTRL",
{ key = 'p', mods = 'SHIFT|CTRL', action = act.PaneSelect{ alphabet = '', mode = 'Activate' } }, action = act.CharSelect({ copy_on_select = true, copy_to = "ClipboardAndPrimarySelection" }),
{ key = 'r', mods = 'SHIFT|CTRL', action = act.ReloadConfiguration }, },
{ key = 'r', mods = 'SUPER', action = act.ReloadConfiguration }, { key = "v", mods = "SHIFT|CTRL", action = act.PasteFrom("Clipboard") },
{ key = 't', mods = 'SHIFT|CTRL', action = act.SpawnTab 'CurrentPaneDomain' }, { key = "v", mods = "SUPER", action = act.PasteFrom("Clipboard") },
{ key = 't', mods = 'SUPER', action = act.SpawnTab 'CurrentPaneDomain' }, { key = "w", mods = "SHIFT|CTRL", action = act.CloseCurrentTab({ confirm = true }) },
{ key = 'u', mods = 'SHIFT|CTRL', action = act.CharSelect{ copy_on_select = true, copy_to = 'ClipboardAndPrimarySelection' } }, { key = "w", mods = "SUPER", action = act.CloseCurrentTab({ confirm = true }) },
{ key = 'v', mods = 'SHIFT|CTRL', action = act.PasteFrom 'Clipboard' }, { key = "x", mods = "SHIFT|CTRL", action = act.ActivateCopyMode },
{ key = 'v', mods = 'SUPER', action = act.PasteFrom 'Clipboard' }, { key = "z", mods = "SHIFT|CTRL", action = act.TogglePaneZoomState },
{ key = 'w', mods = 'SHIFT|CTRL', action = act.CloseCurrentTab{ confirm = true } }, { key = "{", mods = "SUPER", action = act.ActivateTabRelative(-1) },
{ key = 'w', mods = 'SUPER', action = act.CloseCurrentTab{ confirm = true } }, { key = "{", mods = "SHIFT|SUPER", action = act.ActivateTabRelative(-1) },
{ key = 'x', mods = 'SHIFT|CTRL', action = act.ActivateCopyMode }, { key = "}", mods = "SUPER", action = act.ActivateTabRelative(1) },
{ key = 'z', mods = 'SHIFT|CTRL', action = act.TogglePaneZoomState }, { key = "}", mods = "SHIFT|SUPER", action = act.ActivateTabRelative(1) },
{ key = '{', mods = 'SUPER', action = act.ActivateTabRelative(-1) }, { key = "phys:Space", mods = "SHIFT|CTRL", action = act.QuickSelect },
{ key = '{', mods = 'SHIFT|SUPER', action = act.ActivateTabRelative(-1) }, { key = "PageUp", mods = "SHIFT", action = act.ScrollByPage(-1) },
{ key = '}', mods = 'SUPER', action = act.ActivateTabRelative(1) }, { key = "PageUp", mods = "CTRL", action = act.ActivateTabRelative(-1) },
{ key = '}', mods = 'SHIFT|SUPER', action = act.ActivateTabRelative(1) }, { key = "PageUp", mods = "SHIFT|CTRL", action = act.MoveTabRelative(-1) },
{ key = 'phys:Space', mods = 'SHIFT|CTRL', action = act.QuickSelect }, { key = "PageDown", mods = "SHIFT", action = act.ScrollByPage(1) },
{ key = 'PageUp', mods = 'SHIFT', action = act.ScrollByPage(-1) }, { key = "PageDown", mods = "CTRL", action = act.ActivateTabRelative(1) },
{ key = 'PageUp', mods = 'CTRL', action = act.ActivateTabRelative(-1) }, { key = "PageDown", mods = "SHIFT|CTRL", action = act.MoveTabRelative(1) },
{ key = 'PageUp', mods = 'SHIFT|CTRL', action = act.MoveTabRelative(-1) }, { key = "LeftArrow", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Left") },
{ key = 'PageDown', mods = 'SHIFT', action = act.ScrollByPage(1) }, { key = "LeftArrow", mods = "SHIFT|ALT|CTRL", action = act.AdjustPaneSize({ "Left", 1 }) },
{ key = 'PageDown', mods = 'CTRL', action = act.ActivateTabRelative(1) }, { key = "RightArrow", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Right") },
{ key = 'PageDown', mods = 'SHIFT|CTRL', action = act.MoveTabRelative(1) }, { key = "RightArrow", mods = "SHIFT|ALT|CTRL", action = act.AdjustPaneSize({ "Right", 1 }) },
{ key = 'LeftArrow', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Left' }, { key = "UpArrow", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Up") },
{ key = 'LeftArrow', mods = 'SHIFT|ALT|CTRL', action = act.AdjustPaneSize{ 'Left', 1 } }, { key = "UpArrow", mods = "SHIFT|ALT|CTRL", action = act.AdjustPaneSize({ "Up", 1 }) },
{ key = 'RightArrow', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Right' }, { key = "DownArrow", mods = "SHIFT|CTRL", action = act.ActivatePaneDirection("Down") },
{ key = 'RightArrow', mods = 'SHIFT|ALT|CTRL', action = act.AdjustPaneSize{ 'Right', 1 } }, { key = "DownArrow", mods = "SHIFT|ALT|CTRL", action = act.AdjustPaneSize({ "Down", 1 }) },
{ key = 'UpArrow', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Up' }, { key = "Insert", mods = "SHIFT", action = act.PasteFrom("PrimarySelection") },
{ key = 'UpArrow', mods = 'SHIFT|ALT|CTRL', action = act.AdjustPaneSize{ 'Up', 1 } }, { key = "Insert", mods = "CTRL", action = act.CopyTo("PrimarySelection") },
{ key = 'DownArrow', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Down' }, { key = "Copy", mods = "NONE", action = act.CopyTo("Clipboard") },
{ key = 'DownArrow', mods = 'SHIFT|ALT|CTRL', action = act.AdjustPaneSize{ 'Down', 1 } }, { key = "Paste", mods = "NONE", action = act.PasteFrom("Clipboard") },
{ key = 'Insert', mods = 'SHIFT', action = act.PasteFrom 'PrimarySelection' }, }
{ key = 'Insert', mods = 'CTRL', action = act.CopyTo 'PrimarySelection' },
{ key = 'Copy', mods = 'NONE', action = act.CopyTo 'Clipboard' }, local keys_tiling = {
{ key = 'Paste', mods = 'NONE', action = act.PasteFrom 'Clipboard' }, { key = "h", mods = "ALT", action = act.EmitEvent("ActivatePaneDirection-left") },
{ key = "j", mods = "ALT", action = act.EmitEvent("ActivatePaneDirection-down") },
{ key = "k", mods = "ALT", action = act.EmitEvent("ActivatePaneDirection-up") },
{ key = "l", mods = "ALT", action = act.EmitEvent("ActivatePaneDirection-right") },
{ key = "1", mods = "ALT", action = act.ActivateTab(0) },
{ key = "2", mods = "ALT", action = act.ActivateTab(1) },
{ key = "3", mods = "ALT", action = act.ActivateTab(2) },
{ key = "4", mods = "ALT", action = act.ActivateTab(3) },
{ key = "5", mods = "ALT", action = act.ActivateTab(4) },
{ key = "6", mods = "ALT", action = act.ActivateTab(5) },
{ key = "7", mods = "ALT", action = act.ActivateTab(6) },
{ key = "8", mods = "ALT", action = act.ActivateTab(7) },
{ key = "9", mods = "ALT", action = act.ActivateTab(8) },
{ key = "0", mods = "ALT", action = act.ActivateTab(-1) },
{ key = "Enter", mods = "ALT", action = act.SplitVertical({ domain = "CurrentPaneDomain" }) },
{ key = "Enter", mods = "SHIFT|ALT", action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }) },
} }
local key_tables = { local key_tables = {
copy_mode = { copy_mode = {
{ key = 'Tab', mods = 'NONE', action = act.CopyMode 'MoveForwardWord' }, { key = "Tab", mods = "NONE", action = act.CopyMode("MoveForwardWord") },
{ key = 'Tab', mods = 'SHIFT', action = act.CopyMode 'MoveBackwardWord' }, { key = "Tab", mods = "SHIFT", action = act.CopyMode("MoveBackwardWord") },
{ key = 'Enter', mods = 'NONE', action = act.CopyMode 'MoveToStartOfNextLine' }, { key = "Enter", mods = "NONE", action = act.CopyMode("MoveToStartOfNextLine") },
{ key = 'Escape', mods = 'NONE', action = act.CopyMode 'Close' }, { key = "Escape", mods = "NONE", action = act.CopyMode("Close") },
{ key = 'Space', mods = 'NONE', action = act.CopyMode{ SetSelectionMode = 'Cell' } }, { key = "Space", mods = "NONE", action = act.CopyMode({ SetSelectionMode = "Cell" }) },
{ key = '$', mods = 'NONE', action = act.CopyMode 'MoveToEndOfLineContent' }, { key = "$", mods = "NONE", action = act.CopyMode("MoveToEndOfLineContent") },
{ key = '$', mods = 'SHIFT', action = act.CopyMode 'MoveToEndOfLineContent' }, { key = "$", mods = "SHIFT", action = act.CopyMode("MoveToEndOfLineContent") },
{ key = ',', mods = 'NONE', action = act.CopyMode 'JumpReverse' }, { key = ",", mods = "NONE", action = act.CopyMode("JumpReverse") },
{ key = '0', mods = 'NONE', action = act.CopyMode 'MoveToStartOfLine' }, { key = "0", mods = "NONE", action = act.CopyMode("MoveToStartOfLine") },
{ key = ';', mods = 'NONE', action = act.CopyMode 'JumpAgain' }, { key = ";", mods = "NONE", action = act.CopyMode("JumpAgain") },
{ key = 'F', mods = 'NONE', action = act.CopyMode{ JumpBackward = { prev_char = false } } }, { key = "F", mods = "NONE", action = act.CopyMode({ JumpBackward = { prev_char = false } }) },
{ key = 'F', mods = 'SHIFT', action = act.CopyMode{ JumpBackward = { prev_char = false } } }, { key = "F", mods = "SHIFT", action = act.CopyMode({ JumpBackward = { prev_char = false } }) },
{ key = 'G', mods = 'NONE', action = act.CopyMode 'MoveToScrollbackBottom' }, { key = "G", mods = "NONE", action = act.CopyMode("MoveToScrollbackBottom") },
{ key = 'G', mods = 'SHIFT', action = act.CopyMode 'MoveToScrollbackBottom' }, { key = "G", mods = "SHIFT", action = act.CopyMode("MoveToScrollbackBottom") },
{ key = 'H', mods = 'NONE', action = act.CopyMode 'MoveToViewportTop' }, { key = "H", mods = "NONE", action = act.CopyMode("MoveToViewportTop") },
{ key = 'H', mods = 'SHIFT', action = act.CopyMode 'MoveToViewportTop' }, { key = "H", mods = "SHIFT", action = act.CopyMode("MoveToViewportTop") },
{ key = 'L', mods = 'NONE', action = act.CopyMode 'MoveToViewportBottom' }, { key = "L", mods = "NONE", action = act.CopyMode("MoveToViewportBottom") },
{ key = 'L', mods = 'SHIFT', action = act.CopyMode 'MoveToViewportBottom' }, { key = "L", mods = "SHIFT", action = act.CopyMode("MoveToViewportBottom") },
{ key = 'M', mods = 'NONE', action = act.CopyMode 'MoveToViewportMiddle' }, { key = "M", mods = "NONE", action = act.CopyMode("MoveToViewportMiddle") },
{ key = 'M', mods = 'SHIFT', action = act.CopyMode 'MoveToViewportMiddle' }, { key = "M", mods = "SHIFT", action = act.CopyMode("MoveToViewportMiddle") },
{ key = 'O', mods = 'NONE', action = act.CopyMode 'MoveToSelectionOtherEndHoriz' }, { key = "O", mods = "NONE", action = act.CopyMode("MoveToSelectionOtherEndHoriz") },
{ key = 'O', mods = 'SHIFT', action = act.CopyMode 'MoveToSelectionOtherEndHoriz' }, { key = "O", mods = "SHIFT", action = act.CopyMode("MoveToSelectionOtherEndHoriz") },
{ key = 'T', mods = 'NONE', action = act.CopyMode{ JumpBackward = { prev_char = true } } }, { key = "T", mods = "NONE", action = act.CopyMode({ JumpBackward = { prev_char = true } }) },
{ key = 'T', mods = 'SHIFT', action = act.CopyMode{ JumpBackward = { prev_char = true } } }, { key = "T", mods = "SHIFT", action = act.CopyMode({ JumpBackward = { prev_char = true } }) },
{ key = 'V', mods = 'NONE', action = act.CopyMode{ SetSelectionMode = 'Line' } }, { key = "V", mods = "NONE", action = act.CopyMode({ SetSelectionMode = "Line" }) },
{ key = 'V', mods = 'SHIFT', action = act.CopyMode{ SetSelectionMode = 'Line' } }, { key = "V", mods = "SHIFT", action = act.CopyMode({ SetSelectionMode = "Line" }) },
{ key = '^', mods = 'NONE', action = act.CopyMode 'MoveToStartOfLineContent' }, { key = "^", mods = "NONE", action = act.CopyMode("MoveToStartOfLineContent") },
{ key = '^', mods = 'SHIFT', action = act.CopyMode 'MoveToStartOfLineContent' }, { key = "^", mods = "SHIFT", action = act.CopyMode("MoveToStartOfLineContent") },
{ key = 'b', mods = 'NONE', action = act.CopyMode 'MoveBackwardWord' }, { key = "b", mods = "NONE", action = act.CopyMode("MoveBackwardWord") },
{ key = 'b', mods = 'ALT', action = act.CopyMode 'MoveBackwardWord' }, { key = "b", mods = "ALT", action = act.CopyMode("MoveBackwardWord") },
{ key = 'b', mods = 'CTRL', action = act.CopyMode 'PageUp' }, { key = "b", mods = "CTRL", action = act.CopyMode("PageUp") },
{ key = 'c', mods = 'CTRL', action = act.CopyMode 'Close' }, { key = "c", mods = "CTRL", action = act.CopyMode("Close") },
{ key = 'f', mods = 'NONE', action = act.CopyMode{ JumpForward = { prev_char = false } } }, { key = "f", mods = "NONE", action = act.CopyMode({ JumpForward = { prev_char = false } }) },
{ key = 'f', mods = 'ALT', action = act.CopyMode 'MoveForwardWord' }, { key = "f", mods = "ALT", action = act.CopyMode("MoveForwardWord") },
{ key = 'f', mods = 'CTRL', action = act.CopyMode 'PageDown' }, { key = "f", mods = "CTRL", action = act.CopyMode("PageDown") },
{ key = 'g', mods = 'NONE', action = act.CopyMode 'MoveToScrollbackTop' }, { key = "g", mods = "NONE", action = act.CopyMode("MoveToScrollbackTop") },
{ key = 'g', mods = 'CTRL', action = act.CopyMode 'Close' }, { key = "g", mods = "CTRL", action = act.CopyMode("Close") },
{ key = 'h', mods = 'NONE', action = act.CopyMode 'MoveLeft' }, { key = "h", mods = "NONE", action = act.CopyMode("MoveLeft") },
{ key = 'j', mods = 'NONE', action = act.CopyMode 'MoveDown' }, { key = "j", mods = "NONE", action = act.CopyMode("MoveDown") },
{ key = 'k', mods = 'NONE', action = act.CopyMode 'MoveUp' }, { key = "k", mods = "NONE", action = act.CopyMode("MoveUp") },
{ key = 'l', mods = 'NONE', action = act.CopyMode 'MoveRight' }, { key = "l", mods = "NONE", action = act.CopyMode("MoveRight") },
{ key = 'm', mods = 'ALT', action = act.CopyMode 'MoveToStartOfLineContent' }, { key = "m", mods = "ALT", action = act.CopyMode("MoveToStartOfLineContent") },
{ key = 'o', mods = 'NONE', action = act.CopyMode 'MoveToSelectionOtherEnd' }, { key = "o", mods = "NONE", action = act.CopyMode("MoveToSelectionOtherEnd") },
{ key = 'q', mods = 'NONE', action = act.CopyMode 'Close' }, { key = "q", mods = "NONE", action = act.CopyMode("Close") },
{ key = 't', mods = 'NONE', action = act.CopyMode{ JumpForward = { prev_char = true } } }, { key = "t", mods = "NONE", action = act.CopyMode({ JumpForward = { prev_char = true } }) },
{ key = 'v', mods = 'NONE', action = act.CopyMode{ SetSelectionMode = 'Cell' } }, { key = "v", mods = "NONE", action = act.CopyMode({ SetSelectionMode = "Cell" }) },
{ key = 'v', mods = 'CTRL', action = act.CopyMode{ SetSelectionMode = 'Block' } }, { key = "v", mods = "CTRL", action = act.CopyMode({ SetSelectionMode = "Block" }) },
{ key = 'w', mods = 'NONE', action = act.CopyMode 'MoveForwardWord' }, { key = "w", mods = "NONE", action = act.CopyMode("MoveForwardWord") },
{ key = 'y', mods = 'NONE', action = act.Multiple{ { CopyTo = 'ClipboardAndPrimarySelection' }, { CopyMode = 'Close' } } }, {
{ key = 'PageUp', mods = 'NONE', action = act.CopyMode 'PageUp' }, key = "y",
{ key = 'PageDown', mods = 'NONE', action = act.CopyMode 'PageDown' }, mods = "NONE",
{ key = 'LeftArrow', mods = 'NONE', action = act.CopyMode 'MoveLeft' }, action = act.Multiple({ { CopyTo = "ClipboardAndPrimarySelection" }, { CopyMode = "Close" } }),
{ key = 'LeftArrow', mods = 'ALT', action = act.CopyMode 'MoveBackwardWord' }, },
{ key = 'RightArrow', mods = 'NONE', action = act.CopyMode 'MoveRight' }, { key = "PageUp", mods = "NONE", action = act.CopyMode("PageUp") },
{ key = 'RightArrow', mods = 'ALT', action = act.CopyMode 'MoveForwardWord' }, { key = "PageDown", mods = "NONE", action = act.CopyMode("PageDown") },
{ key = 'UpArrow', mods = 'NONE', action = act.CopyMode 'MoveUp' }, { key = "LeftArrow", mods = "NONE", action = act.CopyMode("MoveLeft") },
{ key = 'DownArrow', mods = 'NONE', action = act.CopyMode 'MoveDown' }, { key = "LeftArrow", mods = "ALT", action = act.CopyMode("MoveBackwardWord") },
}, { key = "RightArrow", mods = "NONE", action = act.CopyMode("MoveRight") },
{ key = "RightArrow", mods = "ALT", action = act.CopyMode("MoveForwardWord") },
{ key = "UpArrow", mods = "NONE", action = act.CopyMode("MoveUp") },
{ key = "DownArrow", mods = "NONE", action = act.CopyMode("MoveDown") },
},
search_mode = { search_mode = {
{ key = 'Enter', mods = 'NONE', action = act.CopyMode 'PriorMatch' }, { key = "Enter", mods = "NONE", action = act.CopyMode("PriorMatch") },
{ key = 'Escape', mods = 'NONE', action = act.CopyMode 'Close' }, { key = "Escape", mods = "NONE", action = act.CopyMode("Close") },
{ key = 'n', mods = 'CTRL', action = act.CopyMode 'NextMatch' }, { key = "n", mods = "CTRL", action = act.CopyMode("NextMatch") },
{ key = 'p', mods = 'CTRL', action = act.CopyMode 'PriorMatch' }, { key = "p", mods = "CTRL", action = act.CopyMode("PriorMatch") },
{ key = 'r', mods = 'CTRL', action = act.CopyMode 'CycleMatchType' }, { key = "r", mods = "CTRL", action = act.CopyMode("CycleMatchType") },
{ key = 'u', mods = 'CTRL', action = act.CopyMode 'ClearPattern' }, { key = "u", mods = "CTRL", action = act.CopyMode("ClearPattern") },
{ key = 'PageUp', mods = 'NONE', action = act.CopyMode 'PriorMatchPage' }, { key = "PageUp", mods = "NONE", action = act.CopyMode("PriorMatchPage") },
{ key = 'PageDown', mods = 'NONE', action = act.CopyMode 'NextMatchPage' }, { key = "PageDown", mods = "NONE", action = act.CopyMode("NextMatchPage") },
{ key = 'UpArrow', mods = 'NONE', action = act.CopyMode 'PriorMatch' }, { key = "UpArrow", mods = "NONE", action = act.CopyMode("PriorMatch") },
{ key = 'DownArrow', mods = 'NONE', action = act.CopyMode 'NextMatch' }, { key = "DownArrow", mods = "NONE", action = act.CopyMode("NextMatch") },
} },
} }
return { return {
font_size = 14, font_size = 14,
disable_default_key_bindings = true, disable_default_key_bindings = true,
window_background_opacity = 0.95, window_background_opacity = 0.95,
color_scheme = "nightfox", color_scheme = "nightfox",
hide_tab_bar_if_only_one_tab = true, hide_tab_bar_if_only_one_tab = true,
use_dead_keys = false, use_dead_keys = false,
keys = keys, keys = keys,
key_tables = key_tables, key_tables = key_tables,
} }