mirror of https://github.com/zoomiti/dotfiles.git
71 lines
2.5 KiB
Plaintext
71 lines
2.5 KiB
Plaintext
unbind r
|
|
bind r source-file ~/.tmux.conf
|
|
|
|
unbind C-b
|
|
set -g prefix C-s
|
|
|
|
set -g mouse on
|
|
|
|
# act like vim
|
|
setw -g mode-keys vi
|
|
|
|
# Start windows and panes at 1, not 0
|
|
set -g base-index 1
|
|
set -g pane-base-index 1
|
|
|
|
# Renumber windows when a window is closed
|
|
set -g renumber-windows on
|
|
|
|
# Status Line
|
|
set-option -g status-position top
|
|
set -g status-bg black
|
|
set -g status-fg white
|
|
set -g status-left-length 0
|
|
set -g status-right-length 0
|
|
set -g pane-border-style fg=brightblack
|
|
set -g pane-active-border-style fg=yellow
|
|
set -g message-style bg=yellow,fg=black,bold
|
|
|
|
# Left side - yellow section with session, transition to gray
|
|
set -g status-left "#[fg=black,bg=brightblue,bold]#{?client_prefix, PREFIX,#[fg=black,bg=yellow,bold] NORMAL} #[fg=black,bg=white] #S "
|
|
|
|
# Right side
|
|
set -g status-right "#(whoami)@#h #{?client_utf8,| utf-8,} #[fg=black,bg=white] %I:%M %p | %b %d #[fg=black,bg=brightblue]#{?client_prefix,,#[fg=black,bg=yellow,bold]} #I:#P "
|
|
|
|
# Window list in the gray middle section
|
|
set -g window-status-format " #I #W "
|
|
set -g window-status-current-format "#[fg=brightblue,bg=black,bold]#{?client_prefix,,#[fg=yellow,bg=black,bold]}[#I #W]"
|
|
set -g window-status-separator ""
|
|
|
|
|
|
# Smart pane switching with awareness of Vim splits.
|
|
# See: https://github.com/christoomey/vim-tmux-navigator
|
|
|
|
# decide whether we're in a Vim process
|
|
# is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
|
# | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
|
#
|
|
# bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
|
|
# bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
|
|
# bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
|
|
# bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
|
|
#
|
|
# tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
|
|
#
|
|
# if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
|
|
# "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
|
|
# if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
|
|
# "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
|
|
#
|
|
# bind-key -T copy-mode-vi 'C-h' select-pane -L
|
|
# bind-key -T copy-mode-vi 'C-j' select-pane -D
|
|
# bind-key -T copy-mode-vi 'C-k' select-pane -U
|
|
# bind-key -T copy-mode-vi 'C-l' select-pane -R
|
|
|
|
# List of plugins
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'christoomey/vim-tmux-navigator'
|
|
|
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
|
run '~/.tmux/plugins/tpm/tpm'
|