Sync with the system clipboard instead of needing to manually do it using xclip (which also only works on x11)

This commit is contained in:
Kevin MacMartin 2024-02-26 17:40:51 -05:00
parent eb3237dbe4
commit d56c786a4a
2 changed files with 6 additions and 8 deletions

View File

@ -44,6 +44,9 @@ set-window-option -g visual-activity off #show the activity being monitored for
set-window-option -g xterm-keys on #generate xterm-style function key sequences for better compatibility
set-window-option -g mode-keys vi #use vi-style keys in copy and choice modes
#
# clipboard (sync with the system)
set -s set-clipboard external
#
# mouse
set-option -g mouse on
bind -T root MouseDown3Pane send-keys -M #send right clicks to the application below
@ -109,10 +112,6 @@ bind / list-commands
bind y copy-mode
bind C-p paste-buffer
#
# C-v and C-y to paste the X buffer, or copy the tmux buffer into X
bind C-v run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
bind C-y run "tmux show-buffer | xclip -sel clip"
#
# (copy mode) v,y and escape to select, copy and cancel respectively
bind -Tcopy-mode-vi y send -X copy-selection
bind -Tcopy-mode-vi v send -X begin-selection

View File

@ -44,6 +44,9 @@ set-window-option -g visual-activity off #show the activity being monitored for
set-window-option -g xterm-keys on #generate xterm-style function key sequences for better compatibility
set-window-option -g mode-keys vi #use vi-style keys in copy and choice modes
#
# clipboard (sync with the system)
set -s set-clipboard external
#
# mouse
set-option -g mouse on
bind -T root MouseDown3Pane send-keys -M #send right clicks to the application below
@ -109,10 +112,6 @@ bind / list-commands
bind y copy-mode
bind C-p paste-buffer
#
# C-v and C-y to paste the X buffer, or copy the tmux buffer into X
bind C-v run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
bind C-y run "tmux show-buffer | xclip -sel clip"
#
# (copy mode) v,y and escape to select, copy and cancel respectively
bind -Tcopy-mode-vi y send -X copy-selection
bind -Tcopy-mode-vi v send -X begin-selection