-- Pull in the wezterm API local wezterm = require("wezterm") local act = wezterm.action local config = {} -- Use config builder object if possible if wezterm.config_builder then config = wezterm.config_builder() end config.audible_bell = "Disabled" config.default_prog = {'pwsh.exe', '-NoLogo'} config.color_scheme = "Tokyo Night" config.font = wezterm.font_with_fallback({ {family = 'Hack NF',scale = 1.0} }) config.use_fancy_tab_bar = false config.hide_tab_bar_if_only_one_tab = true config.font_size = 16 config.window_decorations = "RESIZE" config.max_fps = 144 config.disable_default_key_bindings = true config.leader = { key = ",", mods = "CTRL", timeout_milliseconds = 1000 } config.keys = { {key = 'W', mods = 'CTRL', action = wezterm.action.CloseCurrentPane { confirm = true },}, { key = "s", mods = "LEADER", action = act.SplitVertical { domain = "CurrentPaneDomain" } }, { key = "v", mods = "LEADER", action = act.SplitPane {direction = "Right", size ={Percent=30} } }, { key = "h", mods = "LEADER", action = act.ActivatePaneDirection("Left") }, { key = "j", mods = "LEADER", action = act.ActivatePaneDirection("Down") }, { key = "k", mods = "LEADER", action = act.ActivatePaneDirection("Up") }, { key = "l", mods = "LEADER", action = act.ActivatePaneDirection("Right") }, { key = "Enter", mods = "LEADER", action = act.ToggleFullScreen}, { key = "Space", mods = "CTRL|SHIFT", action = act.ActivateCopyMode}, -- We can make separate keybindings for resizing panes -- But Wezterm offers custom "mode" in the name of "KeyTable" { key = "r", mods = "LEADER", action = act.ActivateKeyTable { name = "resize_pane", one_shot = false } }, -- Resizing Panes { key = "H", mods = "LEADER", action = act.AdjustPaneSize{"Left",5} }, { key = "J", mods = "LEADER", action = act.AdjustPaneSize{"Down",5} }, { key = "K", mods = "LEADER", action = act.AdjustPaneSize{"Up",5} }, { key = "L", mods = "LEADER", action = act.AdjustPaneSize{"Right",5}}, -- Cycling { key = ";", mods = "CTRL", action = act.ActivatePaneDirection("Next") }, -- Tab keybindings { key = "t", mods = "LEADER", action = act.SpawnTab("CurrentPaneDomain") }, { key = "[", mods = "LEADER", action = act.ActivateTabRelative(-1) }, { key = "]", mods = "LEADER", action = act.ActivateTabRelative(1) }, { key = "n", mods = "LEADER", action = act.ShowTabNavigator }, { key = 'K', mods = 'CTRL|SHIFT', action = act.Multiple {act.ClearScrollback 'ScrollbackAndViewport',},}, {key = "V", mods = "SHIFT|CTRL", action = act.PasteFrom "Clipboard"}, } return config