diff --git a/dot_config/wezterm/keybinds.lua b/dot_config/wezterm/keybinds.lua index 15ae515..1365cc4 100644 --- a/dot_config/wezterm/keybinds.lua +++ b/dot_config/wezterm/keybinds.lua @@ -12,8 +12,8 @@ local keybinds = { { key = 'f', mods = 'LEADER', action = act.ToggleFullScreen }, -- tabs { key = 'c', mods = 'LEADER', action = act.SpawnTab('DefaultDomain') }, - { key = 'n', mods = 'LEADER', action = act.ActivateTabRelative( 1) }, - { key = 'p', mods = 'LEADER', action = act.ActivateTabRelative(-1) }, + { key = 't', mods = 'META', action = act.SpawnTab('DefaultDomain') }, + { key = 'w', mods = 'META', action = act.CloseCurrentTab { confirm = true } }, -- panes { key = 's', mods = 'LEADER', action = act.SplitVertical { domain = 'CurrentPaneDomain' } }, { key = 'v', mods = 'LEADER', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' } }, @@ -31,9 +31,28 @@ for i = 1, 9 do keybinds, { key = tostring(i), mods = 'LEADER', action = act.ActivateTab(i - 1) } ) + table.insert( + keybinds, + { key = tostring(i), mods = 'META', action = act.ActivateTab(i - 1) } + ) end +local mousebinds = { + { + event = { Down = { streak = 1, button = { WheelUp = 1 } } }, + mods = 'NONE', + action = act.ScrollByLine(-3), + alt_screen = false, + }, + { + event = { Down = { streak = 1, button = { WheelDown = 1 } } }, + mods = 'NONE', + action = act.ScrollByLine(3), + alt_screen = false, + }, +} return { leader = leader_key, - keybinds = keybinds + keybinds = keybinds, + mousebinds = mousebinds } diff --git a/dot_config/wezterm/wezterm.lua b/dot_config/wezterm/wezterm.lua index 8a3bb20..2a5c547 100644 --- a/dot_config/wezterm/wezterm.lua +++ b/dot_config/wezterm/wezterm.lua @@ -12,6 +12,7 @@ local tab_bg_active = '#282828' local cfg = wt.config_builder() cfg.leader = kb.leader cfg.keys = kb.keybinds +cfg.mouse_bindings = kb.mousebinds cfg.audible_bell = 'Disabled' cfg.check_for_updates = false @@ -20,14 +21,13 @@ cfg.cursor_blink_rate = 0 cfg.bold_brightens_ansi_colors = false cfg.font = wt.font('Maple Mono NL NF') cfg.font_size = fn.set_by_os{ - Darwin = 15, - others = 12 + Darwin = 14, + others = 11 } -- visuals cfg.window_decorations = fn.set_by_os{ Darwin = 'INTEGRATED_BUTTONS|RESIZE', - Linux = 'RESIZE', others = 'TITLE|RESIZE' } cfg.use_fancy_tab_bar = fn.set_by_os{