67 lines
1.8 KiB
Bash
Executable file
67 lines
1.8 KiB
Bash
Executable file
# mouse
|
|
source-file ~/.tmux/themes/tmux-colorscheme.conf
|
|
setw -g mouse on
|
|
|
|
unbind C-b
|
|
set -g prefix C-a
|
|
|
|
set -g mode-keys vi
|
|
|
|
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
|
bind-key -T copy-mode-vi y send-keys -X copy-pipe "pbcopy"
|
|
|
|
# set -g default-terminal tmux-256color
|
|
set -g default-terminal xterm-256color
|
|
set -sa terminal-features ',alacritty:RGB'
|
|
set -ga terminal-overrides ",*256col*:Tc"
|
|
|
|
# reset gpg-agent password cache after close the pane (vimwiki diary)
|
|
set-hook -g window-unlinked 'run-shell "gpgconf --reload gpg-agent"'
|
|
|
|
# pane navigation
|
|
# bind -n M-h select-pane -L
|
|
# bind -n M-j select-pane -D
|
|
# bind -n M-k select-pane -U
|
|
# bind -n M-l select-pane -R
|
|
|
|
# windows
|
|
bind -n M-t new-window
|
|
bind -n M-X kill-window
|
|
bind -n M-n next-window
|
|
bind -n M-p last-window
|
|
bind -n M-e split-window -v -c '#{pane_current_path}'
|
|
bind -n M-d split-window -h -c '#{pane_current_path}'
|
|
bind -n M-W kill-pane
|
|
# resize to bottom
|
|
bind -n M-j resize-pane -D 5
|
|
bind -n M-k resize-pane -U 5
|
|
|
|
# Automatic restore
|
|
# set -g @continuum-restore 'on'
|
|
# set -g @resurrect-capture-pane-contents 'on'
|
|
#set -g @resurrect-processes ''
|
|
|
|
# very unique Mac bug
|
|
if-shell "type 'reattach-to-user-namespace' >/dev/null" "set -g default-command 'reattach-to-user-namespace -l $SHELL'"
|
|
|
|
# set -g status-style "fg=#665c54"
|
|
# set -g status-bg default
|
|
set -g status-position top
|
|
# set -g status-interval 1
|
|
# set -g status-left ""
|
|
|
|
# disable status
|
|
#set -g status off
|
|
set -g status on
|
|
|
|
# plugins
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'tmux-plugins/tmux-battery'
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
# set -g @plugin 'tmux-plugins/tmux-resurrect'
|
|
# set -g @plugin 'tmux-plugins/tmux-continuum'
|
|
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
|
|
set -g @plugin 'christoomey/vim-tmux-navigator'
|
|
|
|
run '~/.tmux/plugins/tpm/tpm'
|
|
|