summaryrefslogtreecommitdiffstats
path: root/.tmux-osx.conf
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2022-05-31 13:50:19 +0200
committerAhmed Abdelhalim <[email protected]>2022-05-31 13:50:19 +0200
commit9d37b9b1fd73427b316d7034e8f7cdd296f6e1c6 (patch)
tree533c316e68f34bd146e3ebd1c45cf30ecd99442d /.tmux-osx.conf
parentcd592ccff93ecfa90b68e1538ab3af6091bb5d8e (diff)
Add mouse copy support to osx tmux
Diffstat (limited to '.tmux-osx.conf')
-rw-r--r--.tmux-osx.conf6
1 files changed, 5 insertions, 1 deletions
diff --git a/.tmux-osx.conf b/.tmux-osx.conf
index 27a3bde..37b0978 100644
--- a/.tmux-osx.conf
+++ b/.tmux-osx.conf
@@ -1,4 +1,8 @@
# Fix OSX tmux copy issues
# Ref: https://blog.subash.com.au/vim-style-copy-paste-in-tmux/
-set -g default-command "reattach-to-user-namespace -l ${SHELL}"
+set-option -g default-command "reattach-to-user-namespace -l ${SHELL}"
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
+
+# ensure clipboard off to allow mouse copy
+set-option -s set-clipboard off
+bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"