# Options set -g mouse on # I know, I'm a monster set -g default-shell $SHELL # Start windows and panes at 1, not 0 set -g base-index 1 setw -g pane-base-index 1 setw -g mode-keys vi set-option -s set-clipboard off # Bindings unbind-key C-b set -g prefix M-w bind-key % split-window -h -c "#{pane_current_path}" bind-key '"' split-window -v -c "#{pane_current_path}" bind-key C-v split-window -h -c "#{pane_current_path}" bind-key C-h split-window -v -c "#{pane_current_path}" bind-key C-n new-window -c "#{pane_current_path}" # vim like pane swap bind-key C-r swap-pane -D unbind-key C bind-key W command-prompt 'rename-window %%' bind-key S command-prompt 'rename-session %%' bind-key Q kill-server bind-key K kill-session -a bind-key C kill-window # bind y run -b "tmux show-buffer | xclip -selection c > /dev/null" # https://www.rockyourcode.com/copy-and-paste-in-tmux/ bind P paste-buffer bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -se c -i' unbind -T copy-mode-vi Enter bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'xclip -se c -i' bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -se c -i'