Created
June 23, 2025 04:14
-
-
Save broxio/c7a118aee1b218c7e80eb0f5a3628a43 to your computer and use it in GitHub Desktop.
my .wezterm.lua
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
| local wezterm = require("wezterm") | |
| local config = wezterm.config_builder() | |
| -- Current dark theme customizations | |
| local custom = wezterm.color.get_builtin_schemes()["Catppuccin Mocha"] | |
| custom.background = "#191724" | |
| custom.cursor_bg = "#bac2de" | |
| -- Enable scrollbar | |
| config.enable_scroll_bar = true | |
| -- Leader key | |
| config.leader = { key = 'b', mods = 'CTRL', timeout_milliseconds = 1000 } | |
| -- Default color scheme (start with dark) | |
| config.color_scheme = "Github dark (Gogh)" | |
| -- Theme toggle event | |
| wezterm.on("toggle-theme", function(window, _) | |
| local overrides = window:get_config_overrides() or {} | |
| if overrides.color_scheme == "Builtin Light" or overrides.color_scheme == "Catppuccin Latte" then | |
| overrides.color_scheme = "Github dark (Gogh)" | |
| else | |
| overrides.color_scheme = "Catppuccin Latte" -- or any preferred light scheme | |
| end | |
| window:set_config_overrides(overrides) | |
| end) | |
| -- Key bindings | |
| config.keys = { | |
| -- Panes | |
| { mods = "LEADER", key = "-", action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' } }, | |
| { mods = "LEADER", key = "/", action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' } }, | |
| { mods = "LEADER", key = 'LeftArrow', action = wezterm.action.ActivatePaneDirection 'Left' }, | |
| { mods = "LEADER", key = 'h', action = wezterm.action.ActivatePaneDirection 'Left' }, | |
| { mods = "LEADER", key = 'RightArrow', action = wezterm.action.ActivatePaneDirection 'Right' }, | |
| { mods = "LEADER", key = 'l', action = wezterm.action.ActivatePaneDirection 'Right' }, | |
| { mods = "LEADER", key = 'UpArrow', action = wezterm.action.ActivatePaneDirection 'Up' }, | |
| { mods = "LEADER", key = 'k', action = wezterm.action.ActivatePaneDirection 'Up' }, | |
| { mods = "LEADER", key = 'DownArrow', action = wezterm.action.ActivatePaneDirection 'Down' }, | |
| { mods = "LEADER", key = 'j', action = wezterm.action.ActivatePaneDirection 'Down' }, | |
| { mods = 'LEADER', key = 'p', action = wezterm.action.ActivateTabRelative(-1) }, | |
| { mods = 'LEADER', key = 'n', action = wezterm.action.ActivateTabRelative(1) }, | |
| { mods = 'LEADER', key = 'x', action = wezterm.action.CloseCurrentPane { confirm = false }, }, | |
| { mods = 'LEADER', key = 'X', action = wezterm.action.CloseCurrentTab { confirm = false }, }, | |
| { mods = 'LEADER', key = 'c', action = wezterm.action.SpawnTab 'CurrentPaneDomain', }, | |
| { | |
| mods = 'LEADER', | |
| key = '!', | |
| action = wezterm.action_callback(function(_win, pane) | |
| pane:move_to_new_tab() | |
| end), | |
| }, | |
| -- Theme toggle keybinding (Ctrl + Alt + t) | |
| { | |
| key = 't', | |
| mods = 'CTRL|ALT', | |
| action = wezterm.action.EmitEvent('toggle-theme'), | |
| }, | |
| } | |
| -- Add tab switching keys (LEADER + 1-9) | |
| for i = 1, 9 do | |
| table.insert(config.keys, { | |
| key = tostring(i), | |
| mods = 'LEADER', | |
| action = wezterm.action.ActivateTab(i - 1), | |
| }) | |
| end | |
| -- UI and behavior settings | |
| config.font = wezterm.font({ family = "0xProto Nerd Font" }) | |
| config.font_size = 18 | |
| config.hide_tab_bar_if_only_one_tab = true | |
| config.initial_cols = 180 | |
| config.initial_rows = 40 | |
| config.line_height = 1.2 | |
| config.macos_window_background_blur = 60 | |
| config.send_composed_key_when_left_alt_is_pressed = true | |
| config.use_fancy_tab_bar = true | |
| config.warn_about_missing_glyphs = false | |
| config.window_background_opacity = 0.7 | |
| config.window_close_confirmation = 'NeverPrompt' | |
| config.window_decorations = "INTEGRATED_BUTTONS|RESIZE" | |
| config.window_padding = { | |
| top = "1.5cell", | |
| } | |
| config.inactive_pane_hsb = { | |
| saturation = 0.9, | |
| brightness = 0.8, | |
| } | |
| return config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment