From 8badfdb9b8c0f4335417c4d6f91464e7511781a0 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Fri, 10 Jul 2026 19:10:41 -0700 Subject: [PATCH] Fix copy-paste in tmux --- config/tmux.conf | 9 +++++++++ packages/arch.global | 2 ++ 2 files changed, 11 insertions(+) diff --git a/config/tmux.conf b/config/tmux.conf index d361900..bacf2d6 100644 --- a/config/tmux.conf +++ b/config/tmux.conf @@ -58,6 +58,15 @@ bind C-y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy' # option, so only set it when the running tmux is new enough. if-shell "tmux -V | awk '{print $2}' | awk -F. '{if ($1*1000+$2 >= 3003) exit 0; else exit 1}'" 'set -g allow-passthrough on' +# Also make tmux's own copies (mouse-drag select in copy-mode, prefix-[ y, +# etc.) reach the real system CLIPBOARD via OSC 52 -- not just PRIMARY/ +# middle-click -- by declaring the "Ms" (set-clipboard) terminfo capability +# tmux needs to emit the escape sequence itself, then telling tmux to use it. +# "external" only ever writes; it never asks the terminal to reply, so this +# can't hang the way an OSC 52 read query can. +set -as terminal-overrides ',*:Ms=\E]52;c;%p2%s\007' +set -g set-clipboard external + # tmux renamed the copy-mode key table (vi-copy -> copy-mode-vi) and changed # bind-key's table flag (-t -> -T) in 2.4. Source the file matching the # running tmux so old tmux never parses syntax it doesn't understand. diff --git a/packages/arch.global b/packages/arch.global index 903b71b..660339f 100644 --- a/packages/arch.global +++ b/packages/arch.global @@ -24,6 +24,8 @@ thefuck tree arandr nodejs +tree-sitter-cli +shellcheck # zsh shell instead of bash zsh