64 lines
1.6 KiB
Bash
64 lines
1.6 KiB
Bash
# set-option -g default-command "exec /usr/local/bin/bash --login"
|
|
set-option -g status-style bg=default
|
|
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
|
|
|
|
# Enable mouse
|
|
set -g mouse on
|
|
|
|
# Set the control character to Ctrl+Spacebar (instead of Ctrl+B)
|
|
set -g prefix C-space
|
|
unbind-key C-b
|
|
bind-key C-space send-prefix
|
|
|
|
# Set new panes to open in current directory
|
|
bind c new-window -c "#{pane_current_path}"
|
|
bind '"' split-window -c "#{pane_current_path}"
|
|
bind % split-window -h -c "#{pane_current_path}"
|
|
|
|
# Move panes with vim keys
|
|
bind h select-pane -L
|
|
bind j select-pane -D
|
|
bind k select-pane -U
|
|
bind l select-pane -R
|
|
|
|
# Resize panes with vim keys
|
|
bind-key -r H resize-pane -L 5
|
|
bind-key -r J resize-pane -D 5
|
|
bind-key -r K resize-pane -U 5
|
|
bind-key -r L resize-pane -R 5
|
|
|
|
# Pane movement between windows
|
|
bind-key m command-prompt -p "send pane to:" "join-pane -t :'%%'"
|
|
|
|
# Disable escape time to remove delay in nvim
|
|
set -s escape-time 0
|
|
|
|
# True color support
|
|
set -g default-terminal "tmux-256color"
|
|
set-option -ga terminal-overrides ",*256col*:Tc"
|
|
|
|
set -g status-style "fg=blue"
|
|
set -g window-status-current-style "fg=green"
|
|
set -g pane-active-border-style "fg=blue"
|
|
|
|
setw -g mode-keys vi
|
|
bind -T copy-mode-vi 'v' send -X begin-selection
|
|
bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "pbcopy"
|
|
|
|
set -g status-right ""
|
|
|
|
# Activate OFF mode
|
|
bind o \
|
|
set prefix None \;\
|
|
set key-table off \;\
|
|
set status-style "fg=brightblack" \;\
|
|
set window-status-current-style "fg=brightblack"
|
|
|
|
# Disable OFF mode
|
|
bind -T off O \
|
|
set -u prefix \;\
|
|
set -u key-table \;\
|
|
set -u status-style \;\
|
|
set -u window-status-current-style
|
|
|