Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dot_tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ bind -T copy-mode-vi v send -X begin-selection

# Clipboard integration:
# - Local (macOS): use pbcopy directly for reliable clipboard access
# - Remote (SSH): use OSC 52 escape sequence to copy through terminal
# - Remote (SSH): rely on tmux native OSC 52 via set-clipboard external + terminal-features
if-shell '[ -z "$SSH_TTY" ]' \
'bind -T copy-mode-vi y send -X copy-pipe-and-cancel "pbcopy"; \
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy"'

if-shell '[ -n "$SSH_TTY" ]' \
'bind -T copy-mode-vi y send -X copy-pipe-and-cancel "base64 | xargs -I {} printf \"\\033]52;c;%s\\007\" {} > /dev/tty"; \
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "base64 | xargs -I {} printf \"\\033]52;c;%s\\007\" {} > /dev/tty"'
'bind -T copy-mode-vi y send -X copy-selection-and-cancel; \
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel'

# OSC 52 / passthrough settings (required for nested tmux over SSH)
# Local (outer) tmux: set-clipboard on (processes OSC 52 and forwards to terminal)
Expand Down