local wezterm = require 'wezterm' local config = {} -- In newer versions of wezterm, use the config_builder which will -- help provide clearer error messages if wezterm.config_builder then config = wezterm.config_builder() end wezterm.on('update-status', function(window) -- Grab the utf8 character for the "powerline" left facing -- solid arrow. local SOLID_LEFT_ARROW = utf8.char(0xe0b2) -- Grab the current window's configuration, and from it the -- palette (this is the combination of your chosen colour scheme -- including any overrides). local color_scheme = window:effective_config().resolved_palette local bg = color_scheme.background local fg = color_scheme.foreground window:set_right_status(wezterm.format({ -- First, we draw the arrow... { Background = { Color = 'none' } }, { Foreground = { Color = bg } }, { Text = SOLID_LEFT_ARROW }, -- Then we draw our text { Background = { Color = bg } }, { Foreground = { Color = fg } }, { Text = ' ' .. wezterm.hostname() .. ' ' }, })) end) -- This is where you actually apply your config choices config.set_environment_variables = { PATH = '/opt/homebrew/bin:' .. os.getenv('PATH') } config.color_scheme = 'Jellybeans (Gogh)' config.font = wezterm.font_with_fallback { 'IosevkaTerm Nerd Font' } config.font_size = 15 config.hide_tab_bar_if_only_one_tab = true config.window_decorations = 'RESIZE' config.window_background_opacity = 0.8 config.macos_window_background_blur = 80 config.window_frame = { font = wezterm.font({ family = 'IosevkaTerm Nerd Fonk', weight = 'Bold' }), font_size = 11, } config.keys = { -- Sends ESC + b and ESC + f sequence, which is used -- for telling your shell to jump back/forward. { -- When the left arrow is pressed key = 'LeftArrow', -- With the "Option" key modifier held down mods = 'OPT', -- Perform this action, in this case - sending ESC + B -- to the terminal action = wezterm.action.SendString '\x1bb', }, { key = 'RightArrow', mods = 'OPT', action = wezterm.action.SendString '\x1bf', }, -- Command+, for opening "settings" in nvim { key = ',', mods = 'SUPER', action = wezterm.action.SpawnCommandInNewTab { cwd = wezterm.home_dir, args = { 'nvim', wezterm.config_file }, }, }, } -- and finally, return the configuration to wezterm return config