35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
# Settings
|
|
set -g default-terminal "xterm-256color"
|
|
set -ag terminal-overrides ",xterm-256color:RGB"
|
|
setw -g monitor-activity on
|
|
setw -g aggressive-resize on
|
|
setw -g automatic-rename on
|
|
set -s escape-time 0
|
|
set-window-option -g xterm-keys on
|
|
|
|
# Change leader
|
|
unbind C-b
|
|
set -g prefix C-a
|
|
|
|
# Improve navigation between tmux and nvim
|
|
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
|
|
bind -n M-h if-shell "$is_vim" "send-keys M-h" "select-pane -L"
|
|
bind -n M-j if-shell "$is_vim" "send-keys M-j" "select-pane -D"
|
|
bind -n M-k if-shell "$is_vim" "send-keys M-k" "select-pane -U"
|
|
bind -n M-l if-shell "$is_vim" "send-keys M-l" "select-pane -R"
|
|
|
|
# Custom keybinds
|
|
bind '"' split-window -c "#{pane_current_path}"
|
|
bind % split-window -h -c "#{pane_current_path}"
|
|
bind -n C-j new-window -c "#{pane_current_path}"
|
|
bind -n C-h prev
|
|
bind -n C-l next
|
|
bind -n C-M-l swap-window -t +1 \; next
|
|
bind -n C-M-h swap-window -t -1 \; prev
|
|
|
|
# Keybind for reloading config
|
|
bind r source-file $DOTFILES/tmux/dot-tmux.conf \; display-message "Config reloaded..."
|
|
|
|
# Load theme
|
|
source-file "$DOTFILES/tmux/gruvbox.conf"
|