70 lines
1.5 KiB
Plaintext
70 lines
1.5 KiB
Plaintext
|
|
# use interactive shell instead of login shell
|
|
set-option -g default-command "/bin/bash"
|
|
|
|
# enable rgb colors
|
|
set -ag terminal-overrides ",*:RGB"
|
|
|
|
# reasonable resizing
|
|
setw -g aggressive-resize on
|
|
|
|
# start window and pane index at 1
|
|
set -g base-index 1
|
|
set -g pane-base-index 1
|
|
set-window-option -g pane-base-index 1
|
|
set-option -g renumber-windows on
|
|
|
|
# status bar
|
|
set -g status-interval 5
|
|
|
|
# buffer size
|
|
set-option -g history-limit 3000
|
|
|
|
|
|
### input options & keybindings
|
|
set-window-option -g mode-keys vi
|
|
bind-key -n M-c copy-mode
|
|
|
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
|
bind-key -T copy-mode-vi 'y' send -X copy-selection
|
|
|
|
# change prefix key to <space>
|
|
unbind C-b
|
|
set-option -g prefix C-Space
|
|
|
|
# window navigation
|
|
bind-key -n M-Left previous-window
|
|
bind-key -n M-Right next-window
|
|
bind-key -n M-S-Left swap-window -t -1 -d
|
|
bind-key -n M-S-Right swap-window -t +1 -d
|
|
|
|
# pane navigation
|
|
bind -n M-Left select-pane -L
|
|
bind -n M-Down select-pane -D
|
|
bind -n M-Up select-pane -U
|
|
bind -n M-Right select-pane -R
|
|
|
|
bind -n M-j swap-pane -D
|
|
bind -n M-k swap-pane -U
|
|
|
|
bind-key -n M-F1 select-layout even-horizontal
|
|
bind-key -n M-F2 select-layout main-vertical
|
|
bind-key -n M-F3 select-layout tiled
|
|
|
|
unbind x
|
|
bind-key x kill-pane -t +0
|
|
|
|
# detach current session and close terminal
|
|
bind-key k run "tmux detach -P"
|
|
|
|
# enable mouse support
|
|
set -g mouse on
|
|
# bind -n WheelUpPane {
|
|
# if -F '#{==:#{window_name},nvim}' {
|
|
# send-keys -M
|
|
# } {
|
|
# copy-mode -e
|
|
# }
|
|
# }
|
|
|