summaryrefslogtreecommitdiff
path: root/tmux
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2026-08-13 18:28:02 -0400
committerMatt Turner <mattst88@gmail.com>2026-11-08 14:07:17 -0500
commit79a4188fe347b5b159812b0fc90f96e1859c5247 (patch)
treef0bdc11a4b7578e82b1446549be72e3f943cbcbf /tmux
parente24e72d72804e4141386ee497e496751d7520f47 (diff)
tmux: hardcode default-terminal and default-shell
"${TERM}" and "${SHELL}" expand from the tmux server's environment when the server starts, not from the attaching client. A server started without TERM set (systemd unit, ssh -T, a script) leaves default-terminal empty, so every pane gets an empty TERM and curses programs like top fail, both locally and over ssh. default-terminal should also describe what tmux emulates rather than the outer terminal, so use tmux-256color and declare RGB support via terminal-features instead of the legacy Tc override.
Diffstat (limited to 'tmux')
-rw-r--r--tmux/.config/tmux/tmux.conf11
1 files changed, 8 insertions, 3 deletions
diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf
index 890f183..1128e08 100644
--- a/tmux/.config/tmux/tmux.conf
+++ b/tmux/.config/tmux/tmux.conf
@@ -1,5 +1,6 @@
-set-option -ga terminal-overrides ',xterm-256color:Tc'
set-option -sa terminal-features ',linux:RGB'
+set-option -sa terminal-features ',xterm-256color:RGB'
+set-option -sa terminal-features ',xterm-kitty:RGB'
unbind-key C-b
bind-key C-a send-prefix
@@ -10,8 +11,12 @@ set -g escape-time 0 # zero-out escape time delay
set -g history-limit 1000000 # increase history size (from 2,000)
set -g renumber-windows on # renumber all windows when any window is closed
set -g set-clipboard on # use system clipboard
-set -g default-terminal "${TERM}"
-set -g default-shell /bin/zsh
+# Don't use "${TERM}"/"${SHELL}": these expand from the tmux *server's*
+# environment when the server starts. A server started without TERM set
+# (systemd unit, ssh -T, script) leaves default-terminal empty, so every pane
+# gets an empty TERM and curses programs fail, locally and over ssh.
+set -g default-terminal "tmux-256color"
+set -g default-shell "/bin/zsh"
set -g focus-events on
set -g mouse
set -g pane-active-border-style 'fg=magenta,bg=default'