From 6188583ee9ca7a79f484e77b285e86b04743c6e4 Mon Sep 17 00:00:00 2001 From: dissimulo Date: Wed, 6 May 2026 09:37:20 +0000 Subject: [PATCH] tmux: enable truecolor + focus-events for TUI apps - Switch default-terminal from screen-256color to tmux-256color (better italics/undercurl/SGR support for nvim, Claude Code, etc.) - Add terminal-features RGB for the common outer terminals so truecolor escape sequences pass through cleanly - Enable focus-events so inner programs can redraw when the pane regains focus --- .tmux.conf | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.tmux.conf b/.tmux.conf index 785a9352..072917a6 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -2,7 +2,20 @@ set -g bell-action any # Default termtype. If the rcfile sets $TERM, that overrides this value. -set -g default-terminal screen-256color +set -g default-terminal "tmux-256color" + +# Truecolor + clipboard passthrough for outer terminals that advertise RGB +# (covers xterm-*, alacritty, kitty, wezterm, iTerm, ghostty, modern Apple Terminal). +set -ga terminal-features ",xterm-256color:RGB" +set -ga terminal-features ",alacritty:RGB" +set -ga terminal-features ",kitty:RGB" +set -ga terminal-features ",wezterm:RGB" +set -ga terminal-features ",ghostty:RGB" +set -ga terminal-features ",screen-256color:RGB" + +# TUI apps (Claude Code, nvim, etc.) want focus events so they can redraw +# / refresh state when the pane regains focus. +set -g focus-events on # Keep your finger on ctrl, or don't bind-key ^D detach-client