change tmux config

This commit is contained in:
Andreas Zweili 2022-04-11 17:02:41 +02:00
parent a13fe37234
commit a09463fa77
1 changed files with 20 additions and 1 deletions

View File

@ -3,7 +3,26 @@
programs.tmux = {
enable = true;
extraConfig = ''
set -g mouse on
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
# enable vim like key bindings
set-window-option -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
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 r send-keys -X rectangle-toggle
# changing default delay
set -s escape-time 1
# window navigation with the meta key + vim keybinding
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D
'';
};
}