-
Notifications
You must be signed in to change notification settings - Fork 2
/
dot_tmux-freebsd.conf
22 lines (17 loc) · 1.05 KB
/
dot_tmux-freebsd.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# tmux 2.4
# https://github.com/tmux/tmux/issues/599#issuecomment-255842199
bind -T copy-mode-vi Enter send -X copy-pipe-and-cancel "xclip -i -sel p -f | xclip -i -sel c" \; display-message "Copied to system clipboard."
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "xclip -i -sel p -f | xclip -i -sel c" \; display-message "Copied to system clipboard."
# Toggle rectangular copy mode.
bind -T copy-mode-vi 'v' send-keys -X rectangle-toggle
# Bind ']' to paste.
bind ] run "tmux set-buffer \"$(xclip -o -sel clipboard)\" && tmux paste-buffer"
# Because the Gnome Terminal on Ubuntu is broken: http://askubuntu.com/a/507215/413683
set -s set-clipboard off
# Copy on selection (without any additional keystrokes). This behaviour is the
# default one of iTerm2 on macOS.
# http://unix.stackexchange.com/q/348913/128489
# http://stackoverflow.com/a/40902312/4694621
# Requires: set-option -s set-clipboard off
# tmux 2.3 and higher might require a different command:
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -selection clipboard -i'