From 8ac4a1dca2f3649a4c2840d5dc8fc561590da2f8 Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Fri, 26 Jul 2024 09:27:39 +0200 Subject: [PATCH] tmux: Fire dragon on double click --- dotfiles/tmux/.tmux.conf | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/dotfiles/tmux/.tmux.conf b/dotfiles/tmux/.tmux.conf index 69be6d4..d6c5773 100644 --- a/dotfiles/tmux/.tmux.conf +++ b/dotfiles/tmux/.tmux.conf @@ -8,16 +8,23 @@ set-window-option -g xterm-keys on # Pass escape immediately to vim set -sg escape-time 0 +# Default word-separators are: "!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~" +# Remove some characters to have sane {mouse_word} on filenames +set-window-option -g word-separators "!\"#$%&'()*+,:;<=>?@[\\]^`{|}~" + # Copy to X11 clipboard -bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' +bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' + +# Fire drag&drop for files +bind-key -n DoubleClick1Pane run-shell -c '#{pane_current_path}' "dragon -x '#{mouse_word}'" -bind-key m set-option -g mouse on \; display 'Mouse: ON' -bind-key M set-option -g mouse off \; display 'Mouse: OFF' +bind-key m "set-option -g mouse on \; display 'Mouse: ON'" +bind-key M "set-option -g mouse off \; display 'Mouse: OFF'" # Let split et alii use the pane's current path as current path of the new pane -bind '"' split-window -c "#{pane_current_path}" -bind % split-window -h -c "#{pane_current_path}" -bind c new-window -c "#{pane_current_path}" +bind-key '"' split-window -c "#{pane_current_path}" +bind-key % split-window -h -c "#{pane_current_path}" +bind-key c new-window -c "#{pane_current_path}" # Pass home and end keys bind-key -n Home send Escape "OH" -- 2.39.5