114 lines
3.1 KiB
Bash
114 lines
3.1 KiB
Bash
set -g default-terminal screen-256color
|
|
|
|
#remove escape delay
|
|
set -s escape-time 0
|
|
|
|
#history limit
|
|
set-option -g history-limit 5000
|
|
|
|
#change C-b to Ca
|
|
unbind C-b
|
|
set-option -g prefix C-a
|
|
#bind-key C-t send-prefix
|
|
bind-key -n C-s send-prefix
|
|
|
|
# split panes using | and -
|
|
bind | split-window -h -c '#{pane_current_path}'
|
|
bind - split-window -v -c '#{pane_current_path}'
|
|
unbind '"'
|
|
unbind %
|
|
|
|
# new windows opened using current path
|
|
bind c new-window -c '#{pane_current_path}'
|
|
|
|
# stop tmux from renaming the window every time you run a command
|
|
set-option -g allow-rename off
|
|
|
|
# select panes with vim keys
|
|
bind h select-pane -L
|
|
bind j select-pane -D
|
|
bind k select-pane -U
|
|
bind l select-pane -R
|
|
|
|
## page up/down
|
|
bind-key -n C-PageUp copy-mode -u
|
|
bind-key -n C-PageDown copy-mode
|
|
bind-key -T copy-mode C-PageUp send-keys -X page-up
|
|
bind-key -T copy-mode C-PageDown send-keys -X page-down
|
|
|
|
|
|
#join window
|
|
bind-key @ command-prompt -p "create pane from:" "join-pane -s ':%%'"
|
|
|
|
# change base from 0 to 1 for reachability
|
|
set -g base-index 1
|
|
|
|
# set vi modes
|
|
set -g status-keys vi
|
|
set -g mode-keys vi
|
|
|
|
# enable mouse control (click wind, panes, resizable panes) - as of tmux 2.1
|
|
# copy/paste: shift+left click to highlight, then shift+middle to past
|
|
## tmux < 2.1
|
|
#set -g mode-mouse on; set -g mouse-resize-pane on; set -g mouse-select-pane on; set -g mouse-select-window on
|
|
## tmux >= 2.1
|
|
#set -g mouse on
|
|
|
|
bind-key Tab last-window
|
|
bind-key BTab previous-window
|
|
|
|
# prefix-r to reload tmux config
|
|
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
|
|
|
|
###
|
|
### Status Bar Configuration
|
|
###
|
|
|
|
## Basic status bar colors
|
|
set-option -g status-bg default
|
|
set-option -g status-fg white
|
|
|
|
## Left side of status bar
|
|
#set-option -g status-left-length 40
|
|
#set-option -g status-left "#[fg=colour18,bg=colour12] #S #[fg=default,bg=default] "
|
|
|
|
## Window status
|
|
#set-option -g window-status-format "#[fg=colour18,bg=brightblack] #I #[fg=white,bg=black] #W "
|
|
#set-option -g window-status-current-format "#[fg=colour18,bg=colour7] #I #[fg=colour18,bg=colour4] #W "
|
|
#set-option -g window-status-separator " "
|
|
#set-option -g status-justify left
|
|
|
|
## Right side of status bar
|
|
#set-option -g status-right-length 40
|
|
### includes the time in the right status
|
|
##set-option -g status-right " #[fg=brightwhite,bg=black] %a, %d %b %H:%M #[fg=colour18,bg=colour4] #(whoami)@#h "
|
|
#set-option -g status-right " #[fg=colour18,bg=colour4] #(whoami)@#h "
|
|
|
|
###
|
|
### End Status Bar Configuration
|
|
###
|
|
|
|
# Pane border
|
|
#set-option -g pane-border-style bg=brightblack,fg=brightblack
|
|
set-option -g pane-border-style fg=colour238,bg=default
|
|
#set-option -g pane-active-border-style bg=default,fg=white
|
|
set-option -g pane-active-border-style fg=colour4,bg=default
|
|
|
|
# Pane number indicator
|
|
set-option -g display-panes-colour brightblack
|
|
set-option -g display-panes-active-colour brightwhite
|
|
|
|
# Clock mode
|
|
set-option -g clock-mode-colour white
|
|
set-option -g clock-mode-style 24
|
|
|
|
###########
|
|
# PLUGINS #
|
|
###########
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
|
set -g @plugin 'tmux-plugins/tmux-urlview'
|
|
|
|
run '~/.tmux/plugins/tpm/tpm'
|