2 files changed,
20 insertions(+),
16 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2026-06-09 12:58:44 +0300
Authored at:
2026-06-08 18:59:50 +0300
Parent:
b58d5ae
jump to
| M | config/tmux/tmux.conf |
| A | config/tmux/yank.tmux |
M
config/tmux/tmux.conf
··· 30 30 set -g prefix C-t 31 31 bind-key C-t send-prefix 32 32 33 -## vim all the way 34 33 set-window-option -g mode-keys vi 35 34 bind-key -T copy-mode-vi 'v' send -X begin-selection 36 35 bind-key -T copy-mode-vi 'y' send -X copy-selection 37 -unbind -T copy-mode-vi MouseDragEnd1Pane 38 36 39 -bind e run "tmux neww ~/bin/time.sh" 37 +bind e neww "~/bin/time.sh" 40 38 bind g run "~/bin/tmux-open-git.sh" 41 -bind R source-file ~/.config/tmux/tmux.conf \; display 'Reloaded tmux config' 39 +bind R source-file ~/.config/tmux/tmux.conf \; display 'Reloaded tmux config'; 40 +bind m choose-window "join-pane -t '%%'" 41 +bind / copy-mode; 42 +bind -r < swap-window -t -1 \; select-window -t -1; 43 +bind -r > swap-window -t +1 \; select-window -t +1; 42 44 unbind c; bind t new-window -c "#{pane_current_path}"; 43 -unbind <; bind < swap-window -t -1; 44 -unbind >; bind > swap-window -t +1; 45 -unbind x; bind w kill-pane; 46 45 unbind f; bind f resize-pane -Z; 47 46 unbind s; bind O choose-tree; 48 -unbind /; bind / copy-mode; 47 +unbind x; bind w kill-pane; 48 +unbind '"'; bind N split-window -v -c "#{pane_current_path}"; 49 +unbind '$'; bind C-r command-prompt -I "#S" "rename-session -- '%%'"; 49 50 unbind '%'; bind n split-window -h -c "#{pane_current_path}"; 50 -unbind '"'; bind N split-window -v -c "#{pane_current_path}"; 51 -unbind '$'; bind r command-prompt -I "#S" "rename-session -- '%%'"; 52 51 53 52 bind -n M-1 select-window -t 1 54 53 bind -n M-2 select-window -t 2 ··· 83 82 set -g status-right '' 84 83 # }}} 85 84 # plugins {{{ 86 -set -g @plugin 'tmux-plugins/tpm' 87 -set -g @plugin 'tmux-plugins/tmux-yank' 88 -set -g @plugin 'olexsmir/tmux-stare' 85 +source-file ~/.config/tmux/yank.tmux 89 86 90 87 set -g @stare-pick 'o' 91 88 set -g @stare-start 'pick' 92 - 93 -if "test ! -d ~/.config/tmux/plugins/tpm" "run 'git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm && ~/.config/tmux/plugins/tpm/bin/install_plugins'" 94 -run '~/.config/tmux/plugins/tpm/tpm' 89 +run ~/code/tmux-stare/stare.tmux 95 90 # }}}
A
config/tmux/yank.tmux
··· 1 +# tmux-yank replacement, yank to system clipboard from copy mode 2 + 3 +if-shell 'command -v wl-copy' 'set -g @_yank_cmd "wl-copy"' 4 +if-shell 'command -v pbcopy' 'set -g @_yank_cmd "pbcopy"' 5 +if-shell 'command -v xclip' 'set -g @_yank_cmd "xclip -selection clipboard"' 6 + 7 +bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "#{@_yank_cmd}" 8 +bind-key -T copy-mode-vi Y send -X copy-pipe-and-cancel "#{@_yank_cmd}" \; paste-buffer 9 +bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "#{@_yank_cmd}"