From b34a46838767c88de394ab785d1162082593f3cf Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sat, 21 Jan 2023 09:21:47 +0800 Subject: Use wl-copy as tmux copy-command I am mainly using Linux as my daily operating system. But I may need to change it to if-else logic someday. --- .tmux.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '.tmux.conf') diff --git a/.tmux.conf b/.tmux.conf index c795ac1..b7961ec 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -55,9 +55,11 @@ bind > resize-pane -R 5 bind - resize-pane -D 5 bind + resize-pane -U 5 +set -s copy-command 'wl-copy' # copy and paste like vim - bind -T copy-mode-vi 'v' send -X begin-selection - bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" +bind -T copy-mode-vi 'v' send -X begin-selection +bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace wl-copy" +bind P paste-buffer if-shell 'test -f "$HOME/.local/.tmux.conf"' 'source ~/.local/.tmux.conf' -- cgit v1.2.3