tmux: Support mouse mode and copy to clipboard

This commit is contained in:
2026-05-05 08:41:32 +02:00
parent 6c93ca5052
commit 0062fbf550

View File

@@ -14,6 +14,14 @@ set -g default-terminal "tmux-256color"
set -g mouse on
bind-key -T prefix m set -g mouse\; display 'Mouse: #{?mouse,ON,OFF}'
# Copy to system clipboard
if-shell "uname | grep -q Darwin" \
'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"' \
'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"'
if-shell "uname | grep -q Darwin" \
'bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"' \
'bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"'
# Highlight pane with activity
setw -g monitor-activity on