wezterm
Configure and customize WezTerm terminal emulator. Use for setting up WezTerm config, themes, keybindings, and advanced features.
What this skill does
# WezTerm Configuration
Configure the WezTerm terminal emulator.
## Prerequisites
```bash
# Install WezTerm
brew install --cask wezterm
```
Config location: `~/.wezterm.lua` or `~/.config/wezterm/wezterm.lua`
## Basic Configuration
### Minimal Config
```lua
-- ~/.wezterm.lua
local wezterm = require 'wezterm'
local config = wezterm.config_builder()
-- Font
config.font = wezterm.font('JetBrains Mono')
config.font_size = 14.0
-- Colors
config.color_scheme = 'Catppuccin Mocha'
-- Window
config.window_padding = {
left = 10,
right = 10,
top = 10,
bottom = 10,
}
return config
```
### Font Configuration
```lua
-- Single font
config.font = wezterm.font('JetBrains Mono')
-- Font with fallbacks
config.font = wezterm.font_with_fallback({
'JetBrains Mono',
'Fira Code',
'Nerd Font Symbols',
})
-- Font with weight
config.font = wezterm.font('JetBrains Mono', { weight = 'Medium' })
-- Different font for bold
config.font_rules = {
{
intensity = 'Bold',
font = wezterm.font('JetBrains Mono', { weight = 'Bold' }),
},
}
```
### Color Schemes
```lua
-- Use built-in scheme
config.color_scheme = 'Catppuccin Mocha'
-- List available schemes
-- wezterm show-keys --lua
-- Custom colors
config.colors = {
foreground = '#c0caf5',
background = '#1a1b26',
cursor_bg = '#c0caf5',
selection_bg = '#33467c',
ansi = {'#15161e', '#f7768e', '#9ece6a', '#e0af68', '#7aa2f7', '#bb9af7', '#7dcfff', '#a9b1d6'},
brights = {'#414868', '#f7768e', '#9ece6a', '#e0af68', '#7aa2f7', '#bb9af7', '#7dcfff', '#c0caf5'},
}
```
## Key Bindings
### Custom Keybindings
```lua
config.keys = {
-- Split panes
{ key = 'd', mods = 'CMD', action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' } },
{ key = 'd', mods = 'CMD|SHIFT', action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' } },
-- Navigate panes
{ key = 'LeftArrow', mods = 'CMD', action = wezterm.action.ActivatePaneDirection 'Left' },
{ key = 'RightArrow', mods = 'CMD', action = wezterm.action.ActivatePaneDirection 'Right' },
{ key = 'UpArrow', mods = 'CMD', action = wezterm.action.ActivatePaneDirection 'Up' },
{ key = 'DownArrow', mods = 'CMD', action = wezterm.action.ActivatePaneDirection 'Down' },
-- Tabs
{ key = 't', mods = 'CMD', action = wezterm.action.SpawnTab 'CurrentPaneDomain' },
{ key = 'w', mods = 'CMD', action = wezterm.action.CloseCurrentPane { confirm = true } },
-- Font size
{ key = '=', mods = 'CMD', action = wezterm.action.IncreaseFontSize },
{ key = '-', mods = 'CMD', action = wezterm.action.DecreaseFontSize },
{ key = '0', mods = 'CMD', action = wezterm.action.ResetFontSize },
}
```
### Leader Key
```lua
-- Define leader key (like tmux prefix)
config.leader = { key = 'a', mods = 'CMD', timeout_milliseconds = 1000 }
config.keys = {
-- Leader + c = new tab
{ key = 'c', mods = 'LEADER', action = wezterm.action.SpawnTab 'CurrentPaneDomain' },
-- Leader + | = vertical split
{ key = '|', mods = 'LEADER', action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' } },
-- Leader + - = horizontal split
{ key = '-', mods = 'LEADER', action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' } },
}
```
## Advanced Features
### Tab Bar Customization
```lua
config.use_fancy_tab_bar = false
config.tab_bar_at_bottom = true
config.hide_tab_bar_if_only_one_tab = true
-- Custom tab title
wezterm.on('format-tab-title', function(tab)
local title = tab.tab_title
if title and #title > 0 then
return title
end
return tab.active_pane.title
end)
```
### Startup Actions
```lua
-- Start with specific layout
wezterm.on('gui-startup', function(cmd)
local tab, pane, window = mux.spawn_window(cmd or {})
-- Split right
pane:split { direction = 'Right' }
end)
```
### SSH Domains
```lua
config.ssh_domains = {
{
name = 'my-server',
remote_address = 'server.example.com',
username = 'user',
},
}
-- Connect with: wezterm connect my-server
```
### Multiplexer
```lua
-- Unix domain for persistent sessions
config.unix_domains = {
{ name = 'unix' },
}
-- Default to multiplexer
config.default_gui_startup_args = { 'connect', 'unix' }
```
## Useful Snippets
### Quick Theme Toggle
```lua
local function toggle_theme()
local overrides = window:get_config_overrides() or {}
if overrides.color_scheme == 'Catppuccin Latte' then
overrides.color_scheme = 'Catppuccin Mocha'
else
overrides.color_scheme = 'Catppuccin Latte'
end
window:set_config_overrides(overrides)
end
config.keys = {
{ key = 't', mods = 'CMD|SHIFT', action = wezterm.action_callback(toggle_theme) },
}
```
### Background Image
```lua
config.window_background_image = '/path/to/image.png'
config.window_background_image_hsb = {
brightness = 0.02,
saturation = 0.5,
}
```
### Status Bar
```lua
wezterm.on('update-right-status', function(window, pane)
window:set_right_status(wezterm.format({
{ Text = wezterm.strftime('%H:%M') },
}))
end)
```
## Command Line
```bash
# Open with specific config
wezterm --config-file path/to/config.lua
# Connect to multiplexer
wezterm connect unix
# List color schemes
wezterm ls-colors
# Show key bindings
wezterm show-keys
wezterm show-keys --lua
# CLI utilities
wezterm cli list # List panes
wezterm cli spawn # Spawn new pane
wezterm cli split-pane # Split current pane
```
## Best Practices
1. **Start simple** - Add features as needed
2. **Use config_builder** - Better error messages
3. **Test incrementally** - WezTerm reloads on save
4. **Backup your config** - Keep in dotfiles repo
5. **Use leader keys** - Avoid conflicts with apps
6. **Check logs** - `wezterm --config-file ~/.wezterm.lua` shows errors
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.