Skip to content

Instantly share code, notes, and snippets.

@Adophilus
Created May 15, 2023 20:14
Show Gist options
  • Save Adophilus/896bd0c7ea5311ad2e1adc00ae5c15e8 to your computer and use it in GitHub Desktop.
Save Adophilus/896bd0c7ea5311ad2e1adc00ae5c15e8 to your computer and use it in GitHub Desktop.
local wezterm = require('wezterm')
local default_prog = { 'C:\\Windows\\System32\\cmd.exe' }
-- local default_prog = { 'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe' }
-- local default_prog = { 'C:\\Program Files\\WindowsApps\\Microsoft.PowerShell_7.3.3.0_x64__8wekyb3d8bbwe\\pwsh.exe' }
-- local default_prog = { 'C:\\Users\\hp\\AppData\\Local\\Microsoft\\WindowsApps\\pwsh.exe' }
return {
default_prog = default_prog,
use_fancy_tab_bar = true,
-- window_decorations = 'NONE',
font = wezterm.font('Fira Code', { weight = 'Regular' }),
-- font = wezterm.font('Operator Mono Lig Book', { weight = 'Regular' }),
-- font = wezterm.font('Monocraft', { weight = 'Regular' }),
window_padding = { left = 0, right = 0, top = 0, bottom = 0 },
leader = { key = 'a', mods = 'CTRL', timeout_milliseconds = 1000 },
keys = {
{ key = 'f', mods = 'LEADER', action = wezterm.action.ToggleFullScreen },
-- font size
{ key = '-', mods = 'CTRL', action = wezterm.action.DecreaseFontSize },
{ key = '+', mods = 'CTRL', action = wezterm.action.IncreaseFontSize },
-- tab actions
{ key = 'c', mods = 'LEADER', action = wezterm.action.SpawnTab 'CurrentPaneDomain' },
{ key = 'c', mods = 'LEADER|CTRL', action = wezterm.action.SpawnWindow },
{ key = 'h', mods = 'LEADER|SHIFT', action = wezterm.action.MoveTabRelative(-1) },
{ key = 'l', mods = 'LEADER|SHIFT', action = wezterm.action.MoveTabRelative(1) },
-- tab navigation
{ key = 'l', mods = 'LEADER|CTRL', action = wezterm.action.ActivateTabRelative(1) },
{ key = 'h', mods = 'LEADER|CTRL', action = wezterm.action.ActivateTabRelative(-1) },
-- pane splitting
{ key = '_', mods = 'LEADER|SHIFT', action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' } },
{ key = '-', mods = 'LEADER', action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' } },
-- pane navigation
{ key = 'h', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Left' } },
{ key = 'l', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Right' } },
{ key = 'k', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Up' } },
{ key = 'j', mods = 'LEADER', action = wezterm.action { ActivatePaneDirection = 'Down' } },
-- pane actions
{ key = 'z', mods = 'LEADER', action = wezterm.action.TogglePaneZoomState },
{ key = 'x', mods = 'LEADER', action = wezterm.action.CloseCurrentPane { confirm = true } },
-- search actions
{ key = '/', mods = 'LEADER', action = wezterm.action.Search { Regex = "" } }
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment