tmux/tmux.conf
2024-06-06 01:21:42 -05:00

40 lines
1.1 KiB
Bash

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-capture-pane-contents 'on'
run '~/.tmux/plugins/tpm/tpm'
# set terminal colors to 24-bit
set-option -sa terminal-overrides ",xterm*:Tc"
set-option -g default-shell /bin/zsh
set-window-option -g mode-keys vi
# copy mode and clipboard
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind-key v copy-mode
set -g set-clipboard on
set -as terminal-feature ',*:clipboard'
set -s copy-command 'xsel -i -b'
# vim style pane
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind M-h resize-pane -L 10
bind M-j resize-pane -D 10
bind M-k resize-pane -U 10
bind M-l resize-pane -R 10
# open new panes/windows in current path
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"