:title: Wezterm :date: 2025-02-16 :tags: cli :identifier: 20250216T185035 Wezterm ======= .. highlight:: none `Wezterm `__ is an interesting terminal emulator that is configured using Lua. I've been using it for a while however, my config is fairly minimal. .. code-block:: make :filename: Makefile .PHONY: wezterm wezterm: test -L $(HOME)/.config/wezterm || ln -s $(shell pwd)/wezterm $(HOME)/.config/wezterm .. code-block:: lua :filename: wezterm/wezterm.lua local wezterm = require 'wezterm' local config = wezterm.config_builder() config.keys = {} Appearance ---------- Choose a font .. code-block:: lua :filename: wezterm/wezterm.lua config.font = wezterm.font('UbuntuMono Nerd Font') Choose a light/dark theme based on the system. .. code-block:: lua :filename: wezterm/wezterm.lua if wezterm.gui.get_appearance():find("Dark") then config.color_scheme = 'Modus-Vivendi' else config.color_scheme = 'Modus-Operandi' end Use the "retro" tab bar. .. code-block:: lua :filename: wezterm/wezterm.lua config.use_fancy_tab_bar = true Default Program --------------- Rather than mess around with my user's default shell, just tell wezterm to start fish by default instead .. code-block:: lua :filename: wezterm/wezterm.lua config.default_prog = { '/usr/bin/fish', '-l' } Keybindings ----------- Disable the default :kbd:`Alt+Enter` keybinding, it conflicts with Emacs. .. code-block:: lua :filename: wezterm/wezterm.lua table.insert(config.keys, { key = 'Enter', mods = 'ALT', action = wezterm.action.DisableDefaultAssignment, }) .. code-block:: lua :class: hidden :filename: wezterm/wezterm.lua local screenshot_command = require 'commands.screenshot' screenshot_command.setup() return config