From 37cb52672822a10f5971ece5636ffd294c4d5194 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Fri, 18 Oct 2024 14:47:25 +0200 Subject: [PATCH] tmux: Unbind default DoubleClick bindings When switching to the 'SecondClick' event in 4b8e877305e4 ("tmux: Use SecondClick instead of DoubleClick event"), I forgot to add an `unbind` of the default binding that was previously overwritten. Since I just resourced my config I didn't notice. --- .config/tmux/tmux.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index abc1f81..e4ac745 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -28,16 +28,25 @@ bind -T copy-mode-vi MouseDragEnd1Pane { # Select word or line on double or triple click respectively (w/o aborting). # (These are the defaults w/o the `run -d 0.3; send -X copy-pipe-and-cancel`) + +# use 'SecondClick' event instead of 'DoubleClick' for a quicker response. The +# third click would just extend the selection further so the eager execution +# does not hurt. +unbind -T copy-mode-vi DoubleClick1Pane bind -T copy-mode-vi SecondClick1Pane { select-pane -t= send -X select-word send -X pipe-no-clear "xclip -selection primary" } + bind -T copy-mode-vi TripleClick1Pane { select-pane -t= send -X select-line send -X pipe-no-clear "xclip -selection primary" } + +# use 'SecondClick' event instead of 'DoubleClick' (see above). +unbind -n DoubleClick1Pane bind -n SecondClick1Pane { select-pane -t= if -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" { @@ -48,6 +57,7 @@ bind -n SecondClick1Pane { } send -X pipe-no-clear "xclip -selection primary" } + bind -n TripleClick1Pane { select-pane -t= if -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" {