run-shell ~/soft-git/tmux-onedark-theme/tmux-onedark-theme.tmux
set -g @onedark_widgets "name"
set -g @onedark_time_format "%I:%M "
set -g @onedark_date_format "%m/%d"
#set-option -g default-terminal "screen-256color"
#set -g default-terminal "screen-256color"
set-option -g status-position bottom
# 自动保存会话
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-save-interval '15'
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on'
run '~/.tmux/plugins/tpm/tpm'
run-shell ~/.tmux/plugins/tmux-resurrect/resurrect.tmux
# 解除默认前缀
unbind C-b
# 设置自定义前缀 ctrl+f
set -g prefix C-f
# 采用vim的操作方式
setw -g mode-keys vi
# 窗口序号从1开始计数
set -g base-index 1
# 开启鼠标模式
set-option -g mouse on
# 通过前缀+KJHL快速切换pane
#up
bind-key k select-pane -U
#down
bind-key j select-pane -D
#left
bind-key h select-pane -L
#right
bind-key l select-pane -R
# Shift + 左右键盘切换窗口
bind -n S-Left previous-window
bind -n S-Right next-window
# Set easier window split keys
bind-key v split-window -h
bind-key h split-window -v
# Alt-arrow 切换pane
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Easy config reload
bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded"
网友评论