Skip to content

Instantly share code, notes, and snippets.

@hustlestar
Created April 23, 2026 11:13
Show Gist options
  • Select an option

  • Save hustlestar/87c5db3890024f408f9a958061950dde to your computer and use it in GitHub Desktop.

Select an option

Save hustlestar/87c5db3890024f408f9a958061950dde to your computer and use it in GitHub Desktop.
wezterm windows config similar to ghostty on mac
-- ~/.wezterm.lua or %USERPROFILE%\.config\wezterm\wezterm.lua
-- Ghostty-style keybindings (mac-style splits) for WezTerm on Windows
local wezterm = require 'wezterm'
local act = wezterm.action
local config = wezterm.config_builder()
-- ─── Shell ───
if wezterm.target_triple:find('windows') then
local ok = wezterm.run_child_process { 'where.exe', 'pwsh.exe' }
config.default_prog = ok
and { 'pwsh.exe', '-NoLogo' }
or { 'powershell.exe', '-NoLogo' }
end
-- ─── Input ───
config.use_ime = false
-- ─── Look & feel ───
config.scrollback_lines = 10000
config.enable_scroll_bar = false
config.window_padding = { left = 6, right = 6, top = 4, bottom = 0 }
config.audible_bell = 'Disabled'
config.default_cursor_style = 'SteadyBlock'
-- ─── Tab bar (always visible, namespace your work) ───
config.enable_tab_bar = true
config.hide_tab_bar_if_only_one_tab = false
config.use_fancy_tab_bar = true -- prettier native-style tabs
config.tab_bar_at_bottom = false
config.show_new_tab_button_in_tab_bar = true
config.show_tab_index_in_tab_bar = true
config.tab_max_width = 32
-- Show CWD / running process in tab title
wezterm.on('format-tab-title', function(tab, tabs, panes, cfg, hover, max_width)
local title = tab.tab_title
if not title or #title == 0 then
title = tab.active_pane.title -- falls back to process name
end
return string.format(' %d: %s ', tab.tab_index + 1, title)
end)
-- ─── Window frame (title bar + resize borders) ───
config.window_decorations = 'TITLE | RESIZE'
config.window_frame = {
font = wezterm.font { family = 'Segoe UI', weight = 'Regular' },
font_size = 10.0,
active_titlebar_bg = '#1e1e2e',
inactive_titlebar_bg = '#181825',
active_titlebar_fg = '#cdd6f4',
inactive_titlebar_fg = '#6c7086',
border_left_width = '0.5cell',
border_right_width = '0.5cell',
border_bottom_height = '0.25cell',
border_top_height = '0.25cell',
border_left_color = '#1e1e2e',
border_right_color = '#1e1e2e',
border_bottom_color = '#1e1e2e',
border_top_color = '#1e1e2e',
}
-- ─────────────────────────────────────────────────────────────
-- Keybindings
-- ─────────────────────────────────────────────────────────────
local mod = 'CTRL|SHIFT'
config.keys = {
-- ─── Window ───
{ key = 'n', mods = mod, action = act.SpawnWindow },
{ key = 'Enter', mods = 'CTRL', action = act.ToggleFullScreen },
-- ─── Tabs ───
{ key = 't', mods = mod, action = act.SpawnTab 'CurrentPaneDomain' },
{ key = 'w', mods = mod, action = act.CloseCurrentPane { confirm = true } },
{ key = 'Tab', mods = 'CTRL', action = act.ActivateTabRelative(1) },
{ key = 'Tab', mods = 'CTRL|SHIFT', action = act.ActivateTabRelative(-1) },
{ key = 'PageUp', mods = 'CTRL', action = act.ActivateTabRelative(-1) },
{ key = 'PageDown', mods = 'CTRL', action = act.ActivateTabRelative(1) },
-- Rename the current tab (great for namespacing: "overx.ai", "trading-bot", "content")
{ key = 'r', mods = mod, action = act.PromptInputLine {
description = 'Rename tab:',
action = wezterm.action_callback(function(window, pane, line)
if line then window:active_tab():set_title(line) end
end),
}},
-- Move tabs left/right
{ key = '<', mods = mod, action = act.MoveTabRelative(-1) },
{ key = '>', mods = mod, action = act.MoveTabRelative(1) },
-- Jump to tab (Alt+1..8, Alt+9 = last)
{ 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(-1) },
-- ─── Splits (mac-style: Ctrl+Shift+D right, Ctrl+Shift+Alt+D down) ───
{ key = 'd', mods = 'CTRL|SHIFT', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' } },
{ key = 'd', mods = 'CTRL|SHIFT|ALT', action = act.SplitVertical { domain = 'CurrentPaneDomain' } },
-- ─── Pane navigation (Ctrl+Alt+arrows) ───
{ key = 'LeftArrow', mods = 'CTRL|ALT', action = act.ActivatePaneDirection 'Left' },
{ key = 'DownArrow', mods = 'CTRL|ALT', action = act.ActivatePaneDirection 'Down' },
{ key = 'UpArrow', mods = 'CTRL|ALT', action = act.ActivatePaneDirection 'Up' },
{ key = 'RightArrow', mods = 'CTRL|ALT', action = act.ActivatePaneDirection 'Right' },
-- ─── Pane resize (Ctrl+Shift+Alt+arrows) ───
{ key = 'LeftArrow', mods = 'CTRL|SHIFT|ALT', action = act.AdjustPaneSize { 'Left', 5 } },
{ key = 'DownArrow', mods = 'CTRL|SHIFT|ALT', action = act.AdjustPaneSize { 'Down', 5 } },
{ key = 'UpArrow', mods = 'CTRL|SHIFT|ALT', action = act.AdjustPaneSize { 'Up', 5 } },
{ key = 'RightArrow', mods = 'CTRL|SHIFT|ALT', action = act.AdjustPaneSize { 'Right', 5 } },
-- ─── Zoom pane ───
{ key = 'Enter', mods = mod, action = act.TogglePaneZoomState },
-- ─── Clipboard ───
{ key = 'c', mods = mod, action = act.CopyTo 'Clipboard' },
{ key = 'v', mods = mod, action = act.PasteFrom 'Clipboard' },
{ key = 'Insert', mods = 'SHIFT', action = act.PasteFrom 'PrimarySelection' },
-- ─── Scroll ───
{ key = 'Home', mods = 'SHIFT', action = act.ScrollToTop },
{ key = 'End', mods = 'SHIFT', action = act.ScrollToBottom },
{ key = 'PageUp', mods = 'SHIFT', action = act.ScrollByPage(-1) },
{ key = 'PageDown', mods = 'SHIFT', action = act.ScrollByPage(1) },
-- ─── Font size ───
{ key = '=', mods = 'CTRL', action = act.IncreaseFontSize },
{ key = '-', mods = 'CTRL', action = act.DecreaseFontSize },
{ key = '0', mods = 'CTRL', action = act.ResetFontSize },
-- ─── Misc ───
{ key = ',', mods = mod, action = act.ReloadConfiguration },
{ key = 'j', mods = mod, action = act.ClearScrollback 'ScrollbackAndViewport' },
{ key = 'f', mods = mod, action = act.Search { CaseInSensitiveString = '' } },
{ key = 'p', mods = mod, action = act.ActivateCommandPalette },
}
return config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment