WezTerm
WezTerm is a GPU-accelerated terminal emulator that delivers speed and extensive customization through Lua configuration. The main appeal is its true cross-platform support—the same .wezterm.lua config works seamlessly across Windows, Linux, and macOS, providing a consistent terminal experience regardless of your operating system. This makes it ideal for developers working across multiple platforms who want to maintain their workflow and keybindings everywhere.
Wezterm Configuration
Font
I prefer using the font [Inconsolata Nerd Font] (https://www.nerdfonts.com/font-downloads) for better readability and aesthetics. You can download it from:
https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/Inconsolata.zip
The nerd font includes additional glyphs and symbols that enhance the terminal experience, especially for developers.
Configuration File Location
On windows, the configuration file is located at:
%USERPROFILE%\\.wezterm.lua
On linux and macOS, the configuration file is also located in your home folder.
-- Pull in the wezterm API
local wezterm = require 'wezterm'
local act = wezterm.action
-- This will hold the configuration.
local config = wezterm.config_builder()
-- This is where you actually apply your config choices.
config.default_domain = 'WSL:Ubuntu'
config.audible_bell = 'Disabled'
config.default_cursor_style = 'BlinkingBar'
-- For example, changing the initial geometry for new windows:
config.initial_cols = 120
config.initial_rows = 28
-- or, changing the font size and color scheme.
config.font_size = 10
local custom_scheme = wezterm.color.get_builtin_schemes()["X::DotShare (terminal.sexy)"]
local tmp = custom_scheme.selection_fg
custom_scheme.selection_fg = custom_scheme.selection_bg
custom_scheme.selection_bg = tmp
config.color_schemes = {
["Custom"] = custom_scheme,
}
config.color_scheme = "Custom"
config.colors = {
-- Text colour when selected
selection_bg = '#3399FF',
selection_fg = '#141414',
}
config.mouse_bindings = {
{
event = { Up = { streak = 1, button = 'Right' } },
mods = 'NONE',
action = act.PasteFrom 'Clipboard',
},
}
config.keys = {
{
key = 'v',
mods = 'CTRL',
action = wezterm.action.PasteFrom('Clipboard'),
},
}
-- Finally, return the configuration to wezterm:
return config