|
set-option -g status-position top
|
|
bind-key b set-option status
|
|
set -g focus-events on
|
|
set -g aggressive-resize on
|
|
set -s escape-time 0
|
|
|
|
set -g prefix C-b
|
|
|
|
set-option -g default-shell /usr/bin/fish
|
|
set-option -ga terminal-overrides ",*:Tc"
|
|
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
|
|
|
|
set-window-option -g mode-keys vi
|
|
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
|
|
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
|
|
|
|
bind -n S-left prev
|
|
bind -n S-right next
|
|
|
|
set -g status-interval 1
|
|
set -g status-justify centre # center align window list
|
|
set -g status-right ''
|
|
set -g status-left ''
|
|
|
|
# default statusbar colors
|
|
set -g status-fg white
|
|
set -g status-bg default
|
|
set -g status-style bright
|
|
|
|
# default window title colors
|
|
set-window-option -g window-status-style fg=white
|
|
set-window-option -g window-status-style bg=default
|
|
set-window-option -g window-status-style dim
|
|
|
|
# active window title colors
|
|
set-window-option -g window-status-current-style fg=white
|
|
set-window-option -g window-status-current-style bg=default
|
|
set-window-option -g window-status-current-style bright
|
|
|
|
# command/message line colors
|
|
set -g message-style fg=white
|
|
set -g message-style bg=black
|
|
set -g message-style bright
|
|
|
|
set-option -gw xterm-keys on
|
|
set-window-option -g xterm-keys on
|
|
|
|
setw -g mouse on
|
|
|
|
bind-key -T root PPage if-shell -F "#{alternate_on}" "send-keys PPage" "copy-mode -e; send-keys PPage"
|
|
bind-key -Tcopy-mode-vi PPage send -X page-up
|
|
bind-key -Tcopy-mode-vi NPage send -X page-down
|
|
set-option -g base-index 1
|
|
set-window-option -g pane-base-index 1
|
|
|
|
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
|
|
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
|
|
bind-key -Tcopy-mode-vi WheelUpPane send -X halfpage-up
|
|
bind-key -Tcopy-mode-vi WheelDownPane send -X halfpage-down
|
|
|
|
# Smart pane switching with awareness of vim splits
|
|
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
|
|
bind -n M-Left if-shell "$is_vim" "send-keys M-Left" "select-pane -L"
|
|
bind -n M-Down if-shell "$is_vim" "send-keys M-Down" "select-pane -D"
|
|
bind -n M-Up if-shell "$is_vim" "send-keys M-Up" "select-pane -U"
|
|
bind -n M-Right if-shell "$is_vim" "send-keys M-Right" "select-pane -R"
|
|
#bind -n M-\ if-shell "$is_vim" "send-keys M-\\" "select-pane -l"
|
|
|
|
# quick pane cycling
|
|
unbind ^B
|
|
bind ^B select-pane -t :.+
|
|
|
|
# Split windows like Vim.
|
|
bind v split-window -h
|
|
bind h split-window -v
|
|
|
|
# Plugins
|
|
|
|
set -g @plugin 'tmux/tpm'
|
|
set -g @plugin 'tmux-plugins/tmux-battery'
|
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
set -g @plugin 'tmux-plugins/tmux-copycat'
|
|
set -g @shell_mode 'vi'
|
|
set -g @plugin 'jimeh/tmux-themepack'
|
|
set -g @themepack 'powerline/block/cyan'
|
|
|
|
source "${HOME}/.tmux.powerline.conf"
|
|
|
|
run '~/.tmux/plugins/tpm/tpm'
|