refactor: dissolve the agent-deck tmux block
CI / lint (push) Successful in 30s
CI / eval (push) Successful in 1m59s

The block came from the agent-deck installer and was carried in wholesale
when the config was ported to nix. The tool is not installed on any host
and nothing else references it, and now that the file is rendered
read-only from the nix store the installer could not update its own block
anyway.

It re-declared default-terminal, history-limit and mouse at their existing
values, and escape-time at 0 — which quietly overrode the deliberate 25ms
two sections above it, along with the comment explaining that 0 breaks Alt
keys over SSH. Keeps the parts that do real work: the alternate-screen
override, extended keys, and the mouse scroll and drag-to-copy bindings.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Miguel Palhas
2026-08-18 08:17:45 +01:00
parent d417a27f2d
commit 05037e40d8
+26 -39
View File
@@ -22,6 +22,15 @@ set -s escape-time 25
# Enable 256 colors
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
set -ag terminal-overrides ",*256col*:Tc"
# smcup@/rmcup@ drops the alternate screen, so what tmux drew stays in the
# outer terminal's scrollback instead of vanishing when tmux exits.
set -ag terminal-overrides ",xterm*:Tc:smcup@:rmcup@"
# Forward Shift+Enter and other modified keys through to applications
set -s extended-keys on
set -as terminal-features "tmux-256color:extkeys"
# -------------------------------------------------------------------
# Status bar theme
@@ -115,6 +124,23 @@ set -ag terminal-features ",xterm-256color:clipboard"
# Let nvim's OSC 52 provider reach the outer terminal through tmux.
set -g allow-passthrough on
# Drag-to-copy. No external command: set-clipboard routes this through
# OSC 52, which works on Wayland and over SSH. xclip did neither.
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
# -------------------------------------------------------------------
# Mouse scrolling
# -------------------------------------------------------------------
# Scrolling up enters copy-mode, unless the pane's application wants the
# mouse itself or we are already in copy-mode.
bind-key -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
bind-key -T copy-mode-vi WheelUpPane send-keys -X scroll-up
bind-key -T copy-mode-vi WheelDownPane send-keys -X scroll-down
bind-key -T copy-mode WheelUpPane send-keys -X scroll-up
bind-key -T copy-mode WheelDownPane send-keys -X scroll-down
# tmux-resurrect settings
set -g @resurrect-capture-pane-contents 'on'
@@ -123,42 +149,3 @@ set -g @resurrect-strategy-nvim 'session'
# tmux-continuum settings (auto-save and auto-restore)
set -g @continuum-restore 'on'
set -g @continuum-save-interval '10'
# agent-deck configuration
# agent-deck-tmux-config-version: 3
# Added by agent-deck installer - 2026-03-18
# https://github.com/asheshgoplani/agent-deck
# Terminal with true color support
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm*:Tc:smcup@:rmcup@"
set -ag terminal-overrides ",*256col*:Tc"
# Performance
set -sg escape-time 0
set -g history-limit 50000
# Extended keys: forward Shift+Enter and other modified keys to apps (tmux 3.2+)
set -s extended-keys on
set -as terminal-features 'tmux-256color:extkeys'
# Mouse support (scroll + drag-to-copy)
set -g mouse on
# Auto-enter copy-mode when scrolling up (critical for WSL compatibility)
# This handles: 1) apps with mouse support, 2) already in copy-mode, 3) normal pane
bind-key -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
# Scroll bindings in copy-mode (both vi and emacs modes)
bind-key -T copy-mode-vi WheelUpPane send-keys -X scroll-up
bind-key -T copy-mode-vi WheelDownPane send-keys -X scroll-down
bind-key -T copy-mode WheelUpPane send-keys -X scroll-up
bind-key -T copy-mode WheelDownPane send-keys -X scroll-down
# Clipboard integration (drag-to-copy). No external command: set-clipboard
# above routes this through OSC 52, which works on Wayland and over SSH.
# xclip did neither.
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
# End agent-deck configuration