Created
June 24, 2026 18:01
-
-
Save furushchev/b2091f5bcbdb2bc973f1f4e4d54aa473 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- ~/.wezterm.lua | |
| local wezterm = require 'wezterm' | |
| local config = wezterm.config_builder() | |
| -- Theme & Visuals | |
| config.color_scheme = 'Tokyo Night' | |
| config.font = wezterm.font('JetBrains Mono') | |
| config.font_size = 13.0 | |
| config.window_decorations = "RESIZE" | |
| config.window_background_opacity = 0.95 | |
| config.macos_window_background_blur = 20 | |
| config.use_fancy_tab_bar = true | |
| -- Set Ctrl+\ as the WezTerm multiplexer leader key | |
| config.leader = { key = '\\', mods = 'CTRL', timeout_milliseconds = 1000 } | |
| config.keys = { | |
| -- Split panes using Leader + | or Leader + - | |
| { | |
| key = '|', | |
| mods = 'LEADER', | |
| action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' }, | |
| }, | |
| { | |
| key = '-', | |
| mods = 'LEADER', | |
| action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' }, | |
| }, | |
| -- Navigate panes using Leader + Arrow Keys | |
| { | |
| key = 'LeftArrow', | |
| mods = 'LEADER', | |
| action = wezterm.action.ActivatePaneDirection 'Left', | |
| }, | |
| { | |
| key = 'RightArrow', | |
| mods = 'LEADER', | |
| action = wezterm.action.ActivatePaneDirection 'Right', | |
| }, | |
| { | |
| key = 'UpArrow', | |
| mods = 'LEADER', | |
| action = wezterm.action.ActivatePaneDirection 'Up', | |
| }, | |
| { | |
| key = 'DownArrow', | |
| mods = 'LEADER', | |
| action = wezterm.action.ActivatePaneDirection 'Down', | |
| }, | |
| -- Close current pane with Leader + x | |
| { | |
| key = 'x', | |
| mods = 'LEADER', | |
| action = wezterm.action.CloseCurrentPane { confirm = true }, | |
| }, | |
| } | |
| -- -------------------------------------------------------------------- | |
| -- Keyboard Behavior (macOS Command -> Emacs Meta & Linux Clipboard) | |
| -- -------------------------------------------------------------------- | |
| -- Map the Command key to act as Meta (Esc+) for keyboard combinations | |
| config.send_composed_key_when_left_alt_is_pressed = false | |
| config.send_composed_key_when_right_alt_is_pressed = false | |
| -- Turn Command key into Meta for standard alphanumeric keys in Emacs | |
| -- This loops through a-z and sends an Escape sequence before the character | |
| for i = 97, 122 do | |
| local char = string.char(i) | |
| table.insert(config.keys, { | |
| key = char, | |
| mods = 'CMD', | |
| action = wezterm.action.SendKey { key = char, mods = 'ALT' }, | |
| }) | |
| table.insert(config.keys, { | |
| key = char, | |
| mods = 'CMD|SHIFT', | |
| action = wezterm.action.SendKey { key = char, mods = 'ALT|SHIFT' }, | |
| }) | |
| end | |
| local extra_meta_keys = { ',', '.', '<', '>', '/', '?', ';', ':', '[', ']', '{', '}' } | |
| for _, key in ipairs(extra_meta_keys) do | |
| table.insert(config.keys, { | |
| key = key, | |
| mods = 'CMD', | |
| action = wezterm.action.SendKey { key = key, mods = 'ALT' }, | |
| }) | |
| table.insert(config.keys, { | |
| key = key, | |
| mods = 'CMD|SHIFT', | |
| action = wezterm.action.SendKey { key = key, mods = 'ALT|SHIFT' }, | |
| }) | |
| end | |
| return config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment