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}}" {