From 84528f514c855ff60af03c122211ae95cc46f162 Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Sat, 28 Oct 2023 12:49:25 -0400 Subject: [PATCH] Fixed tmux to work with OSC 52 --- .tmux/tmux.conf | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/.tmux/tmux.conf b/.tmux/tmux.conf index 17f732e..b39931c 100644 --- a/.tmux/tmux.conf +++ b/.tmux/tmux.conf @@ -2,9 +2,10 @@ # === General Settings === # ========================== -set-option -sa terminal-overrides ",$TERM:RGB" -set-option -ga terminal-overrides ",$TERM:Tc" -set -g default-terminal "screen-256color" +#set-option -sa terminal-overrides ",$TERM:RGB" +#set-option -ga terminal-overrides ",$TERM:Tc" +#set -g default-terminal "screen-256color" +#set -g default-terminal "tmux-256color" set -g history-limit 5000 set -g buffer-limit 20 set -sg escape-time 10 @@ -72,7 +73,10 @@ bind X confirm-before -p "kill-window #W? (y/n)" kill-window # ================================================ # === Copy mode, scroll and clipboard === # ================================================ -set -g @copy_use_osc52_fallback off +#set -g @copy_use_osc52_fallback off +set -s set-clipboard on +#set -as terminal-features ',screen-256color:clipboard' +set -sa terminal-features ",alacritty*:256:RGB:bpaste:clipboard:mouse:strikethrough:title:ccolour:cstyle:focus:overline:usstyle:hyperlinks:sync" # Prefer vi style key table setw -g mode-keys vi @@ -85,26 +89,27 @@ bind C-p choose-buffer yank="~/.tmux/yank.sh" -# Copy selected text -bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "$yank" -bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "$yank" -#bind -T copy-mode-vi Y send-keys -X copy-line \;\ +# Copy selected text (removed for testing) +#bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "$yank" +#bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "$yank" +##bind -T copy-mode-vi Y send-keys -X copy-line \;\ +## run "tmux save-buffer - | $yank" +#bind -T copy-mode-vi Y send-keys -X copy-pipe-and-cancel "$yank; tmux paste-buffer" +#bind -T copy-mode-vi C-j send-keys -X copy-pipe-and-cancel "$yank" +#bind-key -T copy-mode-vi D send-keys -X copy-end-of-line \;\ +# run "tmux save-buffer - | $yank" +#bind-key -T copy-mode-vi A send-keys -X append-selection-and-cancel \;\ # run "tmux save-buffer - | $yank" -bind -T copy-mode-vi Y send-keys -X copy-pipe-and-cancel "$yank; tmux paste-buffer" -bind -T copy-mode-vi C-j send-keys -X copy-pipe-and-cancel "$yank" -bind-key -T copy-mode-vi D send-keys -X copy-end-of-line \;\ - run "tmux save-buffer - | $yank" -bind-key -T copy-mode-vi A send-keys -X append-selection-and-cancel \;\ - run "tmux save-buffer - | $yank" -# Copy selection on drag end event, but do not cancel copy mode and do not clear selection -# clear select on subsequence mouse click -#bind -T copy-mode-vi MouseDragEnd1Pane \ -# send-keys -X copy-pipe "$yank" -unbind -T copy-mode-vi MouseDragEnd1Pane -bind -T copy-mode-vi MouseDown1Pane select-pane \;\ - send-keys -X copy-pipe "$yank" \;\ - send-keys -X clear-selection +## Copy selection on drag end event, but do not cancel copy mode and do not clear selection +## clear select on subsequence mouse click +##bind -T copy-mode-vi MouseDragEnd1Pane \ +## send-keys -X copy-pipe "$yank" +#unbind -T copy-mode-vi MouseDragEnd1Pane +#bind -T copy-mode-vi MouseDown1Pane select-pane \;\ +# send-keys -X copy-pipe "$yank" \;\ +# send-keys -X clear-selection +# End (removed for testing) Section set -g bell-action any