Comprehensive terminal emulator and shell configuration
This setup supports multiple GPU-accelerated terminal emulators:
| Terminal | Best For | Config Location |
|---|---|---|
| Alacritty | Simplicity, cross-platform | ~/.config/alacritty/ |
| WezTerm | Built-in multiplexing, Lua config | ~/.config/wezterm/ |
| Kitty | Image support, remote control | ~/.config/kitty/ |
All terminals automatically sync with macOS appearance:
# Manual theme switch
theme # Auto-detect from system
theme dark # Force dark mode
theme light # Force light mode
theme moon # TokyoNight Moon variant
theme storm # TokyoNight Storm variant
Theme files are generated in each terminalโs config directory:
~/.config/alacritty/theme.toml~/.config/wezterm/theme.lua~/.config/kitty/theme.conf~/.config/tmux/theme.confAll terminals use Nerd Fonts for consistent icons:
| Terminal | Font Setting |
|---|---|
| Alacritty | font.normal.family = "JetBrainsMono Nerd Font" |
| WezTerm | config.font = wezterm.font("MesloLGS Nerd Font Mono") |
| Kitty | font_family JetBrains Mono |
Recommended fonts:
Common optimizations across terminals:
GPU acceleration Enabled (Metal/OpenGL)
Scrollback lines 10,000
Background opacity 0.95
Font ligatures Enabled
Consistent keybindings across all terminals:
| Action | macOS Key |
|---|---|
| New tab | Cmd+T |
| Close tab | Cmd+W |
| New window | Cmd+N |
| Split vertical | Cmd+D |
| Split horizontal | Cmd+Shift+D |
| Previous tab | Cmd+[ |
| Next tab | Cmd+] |
| Font size up | Cmd++ |
| Font size down | Cmd+- |
| Fullscreen | Cmd+Return |
The shell detects the terminal and configures accordingly:
# In .zshrc
case "$TERM_PROGRAM" in
Alacritty) export COLORTERM=truecolor ;;
WezTerm) export COLORTERM=truecolor ;;
*) ;;
esac
case "$TERM" in
xterm-kitty) alias icat="kitty +kitten icat" ;;
*) ;;
esac
All terminals work seamlessly with tmux:
# Auto-attach to tmux
if [[ -z "$TMUX" ]]; then
tmux attach || tmux new -s main
fi
| Issue | Solution |
|---|---|
| Colors wrong | Check $TERM and $COLORTERM variables |
| Icons missing | Install Nerd Font variant |
| Slow rendering | Check GPU acceleration settings |
| Theme not updating | Run theme command to force sync |
# Check terminal info
echo $TERM
echo $TERM_PROGRAM
echo $COLORTERM
# Check font rendering
echo -e "\ue0b0 \ue0b2 \uf113 \uf1d3"
# Check true color support
awk 'BEGIN{
for (i=0; i<256; i++) {
printf "\033[38;5;%dm%3d\033[0m ", i, i
if ((i+1)%16==0) print ""
}
}'
Pros:
Cons:
Best for: Users who prefer tmux for multiplexing
Pros:
Cons:
Best for: Users who want tmux features built into the terminal
Pros:
icat)Cons:
Best for: Users who need inline images or remote scripting