dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | README | LICENSE

commit 2321a97ccd1be177414f5e29b0c3b1fe1d711126 (patch)
parent 00941dcff8ff0ef0f0137467a42b1d6e2cd43390
Author: Alex Karle <alex@alexkarle.com>
Date:   Thu, 24 Mar 2022 23:57:16 -0400

tmux: Add plumb-on-right-click support

This was a doozy to write (and I'm sure it can be done better), but
it seems to be working and I'm happy with the outcome!

It's not quite acme(1) but it'll do!

Diffstat:
M.tmux.conf | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/.tmux.conf b/.tmux.conf @@ -11,9 +11,18 @@ unbind-key C-b bind-key C-a send-prefix # plumber! `a` in copy-mode sends to the 'plumb' command (A/Enter splits in new window) +# right-click also opens in the current window (a la Acme) bind-key -T copy-mode-vi a send-keys -X copy-pipe-no-clear "plumb #{pane_current_path}" bind-key -T copy-mode-vi A send-keys -X copy-pipe-no-clear "plumb -w #{pane_current_path}" bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-no-clear "plumb -w #{pane_current_path}" +bind-key -T root MouseDown3Pane \ + select-pane \; copy-mode -M \; send-keys -X begin-selection \; \ + send-keys -X previous-space \; send-keys -X other-end \; send-keys -X next-space-end \; \ + send-keys -X copy-pipe-and-cancel "plumb #{pane_current_path}" +bind-key -T copy-mode-vi MouseDown3Pane \ + select-pane \; copy-mode -M \; send-keys -X begin-selection \; \ + send-keys -X previous-space \; send-keys -X other-end \; send-keys -X next-space-end \; \ + send-keys -X copy-pipe-and-cancel "plumb #{pane_current_path}" # Less delay on pressing escape (for vim) set-option -sg escape-time 10