Last active
June 19, 2026 20:09
-
-
Save rapando/29d0f22177e6a6658df046affbf45bec 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
| -- pull in the wezterm api and init the configs | |
| local wezterm = require 'wezterm' | |
| local config = wezterm.config_builder() | |
| local font_family = 'Agave Nerd Font' | |
| -- set the color scheme | |
| -- config.color_scheme = 'Rosé Pine' | |
| -- config.color_scheme = 'Catppuccin Mocha' | |
| config.color_scheme = 'rose-pine' | |
| config.window_decorations = "INTEGRATED_BUTTONS" | |
| config.font_size = 16 | |
| -- disable bell | |
| config.audible_bell = 'Disabled' | |
| -- clickable URLs | |
| config.hyperlink_rules = wezterm.default_hyperlink_rules() | |
| -- cursor style | |
| config.default_cursor_style = 'BlinkingUnderline' | |
| -- format the tab | |
| config.hide_tab_bar_if_only_one_tab = true | |
| config.window_background_opacity = 1 | |
| config.front_end = "WebGpu" | |
| config.use_fancy_tab_bar = false | |
| config.tab_bar_at_bottom = false | |
| config.native_macos_fullscreen_mode = true | |
| config.window_frame = { | |
| font = wezterm.font { family = font_family, weight = 'Bold' }, | |
| font_size = 14.0, | |
| } | |
| config.colors = { | |
| tab_bar = { | |
| inactive_tab_edge = '#575757', | |
| }, | |
| } | |
| config.tab_max_width = 100 | |
| config.show_tab_index_in_tab_bar = true | |
| -- config.show_new_tab_button_in_tab_bar = true; | |
| -- config.show_close_tab_button_in_tabs = true; | |
| wezterm.on("format-tab-title", function(tab) | |
| local pane = tab.active_pane | |
| local cwd_uri = pane:get_current_working_dir() | |
| local cwd = "?" | |
| if cwd_uri then | |
| cwd = cwd_uri:match(".*/(.*)") | |
| end | |
| local prog = pane:get_foreground_process_name() | |
| local prog_name = "?" | |
| if prog then | |
| prog_name = prog:match("([^/]+)$") or prog | |
| end | |
| local title = cwd .. " — " .. prog_name | |
| local is_active = tab.is_active | |
| local bg = is_active and '#2c3e50' or '#1a1a2e' | |
| local fg = is_active and '#ffffff' or '#a0a0a0' | |
| return { | |
| { Background = { Color = bg } }, | |
| { Foreground = { Color = fg } }, | |
| { Text = " " .. title .. " " }, | |
| } | |
| end) | |
| -- font | |
| config.font = wezterm.font { | |
| family = font_family, | |
| weight = 'Medium', | |
| harfbuzz_features = { 'calt=1', 'clig=1', 'liga=1' }, | |
| } | |
| -- key bindings | |
| config.keys = { | |
| { | |
| key = 'd', | |
| mods = 'CMD', | |
| action = wezterm.action.SplitHorizontal { | |
| domain = 'CurrentPaneDomain', | |
| }, | |
| }, | |
| { | |
| key = 'd', | |
| mods = 'SHIFT|CMD', | |
| action = wezterm.action.SplitVertical { | |
| domain = 'CurrentPaneDomain', | |
| }, | |
| }, | |
| { | |
| key = 'RightArrow', | |
| mods = 'CMD', | |
| action = wezterm.action.ActivateTabRelative(1), | |
| }, | |
| { | |
| key = 'LeftArrow', | |
| mods = 'CMD', | |
| action = wezterm.action.ActivateTabRelative(-1), | |
| }, | |
| { | |
| key = 'f', | |
| mods = 'CMD', | |
| action = wezterm.action.ToggleFullScreen, | |
| }, | |
| } | |
| -- open URLs with Cmd+Click | |
| config.mouse_bindings = { | |
| { | |
| event = { Up = { streak = 1, button = 'Left' } }, | |
| mods = 'CMD', | |
| action = wezterm.action.OpenLinkAtMouseCursor, | |
| }, | |
| } | |
| return config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment