You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

58 lines
2.2 KiB

# Force colors for e.g. prompt
set-option -g default-terminal "screen-256color"
# Enumerate windows from 1
set -g base-index 1
# Renumber windows when one is closed to keep a gapless order
set-option -g renumber-windows on
# Lower escape-time in vim
# see https://github.com/neovim/neovim/wiki/FAQ#esc-in-tmux-or-gnu-screen-is-delayed
set -sg escape-time 0
# vim keys for switching between panes
bind-key -r k select-pane -U
bind-key -r j select-pane -D
bind-key -r h select-pane -L
bind-key -r l select-pane -R
# vim mode keys in copy-mode
set-window-option -g mode-keys vi
# start selection with v and end with y
## tmux <= 2.3
if-shell 'tmux -V | grep -Eq "tmux 2\.[0-3]"' " \
bind-key -t vi-copy 'v' begin-selection; \
bind-key -t vi-copy 'y' copy-selection; \
bind -t vi-copy y copy-pipe 'xclip -sel clip -i'; \
"
if-shell 'tmux -V | grep -Eq "tmux 2\.[4-9]"' " \
bind-key -T copy-mode-vi v send-keys -X begin-selection; \
bind-key -T copy-mode-vi y send-keys -X copy-selection; \
"
# bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i'
# Faster repeat time
set-option -g repeat-time 300
# Exit parent process when detaching from tmux
bind-key d detach-client -P
# Keep pwd for new splits
bind-key '"' split-window -v -c '#{pane_current_path}'
bind-key % split-window -h -c '#{pane_current_path}'
# Status line mirroring vim-airline with the bubblegum theme
## colour238: grey
## colour150: green
## colour110: blue
set-option -g status-style bg=colour238,fg=colour110
set-option -g message-style bg=colour238,fg=colour255
set-option -g status-left-length "80"
set-option -g status-left "#[bg=colour238,fg=colour110,bold,noitalics,nounderscore] #S "
set-option -g status-right "#[bg=colour110,fg=colour238,bold,noitalics,nounderscore] %Y-%m-%d %H:%M | #h "
set-window-option -g window-status-current-format "#[bg=colour110,fg=colour238,nobold,noitalics,nounderscore] #I:#W#{?window_zoomed_flag,*Z,} "
set-window-option -g window-status-format "#[bg=colour238,fg=colour110,nobold,noitalics,nounderscore] #I:#W#{?window_last_flag,-,} "
set-window-option -g window-status-separator ""
set-option -g pane-active-border-style fg=colour110
set-option -g pane-border-style fg=colour238