From: Stefan Huber Date: Fri, 26 Jul 2024 07:27:39 +0000 (+0200) Subject: tmux: Fire dragon on double click X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=8ac4a1dca2f3649a4c2840d5dc8fc561590da2f8;p=shutils.git tmux: Fire dragon on double click --- 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"